
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
Comment | File | Size | Author |
---|---|---|---|
#18 | weekly_interval_1-2247685-18.patch | 651 bytes | dmitryVL |
#14 | weekly_interval_1-2247685-14.patch | 651 bytes | valentine94 |
Comments
Comment #2
cs_shadow CreditAttribution: cs_shadow commentedComment #3
cs_shadow CreditAttribution: cs_shadow commentedweekly_interval_calc.patch queued for re-testing.
Comment #5
cs_shadow CreditAttribution: cs_shadow commentedAttaching correctly formatted patch of #1. Also, fixed the documentation of the line added.
Comment #6
cs_shadow CreditAttribution: cs_shadow commentedMarking this for review.
Comment #10
sdstyles CreditAttribution: sdstyles commentedRe-created patch to pass validation.
Comment #11
sanchiz CreditAttribution: sanchiz commentedBot status.
Comment #13
sanchiz CreditAttribution: sanchiz commentedNeed re-roll according to module folder.
See https://www.drupal.org/node/2366379
Comment #14
valentine94Re-roll of #5.
Comment #16
dmitryVL CreditAttribution: dmitryVL at DEWEB Studio for Drupal Ukraine Community commentedbot to go
Comment #17
Miroling CreditAttribution: Miroling at Drupal Ukraine Community for Drupal Ukraine Community commentedBot test re-run
Comment #18
dmitryVL CreditAttribution: dmitryVL at DEWEB Studio for Drupal Ukraine Community commentedbot to go