DateTimeUtil class

Constructors

DateTimeUtil()

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 Properties

full String
final
h_m String
final
h_m_s String
final
mo_d String
final
mo_d_h_m String
final
y_mo String
final
y_mo_d String
final
y_mo_d_h_m String
final
zh_full String
final
zh_h_m String
final
zh_h_m_s String
final
zh_mo_d String
final
zh_mo_d_h_m String
final
zh_y_mo String
final
zh_y_mo_d String
final
zh_y_mo_d_h_m String
final

Static Methods

firstDayOfMonth({DateTime? date}) DateTime
指定日期所在月的第一天
firstDayOfWeek({DateTime? date}) DateTime
指定日期所在周的周一
formatDateTime({DateTime? dateTime, String? pattern}) String
dateTime 转 字符串 DateTime() => yyyy-MM-dd HH:mm:ss
formatTimestamp({int? timestamp, String? pattern}) String
毫秒级时间戳 转 字符串 1317650580814 => yyyy-MM-dd HH:mm:ss
lastDayOfMonth({DateTime? date}) DateTime
指定日期所在月的最后
lastDayOfWeek({DateTime? date}) DateTime
parse(String formattedString) DateTime?