month/week format (was: [imp] summary is broken)
Jan Schneider
janmailing@gmx.de
Thu, 12 Jul 2001 14:31:27 +0000
OK, this is what I found out:
--snip--
In [ISO8601], the week number is defined by:
- weeks start on a monday
- week 1 of a given year is the one that includes the first Thursday of that
year. (or, equivalently, week 1 is the week that includes 4 January.)
This means that the days before week 1 in a given year are attributed to the
last week of the previous year. Also the days that come after the last week of
a given year are attributed to the first week of the next year.
--snip--
This leeds to one problem: In ISO there is no week starting on Sunday. But it
makes sense to calculate weeknumbers the same way and just let the Sunday
belong to the week of the following Monday.
Does this fit to American weeknumbers?
If so we just have to modify the weekOfYear function.
Jan.
Zitat von Cliff Green <green@UMDNJ.EDU>:
> Quoting Jan Schneider <janmailing@gmx.de>:
>
> > I took a quick look into your code and found that the week numbers change
> > in the month view if you select another week start.
> > Since I don't have an American calendar at hand I'm not sure if this is
> > correct. Could you please find it out?
>
> Yes, definitely. The week is offset by one and is wrong. I can insert an
> offset into month.php and everything is okay except the last week of any
> given
> month is displayed as (Week 0). Very Frustrating.
>
> Interestingly, there's a comment in Kronolith.php, in the weekOfYear
> function:
> "Returns week of the year, first Monday is first day of first week". I've
> searched through the php sources and the libmcal sources, but haven't
> figured
> out how to set this to another start date. I'd guess that if this could be
>
> reset (from one's prefs), then the rest would calculate properly and less
> patching would be needed.
>
> <sigh> More later.
>
> c
> --
> Cliff Green
> Academic Computing Services - UMDNJ
> signature under NDA
>
>
> -----------------------------------------------------
> This mail sent through IMP: the Internet Mail Program
>
>
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::