When navigating the 2017 calendar by weeks, (first day of week Sunday, not using ISO weeks) I noticed that when using going from 2017-W02 (2017-01-08), the previous week is 2016-W01, not 2017-W01.

The issue is that the year blindly uses the ISO year. So what could be week 52 or 53 of the previous year in ISO, is actually week 1 of the next year.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

rsmylski created an issue. See original summary.

rsmylski’s picture

Status: Active » Needs review
FileSize
5.14 KB

I've created a patch to have a function calculate the year, using some of the logic used to calculate the weeks, and updated accordingly.

rsmylski’s picture

FileSize
5.14 KB

Fixed using incorrect int_val() instead of intval()

jastraat’s picture

This fixed the issue for me with 7.x-2.10