Example #1
0
 /// <summary>
 /// Returns the previous date time with the specified time, subtracting a day if the time is already correct.
 /// </summary>
 /// <param name="dateTime">The local date time.</param>
 /// <param name="time">The time to adjust date times to.</param>
 /// <returns>The previous date time with the specified time, subtracting a day if the time is already correct.</returns>
 public static LocalDateTime Previous(this LocalDateTime dateTime, LocalTime time) => DateTimeAdjusters.Previous(time)(dateTime);
Example #2
0
 /// <summary>
 /// Returns the next date time with the specified time, adding a day if the time is already correct.
 /// </summary>
 /// <param name="dateTime">The local date time.</param>
 /// <param name="time">The time to adjust date times to.</param>
 /// <returns>The next date time with the specified time, adding a day if the time is already correct.</returns>
 public static LocalDateTime Next(this LocalDateTime dateTime, LocalTime time) => DateTimeAdjusters.Next(time)(dateTime);