RIO Education uses the Moment.js Javascript library for handling and displaying dates in our Lightning and Aura components.
While dates in Salesforce itself cannot be formatted, Moment.js allows us to provide a format string in order to customise how a particular time and date is displayed in our components.
For instance, a time of 2025-10-23T09:30:00Z can be configured to display as “Oct 23 2025”, “Thursday 23rd October”, “23/10/25”, “9:30 AM”, or even “Week 43”.
When a particular component supports providing a custom format string, you will see it exposed in that component's settings - for instance, these three fields in the RIO Ed - Session Scheduler.

For these, GGWW means “print the last two digits of the current ISO year followed by a two-digit ISO week number”; ddd D means “print the first three letters of the current day followed by the day of the month”; and ha means “print the current hour number followed by am or pm”.
Any text surrounded by [] will be ignored by the parser and have the square brackets removed, in case you wanted to include plain text in your formatted date.
Here is a table of some of the common options you may want to use:
| Unit | Option | Result |
|---|---|---|
| 12 Hour Time | h | 1, 2, 3, … 10, 11, 12 |
| hh | 01, 02, 03, … 10, 11, 12 | |
| 24 Hour Time (start from zero) | H | 0, 1, 2, … 21, 22, 23 |
| HH | 00, 01, 02, … 21, 22, 23 | |
| 24 Hour Time (start from one) | k | 1, 2, 3, … 22, 23, 24 |
| kk | 01, 02, 03, … 22, 23, 24 | |
| Minutes | m | 0, 1, 2, … 57, 58, 59 |
| mm | 00, 01, 02, … 57, 58, 59 | |
| AM / PM | A | AM, PM |
| a | am, pm | |
| Day | D | 1, 2, 3, … 29, 30, 31 |
| DD | 01, 02, 03, … 29, 30, 31 | |
| Do | 1st, 2nd, 3rd, … 29th, 30th, 31st | |
| ddd | Mon, Tue, Wed, … Sat, Sun | |
| dddd | Monday, … Sunday | |
| Month | M | 1, 2, 3, … 10, 11, 12 |
| MM | 01, 02, 03, … 10, 11, 12 | |
| MMM | Jan, Feb, Mar, … Oct, Nov, Dec | |
| MMMM | January, … December | |
| Year | YY | 08, 09, 10, … 23, 24, 25 |
| YYYY | 2008, 2009, … 2024, 2025 |
For further details please refer to the Moment.js documentation: https://momentjs.com/docs/#/displaying/format/