module Runway::TimeHelpers
Defined in:
runway/lib/time.crClass Method Summary
-
.interval(interval : String) : Time::Span
Constructs a Time::Span object from an interval pattern.
-
.timezone(timezone : String | Nil) : Time::Location
Gets the timezone for a schedule.
Class Method Detail
def self.interval(interval : String) : Time::Span
#
Constructs a Time::Span object from an interval pattern.
@param interval [String] The interval pattern to construct the Time::Span object from. Example string: "1m" for 1 minute. Intervals must be in the format of a number followed by a unit of time (ms, s, m) and be whole numbers. @return [Time::Span] The Time::Span object for the interval pattern.
def self.timezone(timezone : String | Nil) : Time::Location
#
Gets the timezone for a schedule.
@param timezone [String, nil] The timezone to use for the schedule, or nil
for UTC.
Example string: "America/New_York".
@return [Time::Location] The Time::Location object for the timezone.