Feedback on: irt.org FAQ Knowledge Base Q914
Worth:
Very worth reading
Technical:
Just right
Comments:
Hallo,
first off, congratulations for the site. An excellent resource for javascript programmers.
I am interested in hearing the about the reverse of http://developer.irt.org/script/914.htm
i.e. if I have a number between 1 and 52 (representing the week of the year) and the year, how do i compute the start and end date for that week?
Best Regards
Luca
Technical:
Just right
Comments:
Today, 1-1-01, this very useful script says it is week number 53... Changing dates to 8-1-01 makes it week number one, which is not correct. How come?
I would be glad to hear from you -and thank you for all those weeks it performed well!
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
You've made a quite nice script, but it actually calculates the week number wrong. If you run the script i.e. on January 2, 2001, it outputs week 53, which is wrong.
If you input a date in a week later, the output is "week 1" which is still wrong; it should be week 2.
This seems to be the problem all the way through the dates.
Can you bugfix it?
Thanks for some nice scripts,
Yours sincerely,
Jens Hofman Hansen
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
By the way, the bug is not browser dependent. I've checked the script in Explorer 5.5. and Netscape 4.73.
/jens
Worth:
Worth reading
Comments:
The difference in weeknumbers is due to standards:
American standard tells us that the first week is the week in which jan 1 occurs.
European standard tells us that the first week is the week with at least 4 days. This explains the difference.
Check out this faq later because i have sent in a european calculation. cheers, fer.
Worth:
Length:
Technical:
Comments:
Very useful, thank you!