Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weeks in a year
Message
 
To
17/10/2006 17:12:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01162585
Message ID:
01162870
Views:
24
>>>I just saw my cell phone calendar (Nokia 3100)...and andvance to the year 2009 and ...bualaaaaá...: 53 Weeks.
>>>
>>>Is it wrong?...I don´t think so.
>>>
>>>Carlos Burgos
>>
>>Carlos,
>>
>>The problem is that the "week" may be considered differently (depending on what is the first day of the week, whether one need to count partial week, etc). This will give you expected 53:
>>
>>?week({^2009-12-31},3,DOW({^2009-01-01}))   &&53
>>
>>
>>But it is not the default approach used by foxpro.
>
>Accourting to you formula, all years have 53.

It is not "my" formula. If you divide the number of days in the year by 7 (which is the number of days in the week) you get:

? 365/7 && 52 and 1/7

So, depending on the definition of the "week of year", one may consider the remaining one day (1/7 of the week) as the start of the new week inside the same year.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform