Date & Time
Date and time data provides information for formatting dates, times, timezones, datetime intervals. The pages below describe date and time pieces, how to write the patterns to format dates, the symbols used in the date time patterns, and time zones.
🚨
Error/warning messages
The following are some of the error/warning messages you might see, and how to handle them.
- The first part of the message lists just the Code and Value from the Dashboard. For example:
- Code ┃ Value ┃ Message
- GyMMMd ┃ dd MMM y G ┃ …
- The messages might not be exactly what you see on the screen because parts of the message are customized.
- The links to related paths (shown in italic on this page) will open up in a separate window so that you can compare side-by-side.
- Note that some errors or warnings may be due to inherited times, sometimes between calendars.
Numeric date separators
Date ┃ - ┃ Numeric date separator conflicts with «/» from the base «d/M/y» at yMd
- The numeric date separator should be consistent with what is in the pattern for Flexible dates with the Code
yMd. - That is normally also the date separator for Codes that contain
MdoryM. However, some locales use a different separator when there are only two placeholders instead of three. - Check carefully to see whether you should change the separator or change what is in the base or other related Flexible time Codes.
- Warning: the Numeric date separator is checked against two different bases:
one is the Date format –
short, and the other is the Flexible formatyMd(or similar). If this happens, you have to fix one of those two values before you can fix this value.
Date ┃ E d/M ┃ Numeric date separator «/» in pattern conflicts with «-», the default in Date
- This warning is the reverse of the previous one;
it is on a pattern that contains
MdoryM(thus includingMEd,GyM, etc.) and compares that against the numeric date separator item. - Look at the patterns with related Codes carefully to see whether you need to change them for consistency. If the calendar is in Comprehensive coverage for your locale, it may be better to update the date separator to match the existing date formats in the calendar instead of updating all the dates.
Numeric time separators
Time ┃ . ┃ Numeric time separator conflicts with «:» from the base «H:mm:ss» at Hms
- The numeric time separator conflicts with what is in the pattern for Flexible times with the Code
Hms. - Check carefully to see whether you should change the separator or change what is in the base.
- Warning: the Numeric time separator is checked against two different bases:
one is the Time format –
short, and the other is the Flexible formatHms(or similar). If this happens, you have to fix one of those two values before you can fix this value.
Time ┃ H.mm ┃ Numeric time separator «:» in pattern conflicts with «.», the default for Date
- This warning is the reverse of the previous one;
it is on a pattern that contains
Hm,hmorms(thus includingHms,hms,hmv, etc.) and compares that against the numeric time separator item. - Look at the patterns with related Codes carefully to see whether you need to change them for consistency. If the calendar is in Comprehensive coverage for your locale, it may be better to update the time separator to match the existing time formats in the calendar instead of updating all the time formats to match.
Flexible Formats
full ┃ EEE, d, MMMM, y ┃ date-FULL → «EEE, d, MMMM, y» doesn’t match any of the corresponding flexible skeletons: [yMMMMEd → «y MMMM d, E» or yMMMEd → «E, MMM d, y»], eg yMMMEd
- The “stock” date or time format (for the 4 different widths: short, medium, long, full) has a format that doesn’t match what is in the available formats. Fix either this pattern or the flexible patterns.
- Also look carefully at the flexible patterns with related Codes to see whether you need to change them for consistency.
GyMMMd ┃ dd MMM y G ┃ «dd MMM y G» ⊅ «d MMM y»: the pattern for GyMMMd should contain the pattern at yMMMd
- There are 5 fields (G, E, B, a, and v) that are normally prefixed or suffixed to a core pattern.
- For example, in the majority of locales, if a Code like yMMM has a pattern «MMM y», then a Code like GyMMM will have a pattern like «MMM y G» or «G MMM y». That is, the literals in the pattern (the spaces in this example) may vary by locale, but the order of the placeholders in the core is retained.
Interval Formats
Bhm/h ┃ hh:mm B – hh:mm B ┃ Conflicts with «hh:mm – hh:mm B» from Bhm; diffs=[fewer]; samples=«09:35 die oggend – 10:40 die oggend», «09:35 – 10:40 die oggend»
There is also a warning for Intervals, to help identify where there may be unintentional inconsistencies between the interval formats and the related flexible format. The message has 4 different pieces of information. Here is a summary, and what it means for you is below that
- «…» is a constructed interval format.
- … is a link to the Flexible format used to construct it. (Note: the new interval separators are also used in the construction.)
- diffs=[…] provides details about the differences
- samples=«…» provides two examples of what this would look like:
- the first is using the current interval format
- the second is using the the constructed interval format.
Take an example like the following:
| Code | Available pattern | Interval Pattern | Constructed Interval Pattern |
|---|---|---|---|
| MMMMd/M | M月d日 | MMMM d – MMMM d | M月d日~M月d日 |
| MMMMd/d | M月d日 | MMMM d–d | M月d日~d日 |
The Interval Pattern in each case is unexpectedly different than the Available pattern for “MMMMd”. To help with this, a warning is given when it is different than a constructed interval pattern. That warning will provide the constructed pattern, plus status and samples.
Now, the constructed pattern might not be right for your locale (sometimes it needs a human touch), but can reveal when you can
- fix inconsistencies with the available formats, or
- restructure the pattern to get it shorter or clearer, or
- fix the related flexible format used to create the constructed pattern.
So please look at the warnings for each item in the Flexible Date or Time formats, and decide which of the above is appropriate.
NOTE: There are cases where the constructed pattern is wrong and you will need to add or vote for the correct value for your locale.
The samples are probably the most useful, but you may also find the status useful. Here is a list of the meanings.
| Abbreviation | Description of the differences |
|---|---|
| fewer | for prefix or suffix, constructed has fewer fields |
| more | for prefix or suffix, constructed has more fields |
| sep | the two separators are different; eg d-d vs d – d vs d~d |
| lit | two fields are different literals strings (not placeholders like MM); eg ‘ de ‘ vs ‘ d’ ‘ |
| type | two fields have different types; eg y vs M or y vs ‘ de ‘; can be caused by fields in different order |
| num | two fields have the same type, but one is numeric and the other isn’t; eg MMM vs M |
| width | two fields have the same type & numeric status, but are of different lengths; eg MMMM vs MMM, or d vs dd |
| other | two fields have the same type, numeric status, and length; eg L vs M |
- Look carefully at the two patterns in the two different rows to see if it would be better (or at least as good) to change the order of one or the other.
- Also look carefully at the flexible patterns with related Codes to see whether you need to change them for consistency.