Date/time Cheat Sheet
#Standard date/time format strings cheat sheet#
Note: Moment.js doesn’t insert a comma between day and year for en-US
common name | example (en-US) | .NET | Angular.js | Kendo UI | Moment.js |
---|---|---|---|---|---|
short date | 6/15/2009 | d | shortDate | d | |
long date | Monday, June 15, 2009 | D | fullDate | D | |
Full date short time | Monday, June 15, 2009 1:45 PM | f | LLLL | ||
Medium full date short time | Mon, June 15, 2009 1:45 PM | llll | |||
Full date long time | Monday, June 15, 2009 1:45:30 PM | F | F | ||
General date short time | 6/15/2009 1:45 PM | g | short | g | |
General date long time | 6/15/2009 1:45:30 PM | G | G | ||
Long date | September 3, 2010 | longDate | LL | ||
Long date/ short time | September 3, 2010 12:05 PM | LLL | |||
Medium date | Sep 3, 2010 | mediumDate | ll | ||
Medium date/ long time | Sep 3, 2010 12:05:08 PM | medium | |||
Medium date/ short time | Sep 3, 2010 12:05 PM | lll | |||
Month/day | June 15 | M or m | M or m | ||
padded date | 06/05/2009 | L | |||
unpadded date | 6/5/2009 | l | |||
Round-trip date/time | 2009-06-15T13:45:30.0000000 | O or o | |||
RFC1123 | Mon, 15 Jun 2009 20:45:30 GMT | R or r | |||
Sortable date/time | 2009-06-15T13:45:30 | s | |||
Short time | 1:45 PM | t | shortTime | LT | |
Long time | 1:45:30 PM | T | mediumTime | LTS | |
Universal sortable date/time | 2009-06-15 20:45:30Z | u | u | ||
Universal full date/time | Monday, June 15, 2009 8:45:30 PM | U | |||
Year/Month | June, 2009 | Y or y | Y or y |