Alternative date formats

To support alternative date formats in an display format, GL_DATE accepts the conversion modifiers.

These conversion modifiers are:
  • E indicates use of an alternative era format, which the locale defines.
  • O (the letter O) indicates use of locale-defined alternative digits.

The O (the letter O) conversion modifier indicates use of locale-defined alternative digits.

These date-formatting directives can support conversion modifiers.
Date format Description
%EC Accepts either the full or the abbreviated era name for reading; for printing, %EC is replaced by the full name of the base year (period) of the era that the locale defines (same as %C if locale does not define an era).
%Eg Accepts the full or the abbreviated era name for reading. For printing, %Eg is replaced by the abbreviated name of the base year (period) of the era that the locale defines (same as %C if locale does not define an era).
%Ex Is replaced by a special date representation for an era that the locale defines (same as %x if locale does not define an era).
%Ey Is replaced by the offset from %EC of the era that the locale defines. This date is the era year only (same as %y if locale does not define an era).
%EY Is replaced by the full era year, which the locale defines (same as %Y if locale does not define an era).
%Od Is replaced by the day of the month in the alternative digits that the locale defines (same as %d if locale does not define alternative digits).
%Oe Is the same as %Od (or %e if locale does not define alternative digits).
%Om Is replaced by the month in the alternative digits that the locale defines (same as %m if locale does not define alternative digits).
%Ow Is replaced by the weekday as a single-digit number (0 through 6) in the alternative digits that the locale defines (same as %w if locale does not define alternative digits). The equivalent of zero (0) represents the locale equivalent of Sunday.
%Oy Is replaced by the year as a two-digit number (00 through 99) in the alternative digits that the locale defines (same as %y if locale does not define alternative digits). For information about how to format a year value, see the description of %y.
%OY Is the same as %EY (or %Y if locale does not define alternative digits).
The TIME category of the locale defines the following era information:
  • The full and abbreviated names for an era
  • A representation for the era (which the %Ex directive uses)

The NUMERIC category of the locale defines the alternative digits for a locale (which the %Ox formatting directives use).