rossta / montrose

Recurring events library for Ruby. Enumerable recurrence objects and convenient chainable interface.
https://rossta.net/montrose/
MIT License
821 stars 53 forks source link

Add exclude_end for rule During #155

Open timfsw opened 11 months ago

timfsw commented 11 months ago

Added support for supporting exclude_end for the During-Rule.

Example:

Montrose
.every(15.minutes, until: Date.today.end_of_day, exclude_end: true)
.starting(Date.today)
.during(
  "14:00-15:00",
)

Generated events in the current version:

[
  2023-07-21 14:00:00 +0200,
  2023-07-21 14:15:00 +0200,
  2023-07-21 14:30:00 +0200,
  2023-07-21 14:45:00 +0200,
  2023-07-21 15:00:00 +0200
]

Generated events in the new version:

[
  2023-07-21 14:00:00 +0200,
  2023-07-21 14:15:00 +0200,
  2023-07-21 14:30:00 +0200,
  2023-07-21 14:45:00 +0200
]