[Python-3000] format and datetime (original) (raw)

skip at pobox.com skip at pobox.com
Thu Sep 13 02:56:57 CEST 2007


Guido> Which ones are two letters?

All the locale-specific stuff on Solaris 10. I guess technically the first letter of the pair is a modifier of the actual code, which comes next. From the man page:

Modified Conversion Specifications Some conversion specifications can be modified by the E and O modifiers to indicate that an alternate format or specifi- cation should be used rather than the one normally used by the unmodified conversion specification. If the alternate format or specification does not exist in the current locale, the behavior will be as if the unmodified specifica- tion were used.

 %Ec      Locale's  alternate  appropriate  date   and   time
          representation.

 %EC      Name of the base  year  (period)  in  the  locale's
          alternate representation.

 %Eg      Offset from %EC  of  the  week-based  year  in  the
          locale's alternative representation.

 %EG      Full alternative representation of  the  week-based
          year.

 %Ex      Locale's alternate date representation.

 %EX      Locale's alternate time representation.

 %Ey      Offset from %EC (year only) in the locale's  alter-
          nate representation.

 %EY      Full alternate year representation.

 %Od      Day of  the  month  using  the  locale's  alternate
          numeric symbols.

 %Oe      Same as %Od.

 %Og      Week-based year (offset from %C)  in  the  locale's
          alternate  representation  and  using  the locale's
          alternate numeric symbols.

 %OH      Hour (24-hour clock) using the  locale's  alternate
          numeric symbols.

 %OI      Hour (12-hour clock) using the  locale's  alternate
          numeric symbols.

 %Om      Month using the locale's alternate numeric symbols.

 %OM      Minutes using the locale's alternate  numeric  sym-
          bols.

 %OS      Seconds using the locale's alternate  numeric  sym-
          bols.

 %Ou      Weekday as  a  number  in  the  locale's  alternate
          numeric symbols.

 %OU      Week number of the year (Sunday as the first day of
          the week) using the locale's alternate numeric sym-
          bols.

 %Ow      Number  of  the  weekday   (Sunday=0)   using   the
          locale's alternate numeric symbols.

 %OW      Week number of the year (Monday as the first day of
          the week) using the locale's alternate numeric sym-
          bols.

 %Oy      Year (offset from %C)  in  the  locale's  alternate
          representation  and  using  the  locale's alternate
          numeric symbols.

Skip



More information about the Python-3000 mailing list