diff mbox series

[v5,5/5] strftime: Document the description for "%EC", "%Ey", and "%EY" [BZ #23758]

Message ID 201901060635.AA04161@tamuki.linet.gr.jp
State New
Headers show
Series strftime: Improve the width of alternate representation for year [BZ #23758] | expand

Commit Message

TAMUKI Shoichi Jan. 6, 2019, 6:35 a.m. UTC
Document the description for "%EC", "%Ey", and "%EY" for strftime.
Also, fix the wording to "alternative" rather than "alternate".

ChangeLog:

	[BZ #23758]
	* NEWS: Mention the change.
	* manual/time.texi (strftime): Document the desctiption for "%EC",
	"%Ey", and "%EY". Also, fix the wording to "alternative" rather than
	"alternate".
---
 NEWS             |  7 +++++++
 manual/time.texi | 21 ++++++++++++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index 4c8bc924ce3..835f5c2ba22 100644
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,13 @@  Major new features:
     - C-SKY ABIV2 soft-float little-endian
     - C-SKY ABIV2 hard-float little-endian
 
+* Improve the width of alternative representation for year in
+  strftime.  For %Ey conversion specifier, the default action is now
+  to pad the number with zero to keep minimum 2 digits, similar to %y.
+  Also, the optional flag (either _ or -) can be used for %EY, so that
+  the internal %Ey is interpreted as if decorated with the appropriate
+  flag.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * The glibc.tune tunable namespace has been renamed to glibc.cpu and the
diff --git a/manual/time.texi b/manual/time.texi
index 4d154452eba..6c3bfebb8a0 100644
--- a/manual/time.texi
+++ b/manual/time.texi
@@ -1339,7 +1339,7 @@  POSIX.2-1992 and by @w{ISO C99}, are:
 
 @table @code
 @item E
-Use the locale's alternate representation for date and time.  This
+Use the locale's alternative representation for date and time.  This
 modifier applies to the @code{%c}, @code{%C}, @code{%x}, @code{%X},
 @code{%y} and @code{%Y} format specifiers.  In a Japanese locale, for
 example, @code{%Ex} might yield a date format based on the Japanese
@@ -1347,7 +1347,7 @@  Emperors' reigns.
 
 @item O
 With all format specifiers that produce numbers: use the locale's
-alternate numeric symbols.
+alternative numeric symbols.
 
 With @code{%B}, @code{%b}, and @code{%h}: use the grammatical form for
 month names that is appropriate when the month is named by itself,
@@ -1355,7 +1355,7 @@  rather than the form that is appropriate when the month is used as
 part of a complete date.  This is a GNU extension.
 @end table
 
-If the format supports the modifier but no alternate representation
+If the format supports the modifier but no alternative representation
 is available, it is ignored.
 
 The conversion specifier ends with a format specifier taken from the
@@ -1393,6 +1393,9 @@  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}), the locale's
+alternative representation for year (the era name) is used instead.
+
 This format was first standardized by POSIX.2-1992 and by @w{ISO C99}.
 
 @item %d
@@ -1568,10 +1571,22 @@  The preferred time of day representation for the current locale.
 The year without a century as a decimal number (range @code{00} through
 @code{99}).  This is equivalent to the year modulo 100.
 
+If the @code{E} modifier is specified (@code{%Ey}), the locale's
+alternative representation for year (the era year) is used instead.
+The default action is to pad the number with zero to keep minimum 2
+digits, similar to @code{%y}.
+
 @item %Y
 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}), the locale's
+alternative representation for year (generally the combination of
+@code{%EC} and @code{%Ey}) is used instead.  In this case, the
+optional flag (either @code{_} or @code{-}) can be used, so that the
+internal @code{%Ey} is interpreted as if decorated with the
+appropriate flag.
+
 @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