summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix merge issueHEADmasterMathieu Le Marec - Pasquet2023-04-122-14/+0
|
* Merge pull request #39 from sg3-141-592/adding-range-begin-end-checkkiorky2023-04-122-0/+14
|\ | | | | Adding check for range begin end
| * Adding check for range begin endsg3-141-5922023-04-122-0/+14
| |
* | lintMathieu Le Marec - Pasquet2023-04-121-1/+1
| |
* | LintMathieu Le Marec - Pasquet2023-04-122-2/+2
| |
* | Adding check for range begin endsg3-141-5922023-04-122-0/+14
| |
* | restore py2 compatMathieu Le Marec - Pasquet2023-04-121-2/+4
|/ | | | This fixes #38
* Do not expose `i` into global namespaceNikita Sobolev2023-04-091-0/+1
| | | | | Hi, I am working on stubs for this module in `python/typeshed`, looks like this symbol is exposed: https://github.com/python/typeshed/actions/runs/4647756507/jobs/8224937971#step:5:229 I don't think that this is intentional, so it is better to remove it.
* Better error handlingMathieu Le Marec - Pasquet2023-04-072-2/+8
| | | | This fixes #34
* Fix DOW hash parsingMathieu Le Marec - Pasquet2023-04-072-17/+88
| | | | This fixes #33
* fix testsMathieu Le Marec - Pasquet2022-09-062-23/+22
|
* Add testShachar Snapiri2022-07-051-0/+14
|
* Fix croniter_range infinite loopShachar Snapiri2022-06-231-2/+6
| | | | | | | | The issue was caused due to the fact that the result time was adjusted unconditionally though it might have resulted in datetime that does not really exist. e.g. If the clock was moved 1 hour forward at March 27 00:00, we do not have that time, but rather March 27 01:00. If we adjust it we get March 26 23:00.
* Again restore compat with py27Mathieu Le Marec - Pasquet2022-02-183-8/+18
|
* Again restore compat with py27Mathieu Le Marec - Pasquet2022-02-181-2/+3
|
* Complete agateblue work to fix #12 & changelogMathieu Le Marec - Pasquet2022-02-182-3/+3
|
* Fix #12: set set_current() force argument default to True for backward ↵Agate2022-02-181-1/+1
| | | | compatibility
* See #12: test case to reproduce issueAgate2022-02-181-1/+8
|
* restore compat with py2Mathieu Le Marec - Pasquet2022-02-151-1/+1
|
* Add a way to make next() easier to use.Mathieu Le Marec - Pasquet2022-02-152-11/+20
| | | | This fixes #11
* Be stricter on day=0Mathieu Le Marec - Pasquet2022-01-142-36/+38
| | | | This relates #9
* Fix typosDaniel Hoherd2022-01-053-5/+5
|
* Be stricter on month=0Mathieu Le Marec - Pasquet2021-12-032-12/+21
| | | | This relates #6
* Better type checksMathieu Le Marec - Pasquet2021-06-253-4/+27
| | | | Fixes #170 #171
* Fix "Bad expression" message construction to use str.formatPēteris Caune2021-05-061-2/+2
|
* Improve the exception messagePēteris Caune2021-05-061-6/+7
|
* Fix ZeroDivisionError with "* * R/0 * *"Pēteris Caune2021-05-062-2/+12
|
* Make expanders use an utility patternMathieu Le Marec - Pasquet2021-04-131-70/+89
|
* Review #49Mathieu Le Marec - Pasquet2021-04-132-12/+16
| | | | rel #162
* Add support for hashed/random/keyword expressionsRyan Finnie2021-04-124-10/+317
| | | | Closes: taichino/croniter#162
* add ut to base case 0 6 30 3 *zed20152021-04-072-4/+15
|
* fix bug: bad case:0 6 30 3 *zed20152021-04-071-1/+3
| | | when crontab day only one day, but last month not has the day, example crontab expression: 0 6 30 3 *
* More consolidation of nth/last-wday functionalityLowell Alleman2021-04-072-32/+33
| | | | | | | | | | | | | - Remove _get_last_weekday_of_month and replaced it with _get_nth_weekday_of_month() and avoid making multiple calls to the calendar module when both '#' and 'L' syntax are used at the same time. - Updated unittests for get_last_weekday_of_month() to instead simply call _get_nth_weekday_of_month()[-1]. - Create unit test for new function. Note that _get_nth_weekday_of_month() is a good candidate for caching as repeated calls to calendar add up over time, especially when evaluating multiple cron expressions concurrently.
* Cleanup PR based on feedbackLowell Alleman2021-04-072-18/+36
| | | | | | | | | | - Optimize scenario where only 'L' modifier exists in the wday expression to reduce the number of invocations of the calendar module. - Cleanup and combined parsing logic for specialty wday syntax (d#n/ Ld) - Add new unit tests to confirm proper exception handling for out-of-range 'L' and '#' nth month for the wday expression. - Add examples of new syntax in README. - Update changelog to cover new syntax and new exception.
* Removed some unintentional deltasLowell Alleman2021-04-072-7/+4
|
* New CroniterUnsupportedSyntaxError exceptionLowell Alleman2021-04-073-15/+26
| | | | | | - Added new exception class and detection log for the currently known corner case where croniter is unlikely to return the correct results. - Updated unittests to look for this new exception.
* Collapsed last day support into nth day mechanismLowell Alleman2021-04-072-90/+65
| | | | | | | | | | | | | - Removed much of my new implementation logic, and merged it into the existing nth_weekday_of_momth data structure. The difference between 5th Saturday '6#5' and last Saturday of the month 'L6', in is simply `{'l'}` vs `{5}`. - Updated tests cases based on new capabilities (which were decently expanded, and several limitations and pain points in the code eliminated)! - Marked some test cases with 'expectedFailure' because apparently in the current implementation mixing literal dow values with nth dow isn't properly supported. At least there's no unittests showing that it should work. You get results, but they appear to be wrong to me. So I'm considering this to be a bug, rather than something my new code broke.
* Working L/non-L detection; updated unittestsLowell Alleman2021-04-072-37/+89
| | | | | | - Expanded several few unit tests to show combinations of dow mixing, separately and combined, so that if mixed dow mode becomes supported there are a few tests to start from. See tests `test_lwom_mixup_*()`
* Updated unit testsLowell Alleman2021-04-071-7/+50
| | | | | - Add new unit tests showing how dow L + other should work - Rename some unittests for consistency
* Integrate parsing logic into _expand()Lowell Alleman2021-04-071-37/+35
| | | | | - Commented out the dow_types checking (L + non-L) detection and explicit blocking due to mishandled corner cases.
* Integrate core logic into _calc()Lowell Alleman2021-04-072-38/+100
|
* RefactoringLowell Alleman2021-04-072-47/+46
|
* Support last day of the month syntaxLowell Alleman2021-04-072-2/+123
| | | | | | | | | | | - Add support for 'L' in the dow field. This is done by internally repurposing the nth_weekday_of_month logic. - Currently mixing 'L' with any other value in the dow field is not supported. NOTE: This is a first proof-of-concept level code. The code seems to work (all tests pass), but the code integration is abysmal. This is the first working snapshot. This code was imported directly from a wrapper class that I wrote and published here: https://github.com/taichino/croniter/issues/159
* Fix (my own) spelling mistakes in unittestsLowell Alleman2021-04-062-4/+4
|
* Split croniter_range() tests into separate fileLowell Alleman2021-04-062-1348/+3
| | | | | | | | | Cleanly divide unit tests to avoid confusion. (A number of croniter unit tests ended up under the CroniterRangeTest class.) Note that all the prior rename and merge commits were done to preserve file history so that 'git blame' and related commands will keep working correctly showing the correct commit/author when changes were made.
* Restore test_croniter.py file nameLowell Alleman2021-04-061-0/+0
|
* Move unitest fileLowell Alleman2021-04-061-0/+1350
|
* Move unitest fileLowell Alleman2021-04-061-0/+0
|
* Rename croniter argument to croniter_range() functionLowell Alleman2021-03-262-5/+6
|
* Enable croniter_range() to use derived classLowell Alleman2021-03-262-1/+27
| | | | | | | - Add new optional 'croniter' argument to croniter_range(), making it useable with an alternate or derived croniter class. - Add unittest demonstrating a simple subclass that accepts 5-part expression (no seconds) which can now be used with croniter_range().