These Things Happen

fixing bugs and chewing bubblegum


Standard date/time format strings cheat sheet

Note: Moment.js doesn’t insert a comma between day and year for en-US

common nameexample (en-US).NETAngular.jsKendo UIMoment.js
short date6/15/2009dshortDated
long dateMonday, June 15, 2009DfullDateD
Full date short timeMonday, June 15, 2009 1:45 PMfLLLL
Medium full date short timeMon, June 15, 2009 1:45 PMllll
Full date long timeMonday, June 15, 2009 1:45:30 PMFF
General date short time6/15/2009 1:45 PMgshortg
General date long time6/15/2009 1:45:30 PMGG
Long dateSeptember 3, 2010longDateLL
Long date/ short timeSeptember 3, 2010 12:05 PMLLL
Medium dateSep 3, 2010mediumDatell
Medium date/ long timeSep 3, 2010 12:05:08 PMmedium
Medium date/ short timeSep 3, 2010 12:05 PMlll
Month/dayJune 15M or mM or m
padded date06/05/2009 L
unpadded date6/5/2009 l
Round-trip date/time2009-06-15T13:45:30.0000000O or o
RFC1123Mon, 15 Jun 2009 20:45:30 GMTR or r
Sortable date/time2009-06-15T13:45:30s
Short time1:45 PMtshortTime LT
Long time1:45:30 PMTmediumTimeLTS
Universal sortable date/time2009-06-15 20:45:30Zuu
Universal full date/timeMonday, June 15, 2009 8:45:30 PMU
Year/MonthJune, 2009Y or yY or y