[pmwiki-users] ISO week number in PmCalendar

Peter Gerell boost at gerell.se
Thu May 25 11:44:00 CDT 2006

"Joachim Durchholz" <jo at durchholz.org> wrote in message 
news:4475A218.8010103 at durchholz.org...
> christian.ridderstrom at gmail.com schrieb:
>> Here's a caveat... different countries number the weeks differently.
>> Anyone that implements this needs to remember that.  (I've been bitten
>> by arranging something on week 35 according to my Yahoo calendar only to
>> find out that week 35 was actually week 36 in Sweden).
> Ah, right.
> It depends on what rules are applied wrt. the typical "half week" at the
> beginning of the years. There seem to be several strategies here:
> 1) The fractional week is counted as part of the previous year. I.e. Jan
> 1, 2006 would be in week 52/2005.
> 2) The fractional week is week zero. Jan 1, 2006 is in week 0/2006.
> 3) The fractional week is week one.
> 4) The fractional week is week one if it has four or more days.
> Otherwise, we apply strategy 1 or 3. (Strategy 2, while technically an
> option, doesn't make sense.)
> Seems like this list exhausts the possibilities (or did I overlook one?)
> Regards,
> Jo

I think you covered all possibilities. Personally I am only interrested in
ISO week numbers according to ISO 8601:2000, which happens to be
the way weeks are numbered in Sweden.
In short:
  Monday is the first day of the week.
  Week 1 is the first week of the year with 4 or more days.
Another way to state this is that the first Thursday of the year is in week 

I think this is what you call strategy 4


More information about the pmwiki-users mailing list