Re: glib1.3.5 : g_date_xxxx_week_of_year
- From: Havoc Pennington <hp redhat com>
- To: GHF <jean-noel guiheneuf wanadoo fr>
- Cc: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: glib1.3.5 : g_date_xxxx_week_of_year
- Date: 26 Jun 2001 13:56:01 -0400
GHF <jean-noel guiheneuf wanadoo fr> writes:
>
> The g_date_get_sunday_week_of_year routine returns 0 if the day is
> before the first Sunday of the year.
> The g_date_get_monday_week_of_year routine returns 0 if the day is
> before the first Monday of the year.
>
> But the ISO 8601 rule is : The first week of the year is the week
> containing the first Thursday.
>
> See : http://personal.ecu.edu/mccartyr/aboutwdc.htm
>
I believe that what the ISO spec says is "you should use thursday
weeks", while these functions implement sunday weeks and monday weeks.
i.e. your behavior would be right for
g_date_get_thursday_week_of_year().
Though at that point, maybe g_date_get_week_of_year() taking a day of
the week argument would be appropriate.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]