Week Number is wrong
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Week Number is wrong
Scott,
The Week Number from the System Time device is showing 3. I am sure that this is correct for the USA, but here in Europe we are living in week number 4. Not sure if you even want to address this, but you could calculate for the correct Week Number by interpreting the Lat / Long settings.
I will strip the display of the week number in my theme and replace it by the one I calculate myself. Last year was OK, but now it is wrong for Europe.
The Week Number from the System Time device is showing 3. I am sure that this is correct for the USA, but here in Europe we are living in week number 4. Not sure if you even want to address this, but you could calculate for the correct Week Number by interpreting the Lat / Long settings.
I will strip the display of the week number in my theme and replace it by the one I calculate myself. Last year was OK, but now it is wrong for Europe.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
I did some searching and it appears that the USA should also be in week 4 now. My setup is showing week 3 and I am positive this is not going to change tomorrow because all of last week was showing week 2 whereas it should have been week 3. So we are one number short on the Week Number. Do you see the same?
Well.... it works as documented.
I admit that making it 0 based was probably not the most intuitive design.
Code: Select all
Week Number Displays the current week number of the year with Monday as first day of week (0 – 53).
Scott
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
It should have been correct last year too. It's just using a standard library function to get this info, so I'm thinking it should be correct.
I do admit, it was probably not the best decision to leave it 0 based. I can probably change it, but it could mess up a Task or script someone has. Although I doubt that too many folks actually use it for anything.
I do admit, it was probably not the best decision to leave it 0 based. I can probably change it, but it could mess up a Task or script someone has. Although I doubt that too many folks actually use it for anything.
Scott
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
And so does the girlfriend. For some reason we (at work) seem to be the only ones using it. Our complete business planning is done using weeknumers so I figured it was a nice thing to display in my theme to keep better track of these numbers. I will check some old screenshots I took last year to see if the weeknumber fits the date.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
I posted my first message last monday and it was off by 1. The screenshot I took was from a wednesday.
It just (15 minutes ago) turned to 4 here in Europe and it should be 5, but that is because it's zero based. Still doesn't explain the wednesday on july 11 2007.
Anyways, let it be but just keep it min mind. Maybe someday this minor thing will trigger something.
I will keep on using my own week calculation in script because just adding 1 to the system time.current week might set it wrong again next year.
Maybe I will test this on another PC and fiddle with the date on that PC to see what happens in 2007, 2008 and 2009. I might come up with something. If so, I will repost here.
It just (15 minutes ago) turned to 4 here in Europe and it should be 5, but that is because it's zero based. Still doesn't explain the wednesday on july 11 2007.
Anyways, let it be but just keep it min mind. Maybe someday this minor thing will trigger something.
I will keep on using my own week calculation in script because just adding 1 to the system time.current week might set it wrong again next year.
Maybe I will test this on another PC and fiddle with the date on that PC to see what happens in 2007, 2008 and 2009. I might come up with something. If so, I will repost here.
Re: Week Number is wrong
Hi all,
I think this is more a matter of perception and how weeknumbers is used. Not every country (or even region) uses the same calculation method.
In Outlook's Calendar you can show the weeknumbers and define how they should be calculated (in Calendar options).
Three options exist for "first week of the year":
- First full week
- First 4-day week
- Start on January 1st
With the current calculation, dependent on which day January first falls it could seem correct 1 year and wrong the next when compared to other's 'usage'. Something that could be added in a next release?
Side note: Nothing wrong with having 0-based numbering... this is sooooo common in C programming when working with arrays
I think this is more a matter of perception and how weeknumbers is used. Not every country (or even region) uses the same calculation method.
In Outlook's Calendar you can show the weeknumbers and define how they should be calculated (in Calendar options).
Three options exist for "first week of the year":
- First full week
- First 4-day week
- Start on January 1st
With the current calculation, dependent on which day January first falls it could seem correct 1 year and wrong the next when compared to other's 'usage'. Something that could be added in a next release?
Side note: Nothing wrong with having 0-based numbering... this is sooooo common in C programming when working with arrays

-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Week Number is wrong
Scott,
Now that we are in 2009 I got to check this again in a different year and it is still off by 1. Makes sense since it is zero based. Still no clue why 2007 was correct though. My question: Are going to add a 1 to the zero based value, or are you going to leave it the way it is (actually wrong so to speak)? If so, I will add the one myself.
@Whistler:
Yeah, nothing wrong with zero based values. I love them myself, but in this case it just doesn't make much sense since it is used for display and not for arrays. You could always subtract 1 again to get it zero based. It just makes more sense when it is correct especially since you don't notice easily that it is zero based when you start using it.
Now that we are in 2009 I got to check this again in a different year and it is still off by 1. Makes sense since it is zero based. Still no clue why 2007 was correct though. My question: Are going to add a 1 to the zero based value, or are you going to leave it the way it is (actually wrong so to speak)? If so, I will add the one myself.
@Whistler:
Yeah, nothing wrong with zero based values. I love them myself, but in this case it just doesn't make much sense since it is used for display and not for arrays. You could always subtract 1 again to get it zero based. It just makes more sense when it is correct especially since you don't notice easily that it is zero based when you start using it.
Re: Week Number is wrong
It was just a low priority issue on my list that I never got to. I'll probably fix it at some point, but I can't say when.
Scott
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: Week Number is wrong
OK and thanks. However this strikes me as the easiest fix in HouseBot history 
