DateUtils 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
bool utc, int year, [int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0]) → DateTime -
getDateByDayOffset(
{int offset = 0}) → DateTime - 获取指定天数的日期,0=当天,1=明天,-1=昨天
-
getDateByDayOffsetMs(
{int offset = 0}) → int - 获取指定天数的日期毫秒,0=当天,1=明天,-1=昨天
-
getEndDate(
{int offset = 0}) → DateTime - 获取某一天的结束时间
-
getEndDateMs(
{int offset = 0}) → int - 获取某一天的结束时间
-
getStartDate(
{int offset = 0}) → DateTime - 获取某一天的开始时间
-
getStartDateMs(
{int offset = 0}) → int - 获取某一天的开始时间
-
isLeapYear(
int year) → bool - 是否是闰年
-
now(
) → DateTime - 获取当前日期返回DateTime
-
nowMs(
) → int - 获取当前毫秒值