[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date feature request

From: Stephane Chazelas
Subject: Re: date feature request
Date: Tue, 31 Dec 2019 17:36:46 +0000
User-agent: NeoMutt/20180716

2019-12-31 16:37:37 +1030, Justin Zobel:
> If possible in the next release can we please have a format control to
> display the suffix for a date, ie 1st 2nd 3rd 4th.

Note that date relies on the locale information to determine the
month, day am/pm names. The standard locale information does not
have the ordinal suffixes, so date would have to maintain 
per-language rules independantly from the locale information.

In British English locales, that would be something like st for
1st, 21st,  31st, nd for 2nd, 22nd and th for the rest. In
French, er for 1er, e for the rest, etc. Some languages will not
have such suffixes, or it will generally not be applied to days
of the months, or they may use prefixes instead, etc.

It's also difficult for date to know the right language to use
based on what LC_TIME provides alone. It would likely have to use
heuristics like:

if "abday" is "Sun;Mon;Tue;Wed;Thu;Fri;Sat", use British English
suffixes... It doesn't help that that information varies between
systems for some languages.

I can't talk for the coreutils developer, but that sounds like a
hard thing to do.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]