DateTimeUtils class
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
Static Methods
-
chooseDate({required BuildContext context, DateTime? firstDate, String? initialDate})
→ Future<DateTime?>
-
-
chooseDateRange({required BuildContext context, DateTimeRange<DateTime>? initialDateRange})
→ Future<DateTimeRange<DateTime>?>
-
-
chooseDateTime({required BuildContext context, String? initialDate})
→ Future<DateTime?>
-
-
chooseTime({required BuildContext context, required String date})
→ Future<DateTime?>
-
-
dateNotTime(DateTime date)
→ DateTime
-
-
dateParseServerTime(String? date, {String? format})
→ String
-
Parses an ISO-8601 server timestamp and renders it in local time using
format (defaults to DateTimeFormat.shortDate).
-
dateWithCurrentTime(DateTime date)
→ DateTime
-
-
initialCalendarDate(String? strDate)
→ DateTime
-
-
isAtSameCurrentDate(DateTime? otherDate)
→ bool
-
-
isBeforeCurrentDate(String strDate, {int? minutesAdd})
→ bool
-
-
isBeforeDateVersion(String firstDate, String secondDate)
→ bool
-
True when
firstDate is a later y/m/d than secondDate - used to
compare version-like "date" strings (e.g. build/release dates).
-
isDateSecondBeforeFirst(String? dateFirst, String? dateSecond)
→ bool
-
-
isNowOrAfterCurrentDate(String? strDate)
→ bool
-
-
isNowOrBeforeCurrentDate(String strDate)
→ bool
-
-
lastDateOfMonth()
→ DateTime
-
-
maxDatePicker()
→ DateTime
-
-
millisecondsBetween(DateTime from, DateTime to)
→ int
-
-
minDatePicker(String? strDate)
→ DateTime
-
-
parseLocalTime(String? date)
→ DateTime?
-
Parses a server UTC timestamp (no trailing "Z"/offset needed) into the
device's local time.