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 a and b, regardless of order.
monthsBetween(DateTime start, DateTime end) List<DateTime>
Returns the first day of each month from start through end inclusive. The day and time components of the inputs are ignored.
yearsBetween(DateTime start, DateTime end) List<int>
List of years from start.year through end.year (inclusive).