Forums

Calendar: Date format options?

healyhatman 04 Apr, 2018
Is there a list somewhere of the formatting options for the Calendar field? Because I can't find one.
healyhatman 04 Apr, 2018
Here's a little list I made up by putting every combination of 1, 2, or 4 letters in lower and upper case into the display format of the date field and matching them up one by one. It took me forever because I couldn't find it on Google and now it's here for you to enjoy.

If it's in lower case and it doesn't say "or [uppercase]" then it's because uppercase either does nothing or does something completely different.

HH or H: Hours in 24-hour format with/without leading 0
kk or k: Hours in 24-hour format with/without leading 0. Why, when you can already use HH / H ? No idea.
hh or h: Hours in 12-hour format with/without leading 0
mm or m: Minutes with/without leading 0
SS or S or ss or s: Same thing but for seconds
A or a: Ante/Post Meridean (AM / PM) in upper case or lower case
Z or ZZ: Different from Greenwich Meridean Time (GMT), with or without a colon (e.g. for me here it comes up as +11:00 or +1100)
xx or XX : Seconds since the Unix Epoch (1970), with or without some extra 0's on the end for some reason


DD or D: Day of the month with/without leading 0. 01-31 or 1-31 (depending on how many days in the month)
dd or dddd : The day of the week, two characters (e.g. Mo, Tu, We) or full name (e.g. Monday, Tuesday, Wednesday)
d or e: the index of the day in the week, starting at Sunday, i.e Sun - Sat = 0 - 6
E: The number of the day in the week, starting at Monday, i.e. Mon - Sun = 1 - 7
MM or M: Number of the month with/without leading 0, e.g. 01-12 or 1-12
ww / WW or w / W: What number week it is, with or without the leading 0, e.g. first week of the year is 01, second week of the year is 02 etc
YY or YYYY: The year, last two digits or all 4
gg or gggg: The year, last two digits or all 4, for some reason.

ll or LL : Full date in text form, with abbreviated or full Month, in American format, as in "Apr 3, 2018" or "April 3, 2018"
llll or LLLL: Full date in text form, including day of the week and time, in American format, as in "Wed, Apr 4, 2018 1:00 AM" or "Wednesday, April 4, 2018 1:00 AM"
L or l: full date, in American format, with or without leading 0, as in "4/02/2018" or "04/02/2018"

Things that are something but I don't know what yet
QQ or QQQQ: when selecting any date, comes up as "22" or "2222"
GreyHead 04 Apr, 2018
Hi healyhatman,

I think that these are just PHP format strings - see here.

Bob
healyhatman 04 Apr, 2018
Nope they're not. I'm currently doing all of the letter combinations and most of them don't match that.
healyhatman 04 Apr, 2018
As you can see I've just gone ahead and done it myself, and the majority don't match PHP format strings. There's probably a list somewhere, but I couldn't find it on the Googz - now I will be able to find it, because here it is.
Max_admin 07 Apr, 2018
Answer
1 Likes
Hi healyhatman,

The calendar uses the moment js library, all formats can be found here:
momentjs.com

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 07 Apr, 2018
1 Likes
Yayyyyyyy

I asked a few months back, thanks for letting me know though😉
This topic is locked and no more replies can be posted.