If you’ve ever wanted to use a custom date format in Shortcuts, you will have seen that you need to use the patterns documented in the (rather intimidating) Unicode Technical Standards #35 .
I’ve laid out a simpler cheat-sheet version of common patterns you may want to use below. You can also download this PDF version for offline viewing.
DATES
Symbol | Example | Notes | |
---|---|---|---|
Week Days | E | Tue | |
EEEE | Tuesday | ||
EEEEE | T | ||
EEEEEE | Tu | ||
Day Of Week | e | 2 | Start of week according to local calendar |
c | 2 | Monday as start of week | |
Day Of Month | d | 1 | |
Day Of Year | D | 342 | |
Week Of Year | w | 27 | |
Day Of Week In Month | F | 2 | 2nd Wed in July |
Week Of Month | W | 3 | |
Month | M | 09 | |
MMM | Sept | ||
MMMM | September | ||
MMMMM | S | ||
Year | y | 2019 | |
yy | 19 | ||
Quarter | Q | 02 | |
QQQ | Q2 | ||
QQQQ | 2nd Quarter |
TIMES
Symbol | Example | Notes | |
---|---|---|---|
Period | a | AM | AM or PM |
Hours | h | 9 | 12-hour clock |
hh | 09 | ||
H | 21 | 24-hour clock | |
HH | 21 | ||
Minutes | m | 6 | |
mm | 06 | ||
Seconds | s | 8 | |
ss | 08 | ||
Fractional Seconds | S | 3 | Example is rounded fraction after the decimal point (3.247 seconds) |
SS | 35 | ||
SSS | 347 | ||
Time Zones | z | BST | Specific non-location format |
zzzz | British Summer Time | ||
Z | +0100 | Localised format | |
ZZZZ | GMT+01:00 | ||
ZZZZZ | +01:00 | ||
O | GMT+1 | ||
OOOO | GMT+01:00 | ||
v | PDT | Generic non-location format | |
vvvv | Pacific Daylight Time | ||
V | gblon | Timezone ID (short) | |
VV | Europe/London | Timezone ID (long) | |
VVV | London | Exemplar City | |
VVVV | United Kingdom Time | Generic location format |