date_format_util library

Constants

am → const String
Outputs if hour is AM or PM
'am'
d → const String
Outputs day compactly
'd'
D → const String
Outputs week day as long name
'D'
dayLong → const List<String>
const ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
dayShort → const List<String>
const ['Mon', 'Tue', 'Wed', 'Thur', 'Fri', 'Sat', 'Sun']
dd → const String
Outputs day as two digits
'dd'
DD → const String
Outputs week day as long name
'DD'
h → const String
Outputs hour (0 - 11) compactly
'h'
H → const String
Outputs hour (0 to 23) compactly
'H'
hh → const String
Outputs hour (0 - 11) as two digits
'hh'
HH → const String
Outputs hour (0 to 23) as two digits
'HH'
m → const String
Outputs month compactly
'm'
M → const String
Outputs month as short name
'M'
mm → const String
Outputs month as two digits
'mm'
MM → const String
Outputs month as long name
'MM'
monthLong → const List<String>
const <String>['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', &…
monthShort → const List<String>
const <String>['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
n → const String
Outputs minute compactly
'n'
nn → const String
Outputs minute as two digits
'nn'
s → const String
Outputs second compactly
's'
S → const String
Outputs millisecond 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 month
'w'
W → const String
Outputs week in year compactly
'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
Outputs timezone as time offset
'z'
Z → const String
'Z'

Functions

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