DateTimeMoreExtensions extension
DateTime More: is same day, is morning/afternoon/evening, duration between, within last N, etc. Roadmap #304-310.
- on
Properties
- isAfternoon → bool
-
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if hour is in 12..16 (afternoon).no setter - isEvening → bool
-
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if hour is >= 17 or < 5 (evening/night).no setter - isMorning → bool
-
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if hour is in 5..11 (morning).no setter
Methods
-
isSameDay(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if this date is the same calendar day asother. -
isWithinLastDays(
int n, DateTime now) → bool -
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if this is on or afternowminusndays and not afternow. -
isWithinLastHours(
int n, DateTime now) → bool -
Available on DateTime, provided by the DateTimeMoreExtensions extension
True if this is within the lastnhours beforenow.