montrose icon indicating copy to clipboard operation
montrose copied to clipboard

To the End of the Month

Open eric1234 opened this issue 9 months ago • 0 comments

I can do a date that includes the end of the month:

> puts *Montrose.daily(mday: [25, -1]).take(10)
2025-03-31 17:14:27 -0400
2025-04-25 17:14:27 -0400
2025-04-30 17:14:27 -0400
2025-05-25 17:14:27 -0400
2025-05-31 17:14:27 -0400
2025-06-25 17:14:27 -0400
2025-06-30 17:14:27 -0400
2025-07-25 17:14:27 -0400
2025-07-31 17:14:27 -0400
2025-08-25 17:14:27 -0400

I can also do a range of date:

> puts *Montrose.daily(mday: 25..27).take(10)
2025-03-27 17:14:56 -0400
2025-04-25 17:14:56 -0400
2025-04-26 17:14:56 -0400
2025-04-27 17:14:56 -0400
2025-05-25 17:14:56 -0400
2025-05-26 17:14:56 -0400
2025-05-27 17:14:56 -0400
2025-06-25 17:14:56 -0400
2025-06-26 17:14:56 -0400
2025-06-27 17:14:56 -0400

But I cannot do a range until the end of the month:

> puts *Montrose.daily(mday: 25..-1).take(10)
2025-03-27 17:15:28 -0400
2025-03-28 17:15:28 -0400
2025-03-29 17:15:28 -0400
2025-03-30 17:15:28 -0400
2025-03-31 17:15:28 -0400
2025-04-01 17:15:28 -0400
2025-04-02 17:15:28 -0400
2025-04-03 17:15:28 -0400
2025-04-04 17:15:28 -0400
2025-04-05 17:15:28 -0400

It seems to start at the right place but then doesn't end correctly and start again at the right place next month.

eric1234 avatar Mar 27 '25 21:03 eric1234