View Single Post
  #7  
Old 02-21-2002, 12:30 AM
andyho andyho is offline
Senior Member
 
Join Date: Jul 2001
Posts: 1,446
Default RE: DateToWeek function?

Keep in mind there are several different definitions on how to calculate the week number. In some cultures the week starts with Sunday (especially the jewish one as Sunday is the first working day there), other at Monday. And the first week of a year can be either that one which contains January 1st, or the one which has more days in the new year then in the old year. Borland's code uses the ISO week number definition which has Monday as first day and first week as the one containing January 4th (that means it's more in the new year then the old one). For more informations about this topic see http://www.merlyn.demon.co.uk/weekinfo.htm - it even has some source code there for the various definitions, as well as hints how to implement week counting...

Bye,
Andy
Reply With Quote