From patchwork Wed Aug 21 19:39:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 34234 Received: (qmail 78183 invoked by alias); 21 Aug 2019 19:39:21 -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 78175 invoked by uid 89); 21 Aug 2019 19:39:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=noting, thereby X-HELO: esa3.mentor.iphmx.com IronPort-SDR: Q41zmkLcAVtdXPTRQPjp83fyXOXX8MECpHZYIraJ3rrzIS+s5W5FAInvTNjePR0fKXisu2H9z3 6Uq2Yy/nm+BXNbIE1In8nGS2xUaujvu62FYSQYZjPVBd2NbKCPf4BAHmAM39V7pTTKyI+16A15 hw+sz8JPpFD1pIB5SAAMcEvxVio3oc6lEOC/yTwGYJj02M7SCx8ziQOak7CQ39A4fvnjrO+wuy daqqwmrHzRmXSS7+u28OWsSKO+Ygt96OogmgnChNlgGy7WU9//M2HdZ+Wp/znsNTk0e33YoM18 qaA= IronPort-SDR: 6VpGn8kNR2CtVEPyupALJ9X8PD+jZP8EfCA3+QAb/lnrpxxoxcD7TRm2G3swtA9U/5ozfs6DYb xGVUV8jKRZeNuVPjaq+sRRznSZtZ47Ws8IQllBNKLFH+jn/aT29qyaN/ju94Jo1xAakEoNRtbI ca3dTVXzRS8KMwIvAxlqdptT3rnBBHMQI2UO0wPg+JAxD2lctHFTepGFFU8lW8+VJFO2/XvMbl dfxj4TkeV44EdLivru7aQuVSYhStLo0ZhRcRtAVlBcblBNmc/3kul7dp8EcmBhtJ08Fio4Knl8 nU4= Date: Wed, 21 Aug 2019 19:39:13 +0000 From: Joseph Myers To: Florian Weimer CC: Subject: Re: Document strftime %Ob and %OB as C2X features In-Reply-To: <87tvai2u3e.fsf@oldenburg2.str.redhat.com> Message-ID: References: <87tvai2u3e.fsf@oldenburg2.str.redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Return-Path: joseph@codesourcery.com On Thu, 15 Aug 2019, Florian Weimer wrote: > C2X (in the form of N2385) is ambiguous on the relative meaning of %B > and %OB, so the precise meaning defined in the manual is still a GNU > extension. Not sure if that matters. I do not have objection to this > patch. Here is a version of the patch that tries to clarify that issue. Document strftime %Ob and %OB as C2X features. C2X standardizes strftime %Ob and %OB support. This patch updates the glibc manual to say these are C2X features, while noting that the details of what is the alternative form of a month name are not specified in C2X. Note: C2X seems unclear to me about whether %h being equivalent to %b means %Oh is thereby allowed and equivalent to %Ob; I've asked WG14. Tested with "make info" and "make pdf". 2019-08-21 Joseph Myers * manual/time.texi (strftime): Document %Ob and %OB as C2X features. diff --git a/manual/time.texi b/manual/time.texi index bfa46dd45b..c5f5b94b67 100644 --- a/manual/time.texi +++ b/manual/time.texi @@ -1352,7 +1352,11 @@ 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, rather than the form that is appropriate when the month is used as -part of a complete date. This is a GNU extension. +part of a complete date. The @code{%OB} and @code{%Ob} formats are a +C2X feature, specified in C2X to use the locale's `alternative' month +name; @theglibc{} extends this specification to say that the form used +in a complete date is the default and the form naming the month by +itself is the alternative. @end table If the format supports the modifier but no alternative representation @@ -1372,14 +1376,16 @@ The full weekday name according to the current locale. @item %b The abbreviated month name according to the current locale, in the grammatical form used when the month is part of a complete date. -As a GNU extension, the @code{O} modifier can be used (@code{%Ob}) -to get the grammatical form used when the month is named by itself. +As a C2X feature (with a more detailed specification in @theglibc{}), +the @code{O} modifier can be used (@code{%Ob}) to get the grammatical +form used when the month is named by itself. @item %B The full month name according to the current locale, in the grammatical form used when the month is part of a complete date. -As a GNU extension, the @code{O} modifier can be used (@code{%OB}) -to get the grammatical form used when the month is named by itself. +As a C2X feature (with a more detailed specification in @theglibc{}), +the @code{O} modifier can be used (@code{%OB}) to get the grammatical +form used when the month is named by itself. Note that not all languages need two different forms of the month names, so the text produced by @code{%B} and @code{%OB}, and by