Linux-man Archive on lore.kernel.org
 help / color / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Eugene Syromyatnikov <evgsyr@gmail.com>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org
Subject: Re: [PATCH] strftime.3: expand %E and %O description
Date: Sun, 23 Feb 2020 22:43:12 +0100
Message-ID: <a5c52866-7169-d52b-21cb-a9236f407410@gmail.com> (raw)
In-Reply-To: <f33bd2ea6821cdc89d1f6aa798641137d9ce62e0.1581693625.git.evgsyr@gmail.com>

Hello Eugene,

On 2/14/20 4:29 PM, Eugene Syromyatnikov wrote:
> * 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>

Thanks! Patch applied.

Cheers,

Michael

> ---
>  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
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply index

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 ` [PATCH] strftime.3: expand %E and %O description Eugene Syromyatnikov
2020-02-23 21:43   ` Michael Kerrisk (man-pages) [this message]

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=a5c52866-7169-d52b-21cb-a9236f407410@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=evgsyr@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /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

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git