DateUtil class
Date Util.
Constructors
- DateUtil()
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
-
formatDate(
DateTime date, {String format = "yyyy-MM-dd HH:mm:ss"}) → String -
formatMs(
int ms, {bool isUtc = false, String format = "yyyy-MM-dd HH:mm:ss"}) → String -
isLeapYear(
DateTime dateTime) → bool - Return whether it is leap year. 是否是闰年
-
isLeapYearByYear(
int year) → bool - Return whether it is leap year. 是否是闰年
-
isSameYear(
DateTime dateTime, DateTime locDateTime) → bool - year is equal. 是否同年.
-
isSameYearByMs(
int ms, int locMs) → bool - year is equal. 是否同年.
-
nowFormat(
{String format = "yyyy-MM-dd HH:mm:ss"}) → String - get Now Date Str.(yyyy-MM-dd HH:mm:ss)
-
nowMs(
) → int - get Now Date Milliseconds.