From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73462 invoked by alias); 4 Nov 2016 12:58:45 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 73446 invoked by uid 89); 4 Nov 2016 12:58:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*RU:sk:mail.ma, Hx-spam-relays-external:sk:mail.ma, H*r:sk:mail.ma X-HELO: mail.magicbluesmoke.com Subject: Re: [PATCH] strftime: support %q to output the quarter of year To: Szabolcs Nagy , libc-alpha@sourceware.org References: <1478202401-5238-1-git-send-email-P@draigBrady.com> <581C73EA.9010708@arm.com> <0788277a-664d-0515-519a-20503fe7b66b@draigBrady.com> <581C7A1D.1050604@arm.com> <9877d75d-37b2-15e9-9be8-b4d178813eec@draigBrady.com> <581C81FA.4070000@arm.com> Cc: nd@arm.com From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: Date: Fri, 04 Nov 2016 12:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <581C81FA.4070000@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-11/txt/msg00151.txt.bz2 On 04/11/16 12:41, Szabolcs Nagy wrote: > On 04/11/16 12:23, Pádraig Brady wrote: >> On 04/11/16 12:07, Szabolcs Nagy wrote: >>> On 04/11/16 12:00, Pádraig Brady wrote: >>>> On 04/11/16 11:41, Szabolcs Nagy wrote: >>>>> On 03/11/16 19:46, Pádraig Brady wrote: >>>>>> This is already supported by gnulib. >>>> >>>>> why? >>>> >>>> It's a marginal benefit, but as >>>> noted in the cover of my updated patch: >>>> >>>> "Note even though the code is trivial here, >>>> %q is useful from the shell as there you need to: >>>> $(( ($(date +%-m)-1)/3+1 ))". >>>> >>>> I'll add that to the actual commit. >>> >>> this can conflict with future standard, so >>> there need to be a strong reason for adding >>> such extensions to portability libraries >>> such as gnulib or to c runtimes. >>> >>> how does gnulib plan to deal with the conflict >>> once posix adds %q with different meaning? >> >> Perl's date lib also uses %q for quarter. > > i don't know what "Perl's date lib" is, > the perl DateTime module does not seem to support %q. > https://metacpan.org/pod/DateTime#strftime-Patterns Sorry Perl's Date::Format supports %q https://metacpan.org/pod/Date::Format#CONVERSION-SPECIFICATION