Skip to content

Date Format

Martin edited this page Jan 18, 2017 · 1 revision

The date format allows building a date time string using a template which can consist of a number of pieces. A few of these pieces are as follows:

yyyy      : A 'long year', i.e. 2017
yy        : A 'short year', i.e. 17
mm and m  : The month as a number, with leading 0 and without respectively
mmm       : The month as the first three letters of the name
mmmm      : The full month name
dd and d  : The day as a number, with leading 0 and without respectively
ddd       : The day as the first three letters of the name
dddd      : The full day name
hh and h  : The hour in 12 hour format, with a leading 0 and without
HH and H  : The hour in 24 hour format, with a leading 0 and without
MM and M  : The minute, with a leading 0 and without
ss and s  : The seconds, with a leading 0 and without
TT        : AM or PM
Z         : The timezone (i.e. GMT+0100)
o         : The time offset (i.e. +0100)

Other characters, such as other letters, slashes or dashes are just included in the formatted date string as they are. E.g. "yyyy-mm-dd" would show as "2017-01-18" with the dashes left as they are.

There is also a number of presets:

shortDate:      "m/d/yy",
mediumDate:     "mmm d, yyyy",
longDate:       "mmmm d, yyyy",
fullDate:       "dddd, mmmm d, yyyy",
shortTime:      "h:MM TT",
mediumTime:     "h:MM:ss TT",
longTime:       "h:MM:ss TT Z",
isoDate:        "yyyy-mm-dd",
isoTime:        "HH:MM:ss",
isoDateTime:    "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"

The names of these (e.g. "shortDate") can be put into the settings field and the date will display as "m/d/yy". Though generally you'll probably want to create your own format that matches your local format and includes both date and time.

I'd recommend displaying the full year, since CLC uses "Elite Dangerous time" by default, that is all dates are the current date plus 1286 years, to match up with in-game time. That means that the last two digits of the in-game year will not match up with the current real year which might be confusing.

Clone this wiki locally