Hello,

Date is a great module on which we rely heavily.

When adding a new content with a date field, selecting repeat option and specifying a weekly recurrence with interval > 1, and selecting the start date which is the first week day selected in the repeat-on days, the wrong dates are selected.

Here is a specific example.

Select Monday 2014-04-28 as the start date, repeat Monday to Friday on every second week. The generated dates will be Monday the 2014-04-28, but instead of filling the rest of days in this week, i.e. Tuesday the 2014-04-29, Wednesday the 2014-04-30 etc., the first week is skipped and the next days are Monday 2014-05-05 followed by Tuesday to Friday of the week after.

This selection of wrong week does not happen if the start date is not the first of the repeat-on days, e.g. in the example above, if the start date is Tuesday 2014-04-29, the rest of the days in this week will be selected as should.

Attached is a fix we use in our code for this. Its a one line.

Feedback appreciated.

Ron

Comments

Status: Needs review » Needs work

The last submitted patch, weekly_interval_calc.patch, failed testing.

cs_shadow’s picture

Version: 7.x-2.7 » 7.x-2.x-dev
cs_shadow’s picture

Status: Needs work » Needs review

weekly_interval_calc.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, weekly_interval_calc.patch, failed testing.

cs_shadow’s picture

StatusFileSize
new817 bytes

Attaching correctly formatted patch of #1. Also, fixed the documentation of the line added.

cs_shadow’s picture

Status: Needs work » Needs review

Marking this for review.

Status: Needs review » Needs work

The last submitted patch, 5: date-2247685-5.patch, failed testing.

Status: Needs work » Needs review

sdstyles queued 5: date-2247685-5.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 5: date-2247685-5.patch, failed testing.

sdstyles’s picture

Re-created patch to pass validation.

sanchiz’s picture

Status: Needs work » Needs review

Bot status.

Status: Needs review » Needs work

The last submitted patch, 10: date-weekly-interval-wrong-dates-2247685-8711913.patch, failed testing.

sanchiz’s picture

Need re-roll according to module folder.
See https://www.drupal.org/node/2366379

valentine94’s picture

Status: Needs work » Needs review
StatusFileSize
new651 bytes

Re-roll of #5.

Status: Needs review » Needs work

The last submitted patch, 14: weekly_interval_1-2247685-14.patch, failed testing.

dmitryVL’s picture

Status: Needs work » Needs review

bot to go

Miroling’s picture

Assigned: Unassigned » Miroling
Status: Needs review » Needs work

Bot test re-run

dmitryVL’s picture

Status: Needs work » Needs review
StatusFileSize
new651 bytes

bot to go

Status: Needs review » Needs work

The last submitted patch, 18: weekly_interval_1-2247685-18.patch, failed testing.