Repository navigation
Fix previousRelativeTo, document the public API, release 0.3.1 - #20
Merged
Merged
Conversation
Every public member now has a dartdoc comment that states what it returns, not just its name. The Cron constructor documents what it accepts and when it throws, and the class has a usage example. The README gets version and docs badges.
previousRelativeTo started its search a full minute plus the leftover seconds before the given time, so a match earlier in the same minute was skipped: */15 * * * * at 16:00:30 returned 15:45 instead of 16:00. The search now starts at the whole minute at or before the given time, excluding the given time itself. Four test rows asserted the old result and are corrected.
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.
Brings dartdoc coverage from 17/19 to 19/19 public API elements (pana), fixes a
previousRelativeTobug found while documenting it, and bumps the version to 0.3.1.Docs:
Cronconstructor accepts and when it throws, including@rebootand expressions that can never match.nextRelativeToandpreviousRelativeTonever return the given time, and how long a rare schedule's search takes. The worst case found was about 0.9s, for a Feb 29 schedule across 2100.dart doc --dry-runreports 0 warnings.Fix:
previousRelativeTostarted its search a full minute plus the leftover seconds before the given time, so it skipped a match earlier in the same minute.*/15 * * * *at16:00:30returned15:45instead of16:00.previous,sincePreviousRelativeToandsincePrevioushad the same bug. Four existing test rows asserted the old result and are corrected.Release:
pubspec.yaml0.3.1 and its CHANGELOG entry. After merging, run Release onmain.