datetime/date_constants library

Classes

DateConstants
DateConstants is a utility class in Dart that provides static constants for commonly used dates. This class cannot be instantiated.
MonthUtils
Utility class for month name operations.
SerialDateUtils
Utility class for serial date string parsing.
WeekdayUtils
Utility class for weekday name operations.

Constants

dayEndHour → const int
Hour threshold for end of "day" time (before 6pm/18:00).
daysInFebLeapYear → const int
Number of days in February during a leap year.
dayStartHour → const int
Hour threshold for start of "day" time (after 7am).
daysToAddToGetNextMonth → const int
Days to add to safely reach next month (28 + 4 = 32 days > any month).
defaultLeapYearCheckYear → const int
Default year to use for leap year calculations when year is not specified (chosen as a leap year).
leapYearModulo100 → const int
Modulo divisor for century leap year exception (divisible by 100).
leapYearModulo4 → const int
Modulo divisor for basic leap year check (divisible by 4).
leapYearModulo400 → const int
Modulo divisor for century leap year exception override (divisible by 400).
maxHour → const int
Maximum valid hour (23 for 24-hour format, 0-23 range).
maxMillisecondOrMicrosecond → const int
Maximum valid millisecond or microsecond (999 for 0-999 range).
maxMinuteOrSecond → const int
Maximum valid minute or second (59 for 0-59 range).
maxMonth → const int
Maximum valid month number (December).
maxYear → const int
Maximum valid year in DateTime (9999).
minDaysInAnyMonth → const int
Minimum number of days that exist in any month (February in non-leap years).
minMonth → const int
Minimum valid month number (January).