date_format library

Support for doing something awesome.

More dartdocs go here.

Classes

EnglishLocale
Locale

Constants

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

Functions

dayInYear(DateTime date) int
formatDate(DateTime date, List<String> formats, {Locale locale: const EnglishLocale()}) String