[pmwiki-users] ISO week number in PmCalendar

Joachim Durchholz jo at durchholz.org
Thu May 25 07:24:56 CDT 2006

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?)


More information about the pmwiki-users mailing list