Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Orozco b648cc9a90 Expose ParseStrict to error on too many fields
Parse currently ignores any tokens after the 7th, which means invalid
cron expressions might be allowed as long as invalid tokens are found
after the 7th character.

In some use cases (e.g. validating cron expressions provided by a user),
this might not be desirable. To allow for this use case, this adds a
ParseStrict function that returns an error if too many fields are
provided (it retains backwards compatibility by not touching Parse).
2018-08-01 16:10:17 +02: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
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 e1010b5ee1 added test 2013-09-11 19:37:42 -04:00
gorhill 8c982ee625 oops, fixed bug introduced by last change, added test case 2013-09-11 11:24:07 -04:00
gorhill e869d999cf issues #1, #3, #5, #6 2013-09-07 14:02:17 -04:00
gorhill 164843d2d0 added benchmarking, as per #5 2013-09-02 10:34:47 -04:00
gorhill 5442b2bfef changes as per #5 2013-09-02 09:25:49 -04:00
gorhill ed7ab26608 added test for specific weekdays of week 2013-09-02 08:05:09 -04:00
gorhill 718fc4c0ab changes as suggested at https://groups.google.com/d/msg/golang-nuts/la6mB5xG1L4/5V0L2GqF_1oJ 2013-09-01 09:24:01 -04:00
gorhill 1998268a1c go fmt'ed 2013-08-31 15:05:03 -04:00
gorhill 83135b3c5c renaming cronexpression to cronexpr 2013-08-31 09:00:12 -04:00
Raymond Hill a7091b7c64 Rename cronexpression_test.go to cronexpr_test.go 2013-08-31 08:51:11 -04:00