Repository navigation
Document overnight range semantics - #4
Merged
Merged
Conversation
An overnight range combined with non-wildcard calendar fields does not produce the continuous window it looks like: `23:00-02:00 1 * *` matches Monday 00:00-02:00 and Monday 23:00 to midnight, because each rule is evaluated against a single calendar day and dow, dom and month are matched against the day shown on the clock. The readme and the package doc now spell that out and show the two-rule form for a window that really does run from Monday evening into Tuesday morning. Table cases pin both. No behaviour change.
umputun
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An overnight range combined with non-wildcard calendar fields does not produce the continuous window it looks like. Each rule is evaluated against a single calendar day, and
dow,domandmonthare matched against the day shown on the clock, so23:00-02:00 1 * *matches Monday 00:00-02:00 and Monday 23:00 to midnight, and it does not match Tuesday 00:30. Nothing in the readme or the package doc said so, and the only overnight example used wildcards, where the behaviour is the obvious one.The readme gains an "Overnight Ranges" section and the package doc a matching paragraph, both stating the rule and showing the two-rule form for a window that really does run from Monday evening into Tuesday morning:
Table cases pin both: the per-day evaluation in
TestMatches, and the split form with its boundaries inTestMatch.Documentation and tests only,
rule.gois untouched and there is no behaviour change.