rossta / montrose

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

Montrose.every 30.days "Occurs" Every 31 Days #52

Closed sshaw closed 8 years ago

sshaw commented 8 years ago
irb [2.3.0] (selfie_formatter)$ Montrose::VERSION
=> "0.4.0"
irb [2.3.0] (selfie_formatter)$ thirty = Montrose.every 30.days
=> #<Montrose::Recurrence:3fccec97b1f4 {:every=>:month, :interval=>1}>
irb [2.3.0] (selfie_formatter)$ e = thirty.to_enum
=> #<Enumerator: #<Montrose::Recurrence:3fccec97b1f4 {:every=>:month, :interval=>1}>:each>
irb [2.3.0] (selfie_formatter)$ e.next
=> 2016-07-03 21:25:47 -0400
irb [2.3.0] (selfie_formatter)$ e.next
=> 2016-08-03 21:25:47 -0400
irb [2.3.0] (selfie_formatter)$ 30.days.from_now
=> 2016-08-02 21:26:04 -0400
irb [2.3.0] (selfie_formatter)$ 31.days.from_now
=> 2016-08-03 21:26:06 -0400
rossta commented 8 years ago

Thanks for reporting. I'll try to work on a fix unless you're interested in taking a crack at it.

rossta commented 8 years ago

Fix released in 0.4.1