Measurements

Value Description
british

British Standard

metric

Metric

native

Show measurements in the local format.

standard

US Standard.


Date and Time

Element Description
yyyy Four digit year.
MM Two digit month.
dd Two digit day of the month.
T A separator between date and time.
HH Two digit hours ranging from 00 to 23.
mm Two digit minute.
ss Two digit second.
fff Optional three digit millisecond.
Z A terminator representing the UTC timezone.

Date and Time Formatting

Format

ddd MMM d, yyyy → Mon Apr 18, 2016 yyyy-MM-dd → 2016-04-18

also

h:mm:ss tt → 2:44:40 PM h\h mm\m ss\s → 2h 44m 40s


Explanation
Element Description
yy Two digit year
yyyy Four digit year.
M One or two digit month
MM Two digit month.
MMM Abbreviated month name (ie: Jan)
MMMM Month name
d One or two digit day of the month.
dd Two digit day of the month.
ddd Abbreviated day name (ie: Mon)
dddd Day name (ie: Monday)
h One or two digit hour ranging from 0 to 12.
H One or two digit hour ranging from 0 to 23.
hh Two digit hour ranging from 00 to 12.
HH Two digit hours ranging from 00 to 23.
m One or two digit minute.
mm Two digit minute.
s One or two digit second
ss Two digit second.
f One digit millisecond
ff Two digit millisecond
fff Three digit millisecond.
t First letter of meridium (ie: A or P)
tt Meridium (ie: AM or PM)
\ Escape the next character (ie h\h → 9h)