captbaritone / captbaritone/datejs
getISOWeek() not returning correct values
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. var d1=new Date(2005, 0, 1);
2. document.write(d1.getISOWeek());
What is the expected output? What do you see instead?
Since 2005-01-01 is a Saturday, and since that week has less than 4 days in
the new year, the getISOWeek function should return '53' (53rd week of the
previous year), but instead it returns '01'.
What version of the product are you using? On what operating system?
@version: 1.0 Alpha-1, @date: 2008-05-13, for all 6 files. Windows XP, SP2.
Please provide any additional information below.
getISOWeek should return '53' for the week from 2004-12-27 Mon to
2005-01-02 Sun. getISOWeek should also return '01' for the week from
2005-01-03 Mon to 2005-01-09 Mon. However, instead getISOWeek seems to
return weeks based on Fridays, i.e. it returns '01' for the range of
2004-12-31 Fri to 2005-01-06 Thu.
-George Hernandez
```
Original issue reported on code.google.com by `georgelhernandez` on 2 Oct 2008 at 8:26
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.