linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marko Myllynen <myllynen@redhat.com>
To: mtk.manpages@gmail.com
Cc: Petr Baudis <pasky@ucw.cz>,
	GNU C Library <libc-alpha@sourceware.org>,
	linux-man <linux-man@vger.kernel.org>,
	libc-locales@sourceware.org
Subject: Re: [PATCH] locale.5: document glibc conventions regarding days and week
Date: Wed, 28 May 2014 17:19:51 +0300	[thread overview]
Message-ID: <5385F087.2060602@redhat.com> (raw)
In-Reply-To: <CAKgNAkivXL4KwJoL9ZzEoc91zMx2sonKh=8ZV22Waa8BrWf6bQ@mail.gmail.com>

Hi,

On 2014-05-28 14:54, Michael Kerrisk (man-pages) wrote:
> 
> Looking at this patch more closely, there's a piece that seems to be broken.
> 
> That sentence is garbled. Some words are missing, I think. Can you clarify?

it was clumsy indeed, and also repetitive, I don't think it's needed at all as the previous paragraph already explains the same thing.

Please see an updated and rebased patch below.

>From 19a2e938158ffb94b0265968c6213a16b5179985 Mon Sep 17 00:00:00 2001
From: Marko Myllynen <myllynen@redhat.com>
Date: Wed, 28 May 2014 17:18:15 +0300
Subject: [PATCH] locale.5: document glibc conventions regarding days and week

Based on existing practice and glibc community wiki page at

https://sourceware.org/glibc/wiki/Locales
---
 man5/locale.5 |   59 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/man5/locale.5 b/man5/locale.5
index 6f0538a..754a4e0 100644
--- a/man5/locale.5
+++ b/man5/locale.5
@@ -975,6 +975,7 @@ The list starts with the first day of the week
 as specified by
 .I week
 (Sunday by default).
+See NOTES.
 .TP
 .I day
 followed by a list of names of the days of the week.
@@ -982,6 +983,7 @@ The list starts with the first day of the week
 as specified by
 .I week
 (Sunday by default).
+See NOTES.
 .TP
 .I abmon
 followed by a list of abbreviated month names.
@@ -1020,16 +1022,7 @@ Regarding the start of the week,
 shall be used for Sunday and
 .B 19971201
 shall be used for Monday.
-Thus, countries using
-.B 19971130
-should have local Sunday name as the first day in the
-.I day
-list,
-while countries using
-.B 19971201
-should have Monday translation as the first item in the
-.I day
-list.
+See NOTES.
 .TP
 .IR first_weekday " (since glibc 2.2)"
 followed by the number of the first day from the
@@ -1041,6 +1034,7 @@ corresponds to either Sunday or Monday depending
 on the value of the second
 .I week
 list item.
+See NOTES.
 .TP
 .IR first_workday " (since glibc 2.2)"
 followed by the number of the first working day from the
@@ -1048,6 +1042,7 @@ followed by the number of the first working day from the
 list.
 The default value is
 .BR 2 .
+See NOTES.
 .TP
 .I cal_direction
 .\" from localedata/locales/uk_UA
@@ -1080,6 +1075,50 @@ Usual default locale archive location.
 .TP
 .I /usr/share/i18n/locales
 Usual default path for locale definition files.
+.SH NOTES
+The collective GNU C library community wisdom regarding
+.IR abday ,
+.IR day ,
+.IR week ,
+.IR first_weekday ,
+and
+.I first_workday
+states at
+https://sourceware.org/glibc/wiki/Locales
+the following:
+.PP
+The value of the second
+.I week
+list item specifies the base of the
+.I abday
+and
+.I day
+lists.
+.PP
+.I first_weekday
+specifies the offset of the first day-of-week in the
+.I abday
+and
+.I day
+lists.
+.PP
+For compatibility reasons, all glibc locales should set the value of the
+second
+.I week
+list item to
+.B 19971130
+(Sunday) and base the
+.I abday
+and
+.I day
+lists appropriately, and set
+.I first_weekday
+to
+.B 1
+or
+.BR 2 ,
+depending on whether the week actually starts on Sunday or Monday
+for the locale.
 .SH CONFORMING TO
 POSIX.2, ISO/IEC TR 14652.
 .SH BUGS
-- 
1.7.1

Thanks,

-- 
Marko Myllynen

  reply	other threads:[~2014-05-28 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  5:51 [PATCH] locale.5: document glibc conventions regarding days and week Marko Myllynen
     [not found] ` <5382D64A.9020404-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-26  8:43   ` Michael Kerrisk (man-pages)
2014-05-28 11:54   ` Michael Kerrisk (man-pages)
2014-05-28 14:19     ` Marko Myllynen [this message]
     [not found]       ` <5385F087.2060602-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-28 14:30         ` Michael Kerrisk (man-pages)
2014-05-28 14:56           ` Marko Myllynen
     [not found]             ` <5385F92F.5040301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-28 15:03               ` Michael Kerrisk (man-pages)
     [not found]                 ` <CAKgNAki=f8trD6a0DMV8SPJzQYFgSY1=5XsaVmVvvbDoFXX2QQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-28 15:15                   ` Marko Myllynen
     [not found]                     ` <5385FD8C.2060400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-05-28 15:19                       ` 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=5385F087.2060602@redhat.com \
    --to=myllynen@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-locales@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=pasky@ucw.cz \
    /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).