We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following example code causes an infinite loop and a stack level too deep error:
Montrose.weekly( on: [:sunday], between: Date.new(2024, 1, 1)..Date.new(2024, 1, 7), at: Time.zone.parse("2000-01-01 21:00") )
It looks like the problem is here: https://github.com/rossta/montrose/blob/main/lib/montrose/options.rb#L278
A TimeWithZone passed to Array is split into its constituent parts:
Array(Time.zone.parse("2000-01-01 21:00")) => [0, 0, 21, 1, 1, 2000, 6, 1, false, "UTC"]
Whereas with a DateTime, for example, we would get:
Array(DateTime.parse("2000-01-01 21:00")) => [Sat, 01 Jan 2000 21:00:00 +0000]
(We're obviously able to work around this by converting the TimeWithZone to another object before passing it to montrose).
The text was updated successfully, but these errors were encountered:
Thank you for the report. I haven’t had the chance to look into this yet. PRs are welcome!
Sorry, something went wrong.
No branches or pull requests
The following example code causes an infinite loop and a stack level too deep error:
It looks like the problem is here:
https://github.com/rossta/montrose/blob/main/lib/montrose/options.rb#L278
A TimeWithZone passed to Array is split into its constituent parts:
Whereas with a DateTime, for example, we would get:
(We're obviously able to work around this by converting the TimeWithZone to another object before passing it to montrose).
The text was updated successfully, but these errors were encountered: