![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Code Samples & Tips Share your recent discoveries and ideas with other users. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I was in need of calculating the calendar week for one of my applications. Sounds easy but finally I spent lots of hours the last days ...
![]() There are lots of algorithms and examples on the net, but most of them don't work perfectly . The treatment of fractured weeks in the beginning and end of a year can be very complicated. But now I have an algorithm that works (as far as I can tell...)It covers ISO 8601 standard (and the german DIN 1355 standard), so it should be suitable for most European countries. Calculation rules:
Therefore this algorithm will not work for countries where week starts with Sunday (USA?) or the first week bases on January 1 (UK?). More info and links here: http://en.wikipedia.org/wiki/Week Cheers, Stefan
__________________
iPAQ 6515, MDA compact |
|
||||
|
I thought that a year only had 52 weeks...always!
I don't understand how it can have #53... In Portugal, if the last week of the year as only one or two december days the it's numbered as #1 if not is the #52... I never came across a 53 week calendar!!! l
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
Cableguy, in Germany the years last always longer ...
![]() Take your PPC, start the calendar, go to the options menue, switch week numbers on. Then go back to the last days of 2004 and switch to week view. Or have a look here, it's in Portugues.
__________________
iPAQ 6515, MDA compact |
|
||||
|
Ok So then there should be also 51 weeks years, shouldn't?
For instance, 2003 last week has 3 working days, but is still week 1 of 2004 BtW 2004 1st week is kinda of a halfweek as it only has 2 working days...but that me saying ![]()
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing Last edited by Cableguy : 07-03-2007 at 04:37 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic4ppc V6.30 beta will be released next week | Erel | Announcements | 19 | 09-17-2008 09:36 PM |
| Nth Day of the Month (& numerical Day of the week) | LineCutter | Code Samples & Tips | 2 | 02-18-2008 09:04 PM |
| Calendar Control | alfcen | Questions & Help Needed | 9 | 02-12-2008 03:28 AM |
| Calendar event | Rioven | Questions & Help Needed | 7 | 08-28-2007 08:00 AM |
| Calendar control | BjornF | Questions & Help Needed | 7 | 07-05-2007 08:52 AM |