Ejemplo n.º 1
0
 /// <summary>
 /// Gets last day of month
 /// </summary>
 /// <param name="ldt"></param>
 /// <returns></returns>
 public static LocalDateTime LastDayOfMonth(this LocalDateTime ldt) => ldt.SetDay(ldt.Calendar.GetDaysInMonth(ldt.Year, ldt.Month));
Ejemplo n.º 2
0
 /// <summary>
 /// Gets first day of month
 /// </summary>
 /// <param name="ldt"></param>
 /// <returns></returns>
 public static LocalDateTime FirstDayOfMonth(this LocalDateTime ldt) => ldt.SetDay(1);