示例#1
0
 /// <summary>
 /// Gets last day of month.<br />
 /// 获取一个月的最后一天。
 /// </summary>
 /// <param name="ld"></param>
 /// <returns></returns>
 public static LocalDate LastDayOfMonth(this LocalDate ld) => ld.SetDay(ld.Calendar.GetDaysInMonth(ld.Year, ld.Month));
示例#2
0
 /// <summary>
 /// Gets first day of month. <br />
 /// 获取一个月的第一天。
 /// </summary>
 /// <param name="ld"></param>
 /// <returns></returns>
 public static LocalDate FirstDayOfMonth(this LocalDate ld) => ld.SetDay(1);