DateUnit enum

日期时间单位,每个单位都是以毫秒为基数

Inheritance

Constructors

DateUnit(int millis)
const

Values

ms → const DateUnit

一毫秒

const DateUnit(1)
second → const DateUnit

一秒的毫秒数

const DateUnit(1000)
minute → const DateUnit

一分钟的毫秒数

const DateUnit(1000 * 60)
hour → const DateUnit

一小时的毫秒数

const DateUnit(1000 * 60 * 60)
day → const DateUnit

一天的毫秒数

const DateUnit(1000 * 60 * 60 * 24)
week → const DateUnit

一周的毫秒数

const DateUnit(1000 * 60 * 60 * 24 * 7)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
millis int
final
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

Constants

values → const List<DateUnit>
A constant List of the values in this enum, in order of their declaration.