-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Week formatter in Date filter does not comply to ISO8601 #10314
Comments
Hmm, I wonder if this shouldn't this be Locale-dependent? ISO8601 is one thing but it seems like different countries are using different notation of the first day of a week. At the same time we don't seem to have this info in the locale files... |
@pkozlowski-opensource This is a fix to match the documentation. Afterward a specific mecanism could be implemented based on the starting day of the week, but there doesn`t seem to be any ISO standard about it. Here: http://en.wikipedia.org/wiki/ISO_week_date |
@yannickadam OK, fair enough. Let's focus on your PR then! |
…O8601 Week formatter ("w" and "ww") in date filter was considering Sunday as the first day of the week. To comply with ISO8601, this has been changed to Monday. Closes angular#10314
…ting The existing documentation claims that dateFilter determines week no according to the ISO8601 standard, but this is not the case as illustrated by tests in this PR. More specifically, the implementation deviates from ISO8601 in 2 important aspects: - impl assumes Sun to be the first day of a week, ISO8601 mandates Mon - impl allows weeks 0 (for years starting on Fri, Sat) while ISO8601 would mark them as a week 52/53 of a previous year. Fixes angular#10314 Closes angular#10313
…ting The existing documentation claims that dateFilter determines week no according to the ISO8601 standard, but this is not the case as illustrated by tests in this PR. More specifically, the implementation deviates from ISO8601 in 2 important aspects: - impl assumes Sun to be the first day of a week, ISO8601 mandates Mon - impl allows weeks 0 (for years starting on Fri, Sat) while ISO8601 would mark them as a week 52/53 of a previous year. Fixes angular#10314 Closes angular#10313
…ting The existing documentation claims that dateFilter determines week no according to the ISO8601 standard, but this is not the case as illustrated by tests in this PR. More specifically, the implementation deviates from ISO8601 in 2 important aspects: - impl assumes Sun to be the first day of a week, ISO8601 mandates Mon - impl allows weeks 0 (for years starting on Fri, Sat) while ISO8601 would mark them as a week 52/53 of a previous year. Fixes angular#10314 Closes angular#10313
…ting The existing documentation claims that dateFilter determines week no according to the ISO8601 standard, but this is not the case as illustrated by tests in this PR. More specifically, the implementation deviates from ISO8601 in 2 important aspects: - impl assumes Sun to be the first day of a week, ISO8601 mandates Mon - impl allows weeks 0 (for years starting on Fri, Sat) while ISO8601 would mark them as a week 52/53 of a previous year. Fixes angular#10314 Closes angular#10313
ISO8601 mandates that a week starts on Monday, and ends on Sunday.
See plunker here: http://plnkr.co/edit/897MdGDME67aIQmLpzqZ
Fix is proposed in pull request #10313
The text was updated successfully, but these errors were encountered: