This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] strftime: support %q to output the quarter of year


ISO 30112 will poropose %q in the new revision.
I think it is difficult for POSIX then to do something else.

Have you got standardese for the %q spec, which I can use in 30112?

Best regards
keld

On Fri, Nov 04, 2016 at 12:23:28PM +0000, 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.
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]