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.

Numeric date separators

Date ┃ - ┃ Numeric date separator conflicts with «/» from the base «d/M/y» at yMd

Date ┃ E d/M ┃ Numeric date separator «/» in pattern conflicts with «-», the default in Date

Numeric time separators

Time ┃ . ┃ Numeric time separator conflicts with «:» from the base «H:mm:ss» at Hms

Time ┃ H.mm ┃ Numeric time separator «:» in pattern conflicts with «.», the default for Date

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

GyMMMd ┃ dd MMM y G ┃ «dd MMM y G» ⊅ «d MMM y»: the pattern for GyMMMd should contain the pattern at yMMMd

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

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

  1. fix inconsistencies with the available formats, or
  2. restructure the pattern to get it shorter or clearer, or
  3. 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