class

Cronic::TimeUtil

Inherits Reference < Object

Constants

HOUR_SECONDS = 3600
MINUTE_SECONDS = 60
SECOND_SECONDS = 1
SUBSECOND_SECONDS = 0.001

Class methods

add_days(time : Time, num : Int32)

add days, with adjustment for timezone offset and daylight savings time when incrementing

Source
could_be_hour?(hour, width = nil, hours12 = false)

Checks if given number could be hour

Source
could_be_minute?(minute, width = nil)

Checks if given number could be minute

Source
could_be_second?(second, width = nil)

Checks if given number could be second

Source
could_be_subsecond?(subsecond, width = nil)

Checks if given number could be subsecond

Source
normalize_offset(offset)

normalize offset in seconds to offset as string +mm:ss or -mm:ss

Source