linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Syromyatnikov <evgsyr@gmail.com>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org
Subject: [PATCH] strftime.3: expand %E and %O description
Date: Fri, 14 Feb 2020 16:29:05 +0100	[thread overview]
Message-ID: <f33bd2ea6821cdc89d1f6aa798641137d9ce62e0.1581693625.git.evgsyr@gmail.com> (raw)
In-Reply-To: <cover.1581693624.git.evgsyr@gmail.com>

* man3/strftime.3 (%C): Descibe the meaning of %EC conversion
specification.
(%E): Mention the concept of "era" in description.
(%O): Mention that alternative format is related to numeric
representation.
(%y): Describe the meaning of %Ey conversion specification.
(%Y): Describe the meaning of %EY conversion specification.
(.SH DESCRIPTION): Mention that the behaviour of %E modifier is governed
by ERA locale element and provide ja_JP locale as an example.

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
---
 man3/strftime.3 | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/man3/strftime.3 b/man3/strftime.3
index 20ba057..bdbea68 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -143,6 +143,9 @@ conversion specification.)
 .TP
 .B %C
 The century number (year/100) as a 2-digit integer. (SU)
+(The
+.B %EC
+conversion specification corresponds to the name of the era.)
 (Calculated from
 .IR tm_year .)
 .TP
@@ -170,7 +173,7 @@ zero is replaced by a space. (SU)
 .IR tm_mday .)
 .TP
 .B %E
-Modifier: use alternative format, see below. (SU)
+Modifier: use alternative ("era-based") format, see below. (SU)
 .TP
 .B %F
 Equivalent to
@@ -253,7 +256,7 @@ The minute as a decimal number (range 00 to 59).
 A newline character. (SU)
 .TP
 .B %O
-Modifier: use alternative format, see below. (SU)
+Modifier: use alternative numeric symbols, see below. (SU)
 .TP
 .B %p
 Either "AM" or "PM" according to the given time value, or the
@@ -400,11 +403,20 @@ conversion specification.)
 .TP
 .B %y
 The year as a decimal number without a century (range 00 to 99).
+(The
+.B %Ey
+conversion specification corresponds to the year since the beginning of the era
+denoted by
+.B %EC
+conversion specification.)
 (Calculated from
 .IR tm_year )
 .TP
 .B %Y
 The year as a decimal number including the century.
+(The
+.B %EY
+conversion specification corresponds to the full alternative year representation.)
 (Calculated from
 .IR tm_year )
 .TP
@@ -463,7 +475,18 @@ where the effect of the
 .B O
 modifier is to use
 alternative numeric symbols (say, roman numerals), and that of the
-E modifier is to use a locale-dependent alternative representation.
+.B E
+modifier is to use a locale-dependent alternative representation.
+The rules governing date representation with the
+.B E
+modifier can be obtained by supplying
+.B ERA
+as an argument to a
+.BR nl_langinfo (3)
+library call.
+One example of such alternative forms is Japanese era calendar scheme in the
+.B ja_JP
+glibc locale.
 .SH RETURN VALUE
 Provided that the result string,
 including the terminating null byte, does not exceed
-- 
2.1.4


  parent reply	other threads:[~2020-02-14 15:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 15:28 [PATCH] Some stftime.3 and nl_langinfo.3 updates Eugene Syromyatnikov
2020-02-14 15:28 ` [PATCH] nl_langinfo.3: mention the respective strftime conversion specifications Eugene Syromyatnikov
2020-02-23 21:14   ` Michael Kerrisk (man-pages)
2020-02-14 15:28 ` [PATCH] nl_langinfo.3: add information about AM/PM time format locale elements Eugene Syromyatnikov
2020-02-23 21:15   ` Michael Kerrisk (man-pages)
2020-02-14 15:28 ` [PATCH] nl_langinfo.3: document era-related " Eugene Syromyatnikov
2020-02-23 21:23   ` Michael Kerrisk (man-pages)
2020-02-14 15:28 ` [PATCH] strftime.3: ffix Eugene Syromyatnikov
2020-02-23 21:26   ` Michael Kerrisk (man-pages)
2020-02-14 15:28 ` [PATCH] strftime.3: consistently document fall-back format string Eugene Syromyatnikov
2020-02-23 21:27   ` Michael Kerrisk (man-pages)
2020-02-14 15:29 ` [PATCH] strftime.3: refer to the relevant nl_langinfo items Eugene Syromyatnikov
2020-02-23 21:32   ` Michael Kerrisk (man-pages)
2020-02-14 15:29 ` Eugene Syromyatnikov [this message]
2020-02-23 21:43   ` [PATCH] strftime.3: expand %E and %O description Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f33bd2ea6821cdc89d1f6aa798641137d9ce62e0.1581693625.git.evgsyr@gmail.com \
    --to=evgsyr@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).