Customising Shopfront

Customising the Date and Time format in Shopfront

You can now customise the format used to display the date and time everywhere in Shopfront. You can also select what day a week starts on.

 

How to set the date and time format

  1. Open the Menu
  2. Select Setup
  3. Select General
  4. Scroll down to the Date & Time section (under the Company tab)

Here you can select the timezone your store is in, the date format to use, the time format to use and which day a week starts on.

You'll have to use format tokens (shown below) to specify the date and time format

Format Tokens

Format tokens are special tokens that we use to determine the formatting to use by swapping the token with the respective value.

Token Description Example
Days
D The day of the month without leading zeros to 31
DD The day of the month with leading zeros 01 to 31
Do The day of the month with ordinal 1st, 2nd, 3rd, etc
ddd Three letter text representation of the day of the week Sun to Sat
dddd Full text representation of the day of the week Sunday to Saturday
d The numeric day of the week (Sunday is 0) to 6
E The ISO numeric day of the week (Sunday is 1) to 7
DDD The day of the year without leading zeros to 366
Weeks
W The ISO week of the year (start Sunday) 1 to 53
w The week of the year (start Monday) 1 to 53
Months
M The month number without leading zeros to 12
MM The month number with leading zeros 01 to 12
MMM Three letter text representation of the month Jan to Dec
MMMM Full text representation of the month January to December
Years
YY The last two digits of the year 17, 18, 19, etc
YYYY The full four digits of the year 2017, 2018, 2019, etc
GGGG The ISO week year (used with the W token) 2017, 2018, 2019, etc
gggg The week year (used with the w token) 2017, 2018, 2019, etc
Hours
h 12 hour format without leading zeros to 12
hh 12 hour format with leading zeros 01 to 12
H 24 hour format without leading zeros to 23
HH 24 hour format with leading zeros 00 to 23
Minutes
mm Minutes with leading zeros 00 to 59
Seconds
ss Seconds with leading zeros 00 to 59
Time Period
A Uppercase version of the time period AM, PM
a Lowercase version of the time period am, pm
Time Zone
ZZ The timezone offset without a colon -1200 to +1400
Z The timezone offset with a colon -12:00 to +14:00

When reporting some of the tokens aren't available to use so they are mapped to other tokens (or ignored). Care will need to be taken when using the following tokens:

Token Mapped To
E d
a A
ZZ (ignored)
Z (ignored)