There is a standard for calculating weeknumbers. It is in an ISO standard,
but I do not know the number of it. I implemented it in another application
a while back. I got it from the NNI, the Dutch national 'ISO' which follows
the ISO standards on this.

The standard: the first day for calculating is the monday. If four or more
days are in the old year, then the week is the last week of the old year. If
four or more days are in the new year then it is the first week of a new
year.
I concluded from this that the Thursday is crucial: if it in a new year then
it is week 1.

Gijs Reulen

> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Tim Cook
> Verzonden: donderdag 3 augustus 2000 6:34
> Aan: David Coe; Zope List
> Onderwerp: Re: [Zope] Retrieving the week number with DateTime
>
>
> David Coe wrote:
> >
> > I suspect there is no 'standard' definition of week number.
> >
>
> I asked this on a list with a bunch of accounting types and got
> the same reply.  It is 'generally' associated with payroll or tax
> periods.
>
> Once you have a 'definition' for Jan 1 of the current year and
> the day of the week that 'your' week starts on then you could use
> David's suggestion(s).
> Either you or your customer has to define those two things first.
>
> -- Tim Cook --
> FreePM Project Coordinator - http://www.freepm.org
> OS Healthcare Alliance Supporter - http://www.oshca.org
>
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to