DateTimeExtensions extension
Useful extensions on DateTime for date checks and human-readable formatting.
- on
Properties
- isToday → bool
-
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrueif this date is today.no setter - isTomorrow → bool
-
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrueif this date is tomorrow.no setter - isYesterday → bool
-
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrueif this date was yesterday.no setter - timeAgo → String
-
Available on DateTime, provided by the DateTimeExtensions extension
Returns a human-readable relative time string (e.g. "Just now", "5m ago", "2h ago", "Yesterday").no setter - toDateString → String
-
Available on DateTime, provided by the DateTimeExtensions extension
Formats date toYYYY-MM-DDstring.no setter - toTimeString → String
-
Available on DateTime, provided by the DateTimeExtensions extension
Formats time toHH:MM:SSstring.no setter
Methods
-
isSameDay(
DateTime other) → bool -
Available on DateTime, provided by the DateTimeExtensions extension
Returnstrueif this date falls on the exact same day asother.