From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77575 invoked by alias); 4 Nov 2016 12:23:32 -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 77558 invoked by uid 89); 4 Nov 2016 12:23:32 -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, Hx-languages-length:1025 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> Cc: nd@arm.com From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <9877d75d-37b2-15e9-9be8-b4d178813eec@draigBrady.com> Date: Fri, 04 Nov 2016 12:23: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: <581C7A1D.1050604@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-SW-Source: 2016-11/txt/msg00148.txt.bz2 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. So between that and gnulib (and glibc?) POSIX would be unlikely to choose %q for something else. In any case I intend to propose it to the POSIX folks. thanks, Pádraig