Joomla 5.4 uses different date format string formats depending on their use...
- Joomla Calendar Forms
- Joomla Language File
JOOMLA CALENDAR FORM FORMAT ATTRIBRUTE
This Joomla Calendar Form Format attribute string has "%" in it.
For example, for a format like "Mon 3/Feb/2025 13:30", you would use
%a %e/%b/%Y %H:%M
NOTE: Joomla Calendar forms doesn't work well with 12hr times. The %p creates trouble sometimes. Best to keep with 24hr times.
Character | Description | Example |
---|---|---|
d | Day of the month, 2 digits with leading zeros | 01 to 31 |
a | A textual representation of a day, three letters | Mon through Sun |
e | Day of the month without leading zeros | 1 to 31 |
A | A full textual representation of the day of the week | Monday through Sunday |
w | Numeric representation of the day of the week | 0 (for Sunday) through 6 (for Saturday) |
j | The day of the year (starting from 0) | 001 through 366 |
B | A full textual representation of a month | January through December |
m | Numeric representation of a month, with leading zeros | 01 through 12 |
b | A short textual representation of a month, three letters | Jan through Dec |
Y | A full numeric representation of a year, 4 digits | 1999 or 2003 |
y | A two-digit representation of a year | 99 or 03 |
S | English suffix of the month | st, nd |
TIME | ||
I | 12 hour with leading zeros | 09 |
H | 24 hour with leading zeros | 20 |
M | minutes with leading zeros | 05 |
S | seconds with leading zeros | 03 |
Timezone | WST | |
Timezone difference to GMT | +02:00 | |
P | Lowercase Ante Meridiem or Post Meridiem (Does not work well in forms) | am or pm |
p | Uppercase Ante Meridiem or Post Meridiem (Does not work well in forms) | AM or PM |
https://api.joomla.org/cms-4/classes/Joomla-CMS-Date-Date.html
JOOMLA LANGUAGE FILE FORMAT
This is the PHP standard. This is in a format without %. Something like this...
Y-m-d g:ia
...
Character | Description | Example |
---|---|---|
d | Day of the month, 2 digits with leading zeros | 01 to 31 |
D | A textual representation of a day, three letters | Mon through Sun |
j | Day of the month without leading zeros | 1 to 31 |
l | A full textual representation of the day of the week | Monday through Sunday |
N | Numeric representation of the day of the week | 0 (for Sunday) through 6 (for Saturday) |
z | The day of the year (starting from 0) | 001 through 366 |
F | A full textual representation of a month | January through December |
m | Numeric representation of a month, with leading zeros | 01 through 12 |
M | A short textual representation of a month, three letters | Jan through Dec |
Y | A full numeric representation of a year, 4 digits | 1999 or 2003 |
y | A two-digit representation of a year | 99 or 03 |
TIME | ||
h | 12 hour with leading zeros | 09 |
H | 24 hour with leading zeros | 20 |
g | 12 hour without leading zeros | 9 |
G | 24 hour without leading zeros | 20 |
M | minutes with leading zeros | 05 |
S | seconds with leading zeros | 03 |
T | Timezone | WST |
P | Timezone difference to GMT | +02:00 |
a | Lowercase Ante Meridiem or Post Meridiem | am or pm |
A | Uppercase Ante Meridiem or Post Meridiem | AM or PM |
https://www.php.net/manual/en/datetime.format.php
Using Language File
In Joomla, you can create a Language file override to correct the Date formats without hard writing a format in your component.
For Calander Date Only fields... change the Constant...
- DATE_FORMAT_LC2
For Calander Date/TIME fields... change the Constant...
- DATE_FORMAT_LC6
Using something like
Y-m-d g:ia