Commit Graph

11 Commits

Author SHA1 Message Date
Thomas Orozco cff9279a98 Reject intervals that are out of order
If an interval if out of order, it ends up emitting 0000-00-00 00:00:00
as the "next" time, which is undesirable. This patch updates Parse to
simply reject such intervals.

Since the rejection reason might not be super obvious (the range 6-7 is
actually translated to 6-0, which makes it invalid), let's also print
the original vs. normalized form for clarity.

See: https://github.com/aptible/supercronic/issues/63
2020-11-14 14:36:16 +00:00
Alex Dadgar 675cac9b2d Allow library to be used in parallel
This PR allows concurrent calls to Parse. Further it makes the test be
part of the same package.

Fixes https://github.com/gorhill/cronexpr/issues/26
2017-09-15 11:30:32 -07:00
xiaofan 86090e60c2 fix 60 interval issue 2016-12-05 11:16:12 +08:00
takumakanari cfcb638156 modify regex 2016-03-18 16:23:09 +09:00
takumakanari 334aab8a03 support 0N format for numeric field 2016-03-17 17:57:02 +09:00
gorhill a557574d6c fixed regex, put back code block where it was 2014-04-23 19:13:48 -04:00
Safx b0d44377d8 fixed parsering bug for like "*/5" 2014-04-23 01:22:28 +09:00
gorhill 0ef34dac9b now also aplv2 2013-11-20 06:10:35 -05:00
gorhill 17ea23bf08 further tidying 2013-09-08 10:37:12 -04:00
gorhill 13ba1270e1 split/rename 2013-09-07 17:11:53 -04:00
gorhill 8da0efdd84 split/rename cronexpr_impl.go 2013-09-07 17:08:27 -04:00