흐흐흐
직접짯다... 흐뭇하네~~~ ㅋㅋㅋ
정말정말 힘들게~~~ ㅎㅎㅎㅎㅎ
DateTime dTime = DateTime.Now;
string FirstOfMonth = DateTime.Now.ToString("yyyy-MM-01");
DateTime dt = new DateTime();DateTime.TryParse(FirstOfMonth, out dt);
CultureInfo myCI = new CultureInfo("en-US");
Calendar myCal = myCI.Calendar;
CalendarWeekRule myCWR = myCI.DateTimeFormat.CalendarWeekRule;
DayOfWeek myFirstDOW = myCI.DateTimeFormat.FirstDayOfWeek;
// 오늘 몇주차
int WeekOfToday = myCal.GetWeekOfYear(dTime, myCWR, myFirstDOW);
// 오늘이 있는달 첫날짜 주차
int WeekOfFirstday= myCal.GetWeekOfYear(dt, myCWR, myFirstDOW);
int WeekOfMonth = WeekOfToday - WeekOfFirstday;
textBox2.Text = (WeekOfMonth + 1).ToString();