github bruxy70/Garbage-Collection 3.02-beta
Fix even/odd weeks in January, New Feature: offset, holiday_in_week_move improvement

latest releases: 4.10.2, 4.10.2b1, 4.10.1...
pre-release4 years ago

New feature

Testing new parameter - offset. What it does is, it adds or subtracts a given number of days to the calculated date.
It could be used for example to schedule for the last weekday of the month (this is currently not possible - you can schedule for example for 1st Saturday of the month (or 2nd etc), but not last).
With offset, to get last Friday each month, just configure first Friday each month and add offset -7.
For Sunday of the first full week each month, go for 1st Monday each month and add offset 6.
And I am sure this will cover much more crazy scenarios
This will address #169 and #172
It makes sense mainly for monthly frequency, but I did not limit it to that.

Fixes

#179 - for even-weeks, odd-weeks and every-n-weeks, the transition between years did not work if the number of weeks in a year is odd - followed by week 1, so that there should be two consequent weeks with odd week number (previously, it mathematically added number of weeks, not considering the change in the sequence). If you still want to alternate weeks every 2 weeks, regardless of the week number, use every-n-days frequency with the period 14.

#175 - improved algorithm for holiday_in_week_move (@chriss158 )

I have been testing on my HA, but since more than 2200 people use it, I am releasing this as a beta first, to check if the offset does not break anything.

Don't miss a new Garbage-Collection release

NewReleases is sending notifications on new releases.