/// <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));
/// <summary> /// Gets first day of month. <br /> /// 获取一个月的第一天。 /// </summary> /// <param name="ld"></param> /// <returns></returns> public static LocalDate FirstDayOfMonth(this LocalDate ld) => ld.SetDay(1);