DateValidators class

Validation utilities for date/time operations

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getValidationErrors({int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond}) List<String>
Gets validation errors for date components
isValidBusinessDaysCount(int days) bool
Validates if a business days count is valid (non-negative)
isValidDateRange(DateTime start, DateTime end) bool
Validates if a date range is valid (start <= end)
isValidDateTime(DateTime date) bool
Validates if a DateTime object is valid
isValidDay(int year, int month, int day) bool
Validates if a day is valid for a given month and year
isValidFormatPattern(String pattern) bool
Validates if a date format pattern is valid
isValidHour(int hour) bool
Validates if an hour is valid (0-23)
isValidLocale(String locale) bool
Validates if a locale string is valid
isValidMillisecond(int millisecond) bool
Validates if a millisecond is valid (0-999)
isValidMinute(int minute) bool
Validates if a minute is valid (0-59)
isValidMonth(int month) bool
Validates if a month is valid (1-12)
isValidQuarter(int quarter) bool
Validates if a quarter number is valid (1-4)
isValidSecond(int second) bool
Validates if a second is valid (0-59)
isValidWeekday(int weekday) bool
Validates if a weekday number is valid (1-7, where 1=Monday)
isValidYear(int year) bool
Validates if a year is valid (typically 1-9999)
validateDateComponents({int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond}) Map<String, bool>
Validates multiple date components at once
validateDateRange(DateTime start, DateTime end) → void
Validates if a date range is valid and throws exception if invalid