DateTimeUtils class

Utility class for common DateTime 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

dateToString(DateTime? date, {required String format}) String
Converts a DateTime into a formatted string using the given format.
formatMinutes(int totalMinutes) String
Formats a total number of minutes into a string with hours and minutes.
now() DateTime
Returns the current date and time.
printDuration(Duration duration) String
Prints a Duration as a formatted string.
timeToString(int millisecondsSinceEpoch, {required String format}) String
Converts a int into a formatted string using the given format. Example: