datetime/date_time_more_extensions library
Extensions
- DateTimeMoreExtensions on DateTime
- DateTime More: is same day, is morning/afternoon/evening, duration between, within last N, etc. Roadmap #304-310.
Functions
-
durationBetween(
DateTime a, DateTime b) → Duration -
Returns the absolute Duration between
aandb, regardless of order. -
monthsBetween(
DateTime start, DateTime end) → List< DateTime> -
Returns the first day of each month from
startthroughendinclusive. The day and time components of the inputs are ignored. -
yearsBetween(
DateTime start, DateTime end) → List< int> -
List of years from
start.year throughend.year (inclusive).