time library


Provides points in time relative to the current point in time, for example: now, 2 days ago, 4 weeks from now, etc.


aDay → const Duration
aMicrosecond → const Duration
aMillisecond → const Duration
aMinute → const Duration
anHour → const Duration
aSecond → const Duration
aWeek → const Duration


clampDayOfMonth({required int year, required int month, required int day}) int
Takes a date that may be outside the allowed range of dates for a given month in a given year and returns the closest date that is within the allowed range.
daysInMonth(int year, int month) int
Returns the number of days in the specified month.
isLeapYear(int year) bool
Returns true if year is a leap year.
systemTime() DateTime
Return current system time.


TimeFunction = DateTime Function()
Returns current time.