Closed FluffyEscargot closed 5 months ago
I've added the tests to cover basic cases, not looking at timezones yet. What I haven't included yet, is some inputs which pass, even though they shouldn't in my opinion:
{"fail invalid time", "2401", "2018-10-10T10:00:00Z", time.Duration(0), fmt.Errorf("invalid format for begin delay '2401'")},
{"fail too long time", "12345", "2018-10-10T10:00:00Z", time.Duration(0), fmt.Errorf("invalid format for begin delay '12345'")},
2401
, time.Date accepts values outside the usual range, so doesn't have to be <24 and <60 for hours and minutes12345
, the regex currently allows for leading or trailing characters, so aaaa2309bbbb
also passes. Adding ^
and $
to begin and end of the regex would fix thatI've added the tests to cover basic cases, not looking at timezones yet.
Thanks. Keeps it cleaner.
What I haven't included yet, is some inputs which pass, even though they shouldn't in my opinion:
So I should wait to kick off CI?
Ready to merge
All looks good, but needs a rebase.
Closes #267