Symbols is a required topic to work in Date/Time Patterns
More details on date/time symbols and patterns may be found in the Spec Date Field Symbol Table.
Dates and times are formatted using patterns, like "mm-dd". Within these patterns, each field, like the month or the hour, is represented by a sequence of letters (“pattern characters”) in the range A–Z or a–z. For example, sequences consisting of one or more ‘M‘ or ‘L‘ stand for various forms of a month name or number.
When the software formats a date for your language, a value will be substituted for each field, according to the following table. Examples of the pattern usage you may see in an every day use may be on the lock screen on a mobile device showing the date or time, or as a date stamp on an email.
Notice in the table below that there are different pattern characters for standalone and formatting. For example M to indicate the formatting and L to indicate the standalone month names.
Make sure you understand the difference between standalone and formatting patterns and use the appropriate symbols in patterns. See when to use standalone vs. formatting in Date and Time patterns.
The symbols using characters a-z and A-Z are special placeholders; they stand for date or time fields. They are NOT real characters.
For example, 'y' stands for a numeric year and will be replaced by a value like '1998'. DO NOT "translate" the placeholders; for example, don't change 'y' to 'j' even though in your language the word for "year" starts with a "j".
Any "real" characters need to be quoted. For example, 'g' in a real character in this example pattern: EEE, yyyy. 'g'. dd. MMM
If your language doesn't have a concept of "Quarters", use a translation that describes the concept "three-month period" rather than “quarter-of-a-year”.
The number of letters in a field indicates the format.
The number of letters used to indicate the format is the same for all date fields EXCEPT for the year. (See table above for y and yy).
The following are the available field lengths, and their meanings:
The longer forms are only relevant for the fields that are non-numeric, such as era names, month names, day of the week, and am/pm, etc...
Standalone vs. Format Styles
This section is relevant to When to use standalone vs. Formatting in date/time patterns.
Some languages use two different forms of strings (standalone and format) depending on the context. Typically the standalone version is the nominative form of the word, and the format version is in the genitive (or related form).
Two different characters are used:
💡 Translation Tips
Standalone and Format names must be coordinated with the format strings. See When to use standalone vs. Formatting in date/time patterns.
If your language uses two different form, be sure to provide the correct forms under Standalone and Formatting. For example in Brazilian Portuguese
"Dezembro" for December when standing alone; thus use LLLL
"Dezembru" when referencing December with a date (e.g. to mean "the nth day of that month"); thus, use MMMM
Then, make sure you use the intended forms by using the correct symbol (e.g. LLLL stand-alone form or MMMM format forms).
If your language formats months differently with vowels, eg "14 de gener de 2008" but "14 d'abril de 2008"; the stand-alone and format versions of the months should be as follows; in this case the format strings should not have the extra "de" before the month:
These days, standalone names should not be used merely to provide capitalized forms. There are other solutions for capitalizing date symbols which provide finer control over capitalization, see capitalization guidelines.
Nominative/standalone (LLLL) vs genitive/format (MMMM):
Precede months with de or d’ - coordinate with the formats strings, which can't have the extra "de" before the month: