class Cronic::TimeUtil

Defined in:

cronic/time.cr

Constant Summary

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

Class Method Summary

Class Method Detail

def self.add_days(time : Time, num : Int32) #

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


[View source]
def self.could_be_hour?(hour, width = nil, hours12 = false) #

Checks if given number could be hour


[View source]
def self.could_be_minute?(minute, width = nil) #

Checks if given number could be minute


[View source]
def self.could_be_second?(second, width = nil) #

Checks if given number could be second


[View source]
def self.could_be_subsecond?(subsecond, width = nil) #

Checks if given number could be subsecond


[View source]
def self.normalize_offset(offset) #

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


[View source]