From patchwork Tue Sep 19 10:45:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Luzynski X-Patchwork-Id: 22940 Received: (qmail 127569 invoked by alias); 19 Sep 2017 10:46:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 101600 invoked by uid 89); 19 Sep 2017 10:45:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=Major, month X-HELO: aev204.rev.netart.pl X-Spam-Score: 2.3 Date: Tue, 19 Sep 2017 12:45:31 +0200 (CEST) From: Rafal Luzynski Reply-To: Rafal Luzynski To: libc-alpha@sourceware.org Message-ID: <1489658352.1095088.1505817931266@poczta.nazwa.pl> Subject: [RFC][PATCH v9 6/6] Documentation to the above changes (bug 10871). MIME-Version: 1.0 X-Originating-Client: com.openexchange.ox.gui.dhtml [BZ#10871] * manual/locale.texi (nl_langinfo): Document ALTMON_1..12, precise details about ABMON_1..12 and MON_1..12. * manual/time.texi (strftime): Document "%OB" and "%Ob" format specifiers, precise details about "%B" and "%b". --- ChangeLog | 8 ++++++++ NEWS | 13 +++++++++++++ manual/locale.texi | 23 ++++++++++++++++++++++- manual/time.texi | 22 ++++++++++++++++++---- 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ed2a8b..68b9e47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ 2017-09-19 Rafal Luzynski [BZ #10871] + * manual/locale.texi (nl_langinfo): Document ALTMON_1..12, + precise details about ABMON_1..12 and MON_1..12. + * manual/time.texi (strftime): Document "%OB" and "%Ob" format + specifiers, precise details about "%B" and "%b". + +2017-09-19 Rafal Luzynski + + [BZ #10871] * locale/programs/locfile-kw.h: Regenerated for ab_alt_mon. 2017-09-19 Rafal Luzynski diff --git a/NEWS b/NEWS index dd381f8..552bb7e 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,19 @@ Major new features: leads to lower overall process restart latency, so there is benefit both from a security and performance perspective. +* Support of two grammatical forms of month names has been added. + It has been precised that the month names returned by nl_langinfo with + MON_1..12 and ABMON_1..12, and formatted by strftime with "%B" and "%b" + format specifiers are in the grammatical form used when the month forms + part of a complete date. New series of valid arguments have been added + to nl_langinfo: ALTMON_1..12 and _NL_ABALTMON_1..12 and the "O" modifier + is supported with "%B" and "%b" format specifiers by strftime, they + generate the month names in the grammatical form used when the month is + named by itself. This feature is required by several languages, mostly + Slavic and Baltic but also Greek and probably more. In other languages + which do not need this feature the output month names will be the same + for both old and new arguments of nl_langinfo and strftime. + Deprecated and removed features, and other changes affecting compatibility: * On GNU/Linux, the obsolete Linux constant PTRACE_SEIZE_DEVEL is no longer diff --git a/manual/locale.texi b/manual/locale.texi index f7a40c2..b61c709 100644 --- a/manual/locale.texi +++ b/manual/locale.texi @@ -937,7 +937,8 @@ unabbreviated weekday name. @itemx ABMON_10 @itemx ABMON_11 @itemx ABMON_12 -The return value is abbreviated name of the month. @code{ABMON_1} +The return value is abbreviated name of the month, in the grammatical form +used when the month forms part of a complete date. @code{ABMON_1} corresponds to January. @item MON_1 @itemx MON_2 @@ -953,6 +954,26 @@ corresponds to January. @itemx MON_12 Similar to @code{ABMON_1} etc., but here the month names are not abbreviated. Here the first value @code{MON_1} also corresponds to January. +@item ALTMON_1 +@itemx ALTMON_2 +@itemx ALTMON_3 +@itemx ALTMON_4 +@itemx ALTMON_5 +@itemx ALTMON_6 +@itemx ALTMON_7 +@itemx ALTMON_8 +@itemx ALTMON_9 +@itemx ALTMON_10 +@itemx ALTMON_11 +@itemx ALTMON_12 +Similar to @code{MON_1} etc., but here the month names are in the grammatical +form used when the month is named by itself. The @code{strftime} functions +use this information when the modifier @code{O} is used in a format specifier +@code{B}. Here the first value @code{ALTMON_1} also corresponds to January. + +Note that in locales which do not need different grammatical forms of the +month names (including English) the return values are identical to those +returned by the corresponding @code{MON_@dots{}} values. @item AM_STR @itemx PM_STR The return values are strings which can be used in the representation of time diff --git a/manual/time.texi b/manual/time.texi index 33aa221..396934e 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -1347,7 +1347,10 @@ Emperors' reigns. @item O Use the locale's alternate numeric symbols for numbers. This modifier -applies only to numeric format specifiers. +applies only to numeric format specifiers. Additionally, as a GNU extension, +this modifier also applies to the @code{%b} and @code{%B} format specifiers +and forces the use of month names in the grammatical form used when the month +is named by itself. @end table If the format supports the modifier but no alternate representation @@ -1366,12 +1369,21 @@ The full weekday name according to the current locale. @item %b The abbreviated month name according to the current locale. +As a GNU extension, it is specified that the abbreviated month name is +produced in the grammatical form used when the month forms part of a complete +date; applying the @code{O} modifier produces the abbreviated month name in +the grammatical form used when the month is named by itself. @item %B The full month name according to the current locale. +As a GNU extension, it is specified that the full month name is produced in +the grammatical form used when the month forms part of a complete date; +applying the @code{O} modifier produces the abbreviated month name in the +grammatical form used when the month is named by itself. -Using @code{%B} together with @code{%d} produces grammatically -incorrect results for some locales. +Note that most of the locales do not need different grammatical forms of the +month names. In these locales the @code{O} modifier does not change the +results of the @code{%b} and @code{%B} specifiers. @item %c The preferred calendar time representation for the current locale. @@ -1779,7 +1791,9 @@ the full name. @itemx %B @itemx %h The month name according to the current locale, in abbreviated form or -the full name. +the full name. If the current locale requires different grammatical forms of +the month names then both forms are accepted, does not matter if the @code{O} +modifier is present or not. @item %c The date and time representation for the current locale.