After a question on Reddit about bi-weekly/fortnightly, I've decided to add support for week ranges. This PR contains the required changes to support weeks:
Because we use the ActiveSupport API, the beginning of the week is determined by Date.beginning_of_week. This allows settings a different beginning of the week and will automatically change the DateRange behaviour accordingly.
For bi-weekly ranges it's hard to add a specific API because we don't know where the range would start and end. Therefore it's better to create the bi-weekly range manually: biweekly = DateRange.this_week + DateRange.this_week.next.
After a question on Reddit about bi-weekly/fortnightly, I've decided to add support for week ranges. This PR contains the required changes to support weeks:
Because we use the ActiveSupport API, the beginning of the week is determined by Date.beginning_of_week. This allows settings a different beginning of the week and will automatically change the DateRange behaviour accordingly.
For bi-weekly ranges it's hard to add a specific API because we don't know where the range would start and end. Therefore it's better to create the bi-weekly range manually:
biweekly = DateRange.this_week + DateRange.this_week.next
.