Ticket #2263 (closed bug: fixed)
Error in calculate week - UI Datepicker
| Reported by: | JesperSJensen | Owned by: | kbwood |
|---|---|---|---|
| Priority: | major | Milestone: | 1.2.3 |
| Component: | ui | Version: | 1.2.2 |
| Keywords: | datepicker | Cc: | |
| Blocking: | Blocked by: |
Description
Error in calculating week number.
2 weeks number 13 in 2008
zero week number 43 in 2008
and so forth...
Solution:
The following statement in function iso8601Week:
return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1;
should be
return Math.floor((Math.round((checkDate - firstMon) / 86400000)) / 7) + 1;
regards, Jesper
Change History
comment:2 Changed 5 years ago by kbwood
- Owner changed from iMarc to kbwood
- Status changed from new to assigned
I can't replicate this problem. What browser and operating system are you using?
comment:3 Changed 5 years ago by JesperSJense
Using http://marcgrabanski.com/code/ui-datepicker/ (Misc.1) March 2008. Operating system: Windows XP Professional Version 2002 Service Pack 2 Browser with error: IE 7.0.5730.11 Firefox 2.0.0.12 Opera 9.23 Not tested: Safari and others...
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
