Re: Week start day in locale def?
- From: "D. Dale Gulledge" <dsplat rochester rr com>
- To: =?UTF-8?B?w4VzbXVuZCBTa2rDpnZlbGFuZA==?= <aasmunds ulrik uio no>,GNOME i18n list <gnome-i18n gnome org>
- Subject: Re: Week start day in locale def?
- Date: Fri, 09 Jan 2004 11:44:28 -0500
Åsmund Skjæveland wrote:
> Do locales contain which weekday the week starts on? Americans
> apparently like to start their weeks on Sunday, while Norwegians prefer
> to wait until Monday to start a new week. Is week-numbering covered by
> the locale defs?
It appears that the answer is yes to specifying the start of the week.
As for the week of the year, that is indirectly specified with the date
format. I think the parameters you are looking for are first_weekday
and d_fmt. If you want the week of the year as part of the date
format, you use the %U, %V or %W format. They all give a week number,
but they differ in how they calculate it. You can find a description of
their use in the strftime man page.
Try this command in your favorite locale:
$ locale -k -c LC_TIME
My output for the C locale under Debian woody was:
LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
am_pm="AM;PM"
d_t_fmt="%a %b %e %H:%M:%S %Y"
d_fmt="%m/%d/%y"
t_fmt="%H:%M:%S"
t_fmt_ampm="%I:%M:%S %p"
era=
era_year=""
era_d_fmt=""
alt_digits=
era_d_t_fmt=""
era_t_fmt=""
time-era-num-entries=0
time-era-entries=""
week-ndays=7
week-1stday=19971130
week-1stweek=4
first_weekday=7
first_workday=1
cal_direction=1
timezone=""
date_fmt="%a %b %e %H:%M:%S %Z %Y"
time-codeset="ANSI_X3.4-1968"
--
D. Dale Gulledge, Sr. Programmer,
dsplat@rochester.rr.com
C, C++, Perl, Unix (QNX, AIX, Linux), Oracle, Java,
Internationalization (i18n), Lisp, HTML, CGI.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]