Check period duration to be at least 1 day when using 'at'

This commit is contained in:
Dzmitry Plashchynski
2015-03-15 09:56:18 +02:00
parent 6508197f26
commit 95a237aeb5
2 changed files with 7 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ module Crono
end
def parse_at(at)
fail "period should be at least 1 day to use 'at'" if @period < 1.day
case at
when String
time = Time.parse(at)