diff options
author | TAMUKI Shoichi <tamuki@linet.gr.jp> | 2019-01-24 23:04:12 +0900 |
---|---|---|
committer | TAMUKI Shoichi <tamuki@linet.gr.jp> | 2019-01-24 23:04:12 +0900 |
commit | 32f600a27275ec7a315cbbc465cb19b06b44f9b8 (patch) | |
tree | afb54923738a2adab619d19877e20707663127a0 /manual/time.texi | |
parent | b22eed371086b297adf9c1509850649de883d77b (diff) | |
download | glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.tar glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.tar.gz glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.tar.bz2 glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.zip |
strftime: Pass the additional flags from "%EY" to "%Ey" [BZ #24096]
The full representation of the alternative calendar year (%EY)
typically includes an internal use of "%Ey". As a GNU extension,
apply any flags on "%EY" (e.g. "%_EY", "%-EY") to the internal "%Ey",
allowing users of "%EY" to control how the year is padded.
Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>
Reviewed-by: Zack Weinberg <zackw@panix.com>
ChangeLog:
[BZ #24096]
* manual/time.texi (strftime): Document "%EC" and "%EY".
* time/Makefile (tests): Add tst-strftime2.
(LOCALES): Add ja_JP.UTF-8, lo_LA.UTF-8, and th_TH.UTF-8.
* time/strftime_l.c (__strftime_internal): Add argument yr_spec to
override padding for "%Ey".
If an optional flag ('_' or '-') is specified to "%EY", interpret the
"%Ey" in the subformat as if decorated with that flag.
* time/tst-strftime2.c: New file.
Diffstat (limited to 'manual/time.texi')
-rw-r--r-- | manual/time.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/manual/time.texi b/manual/time.texi index 03a8a0e10f..6d398bfe1f 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -1393,6 +1393,10 @@ The preferred calendar time representation for the current locale. The century of the year. This is equivalent to the greatest integer not greater than the year divided by 100. +If the @code{E} modifier is specified (@code{%EC}), instead produces +the name of the period for the year (e.g.@: an era name) in the +locale's alternative calendar. + This format was first standardized by POSIX.2-1992 and by @w{ISO C99}. @item %d @@ -1579,6 +1583,13 @@ can be overridden by an explicit field width or by the @code{_} and The year as a decimal number, using the Gregorian calendar. Years before the year @code{1} are numbered @code{0}, @code{-1}, and so on. +If the @code{E} modifier is specified (@code{%EY}), instead produces a +complete representation of the year according to the locale's +alternative calendar. Generally this will be some combination of the +information produced by @code{%EC} and @code{Ey}. As a GNU extension, +the formatting flags @code{_} or @code{-} may be used with this +conversion specifier; they affect how the year number is printed. + @item %z @w{RFC 822}/@w{ISO 8601:1988} style numeric time zone (e.g., @code{-0600} or @code{+0100}), or nothing if no time zone is |