public static DateTime EndDayOfMonth(string monthNo) { if (monthNo.Length < 6) { return(WeekHelper.EndDayOfMonth(DateTime.MinValue)); } int year = Convert.ToInt32(monthNo.Substring(0, 4)); int month = Convert.ToInt32(monthNo.Substring(4, 2)); DateTime date = new DateTime(year, month, 1); return(WeekHelper.EndDayOfMonth(date)); }
/// <summary> /// 해당 월의 마지막 주차를 반환합니다. /// </summary> /// <param name="startMonthNo"></param> internal static string MonthNoToEndWeek(int startMonthNo, bool considerBoundary = false) { int year = (int)(startMonthNo / 100); int month = startMonthNo - year * 100; DateTime endDayOfMonth = WeekHelper.EndDayOfMonth(new DateTime(year, month, 1)); string weekNo; if (considerBoundary) { weekNo = WeekHelper.GetWeekPlanNo(endDayOfMonth, false); } else { weekNo = WeekHelper.GetWeekPlanNo(endDayOfMonth); } return(weekNo); }