From 215156e0fe9eb559e0d82cba532a738390073c8c Mon Sep 17 00:00:00 2001 From: "evgeny.nefedkin" Date: Wed, 10 Jan 2018 19:38:14 +0300 Subject: [PATCH] fixed: zero at the beginning of dates/times, e.g. '05' (tests) --- cronexpr_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cronexpr_test.go b/cronexpr_test.go index f170769..008ec9b 100644 --- a/cronexpr_test.go +++ b/cronexpr_test.go @@ -196,6 +196,17 @@ var crontests = []crontest{ }, }, + { // Zero leading values + "00 01 03 07 *", + "Mon 2006-01-02 15:04", + []crontimes{ + {"2013-01-01 00:00:00", "Wed 2013-07-03 01:00"}, + {"2014-01-28 00:00:00", "Thu 2014-07-03 01:00"}, + {"2013-12-30 00:30:00", "Thu 2014-07-03 01:00"}, + {"2015-07-03 02:01:00", "Sun 2016-07-03 01:00"}, + }, + }, + // TODO: more tests }