utils/date_format_util library

Constants

am → const String
Outputs if hour is AM or PM
d → const String
Outputs day compactly
D → const String
Outputs week day as long name
dayLong → const List<String>
dayShort → const List<String>
dd → const String
Outputs day as two digits
DD → const String
Outputs week day as long name
h → const String
Outputs hour (0 - 11) compactly
H → const String
Outputs hour (0 to 23) compactly
hh → const String
Outputs hour (0 - 11) as two digits
HH → const String
Outputs hour (0 to 23) as two digits
m → const String
Outputs month compactly
M → const String
Outputs month as short name
mm → const String
Outputs month as two digits
MM → const String
Outputs month as long name
monthLong → const List<String>
monthShort → const List<String>
n → const String
Outputs minute compactly
nn → const String
Outputs minute as two digits
s → const String
Outputs second compactly
S → const String
Outputs millisecond compactly
ss → const String
Outputs second as two digits
SSS → const String
Outputs millisecond as three digits
u → const String
Outputs millisecond compactly
uuu → const String
Outputs microsecond as three digits
w → const String
Outputs week in month
W → const String
Outputs week in year compactly
WW → const String
Outputs week in year as two digits
yy → const String
Outputs year as two digits
yyyy → const String
Outputs year as four digits
z → const String
Outputs timezone as time offset
Z → const String

Functions

dateFormat(DateTime date, List<String> formats) String
dayInYear(DateTime date) int