Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Issue #3307 fix - DatePeeker weeks #3321

Closed
wants to merge 4 commits into from

Conversation

yanivefraim
Copy link

Issue #3307 fix - DatePeeker weeks - wrong date sent to "getISO8601WeekNumber" method.
Should be the last week's day, and not the first (otherwise on start of a new year it will send a date of one of last year's days, and will get end of last year's weeks)
For example:
The fist week of January 2015 starts at Thursday. The date sent to "getISO8601WeekNumber" was of the first day of the week (28.12.2014), returning the weeks of last year's December!

…8601WeekNumber" method.

Should be the last week's day, and not the first (otherwise on start of a new year it will send a date of one of last year's days, and will get end of last year's weeks)
@rodrik
Copy link

rodrik commented Feb 22, 2015

Does not fix completely. In December still there are weeks 53 and 54. After W52 it should restart W1 again.

0zxouin

@yanivefraim
Copy link
Author

@rodrik @karianna :
Hey, for some reason Datepicker stopped working for me. I tried different branch, forking again etc. Nothing is working for me. Any idea? does it work for you guys? (I want to fix this issue and cannot complete it)

BTW - the error is:
https://docs.angularjs.org/error/ng/areq?p0=MainCtrl&p1=not%20a%20function,%20got%20undefined

@yanivefraim
Copy link
Author

OK - fixed the number of weeks @ the end of the year (will end in week 52 and start over from week 1 again)

@yanivefraim
Copy link
Author

Related: #2306, #3158, #3148

@chrisirhc
Copy link
Contributor

Closing this in favor #2306 as it makes no assumption of startingDay whereas this fix always picks the 6th day in the row, which may be a Sunday and lead to a wrong week number. I think it's least surprising to show the week number for the Thursday of the row.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants