Re: Talk about glibc locale format
On Tue, Jul 05, 2005 at 08:40:45AM +0200, Denis Barbier wrote:
> On Tue, Jul 05, 2005 at 02:01:39AM +0200, Keld Jørn Simonsen wrote:
> > As far as I can tell, LC_TIME *is* backwards compatible, in the sense
> > that conforming POSIX specs will be valid and work as intended with
> > 14652 semantics.
> > But if there is added functionality, then you need added support.
> > This is also true for the extensions eg in LC_COLLATE which cannot be
> > handled with POSIX. In general one cannot expect that at 14652 locale
> > can be handled by POSIX. However the other way around should work
> > without any problems, a valid POSIX locale should work unchanged, and as
> > intended in POSIX, with the 14652 semantics. That is my definition of
> > backwards compatibility, and what we tried hard to assure was
> > accomplished in 14652.
> Programers use nl_langinfo() to access to locale information, but they
> have no standard way to determine if nl_langinfo(DAY_1) refers to Sunday
> or Monday. Moreover all existing cal-like programs get instantly broken
> if nl_langinfo(DAY_1) becomes Monday instead of Sunday, which is why I
> am stating that ISO 14652 is breaking compatibility, not adding
> It would IMHO have been much better to define new keywords when
> POSIX definitions are altered in such an incompatible way.
The change with Monday first was because we got a number of comments
saying that it was not logical to specify Sunday first, for a number of
cultures. So we figured that people want to specify their first
Anyway,could the programmers of cal obtain the parameters of the week
keyword and then handle the day names accordingly?
Is this the problem, that they cannot obtain the "week" line in a
Then one could ahve 3 keywords instead
weeklength 7 # indicating a normal week length of 7 days)
firstweekbegin 4 # a Thursday
firstdayofweek 19971201 # a Monday
The cal programmer then needs to do some programming.
It should be easy to determine what day the firstdayofweek is
in the range 1 thru weeklength (normally Monday thru Sunday).
A calender should display the week number with the calender
so that needs to be computed, the start of the first week.
Then the calender should be displayable.
I don't think that you need more info than this, and all this is not
But maybe people get confused by requiring Monday=1, Sunday=7 ?
But this is standard ISO 8601, and what is the case in most of the
Given the importance of time and calendars, and also week numbers,
this is functionlity that should be implemented. Maybe there is better
way to specify it,
So you suggest other keywords?
intabday "ma","ti","on","to","fr","lø","sø" # Danish
Should I then also have:
That would seem completely unnecessary as just a duplication of the