CalendarDateUtils class abstract final

Calendar field operations that are safe for values typed as DateTime.

Dart's DateTime.copyWith extension and Flutter's DateUtils reconstruct Gregorian dates from the exposed fields. Use copyWith and dateOnly for calendar fields, or toGregorian before passing a date to Gregorian helpers. Supported calendars are native Gregorian, Persian, and Umm al-Qura Hijri.

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

copyWith(DateTime date, {int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? microsecond, bool? isUtc}) → DateTime
Replaces wall-clock fields in the input's calendar.
dateOnly(DateTime date) → DateTime
Clears the clock fields in the input's calendar and UTC/local mode.
toGregorian(DateTime date) → DateTime
Returns a native Gregorian DateTime for the exact same instant and mode.