utils/date_format_util library

Constants

am → const String
Outputs if hour is AM or PM
D → const String
Outputs week day as long name
d → const String
Outputs day compactly
dayLong → const List<String>
dayShort → const List<String>
DD → const String
Outputs week day as long name
dd → const String
Outputs day as two digits
H → const String
Outputs hour (0 to 23) compactly
h → const String
Outputs hour (0 - 11) compactly
HH → const String
Outputs hour (0 to 23) as two digits
hh → const String
Outputs hour (0 - 11) as two digits
M → const String
Outputs month as short name
m → const String
Outputs month compactly
MM → const String
Outputs month as long name
mm → const String
Outputs month as two digits
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 millisecond compactly
s → const String
Outputs second 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 year compactly
w → const String
Outputs week in month
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
z → const String
Outputs timezone as time offset

Functions

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