module JosieHealth::Utils::Recurrence

Defined in:

recurrence.cr

Constant Summary

DAYS_OF_WEEK = {"monday" => 1, "tuesday" => 2, "wednesday" => 3, "thursday" => 4, "friday" => 5, "saturday" => 6, "sunday" => 7}

Class Method Summary

Class Method Detail

def self.first_trigger(pattern : String, from_time : Time = Time.utc) : Int64 #

def self.format(pattern : String) : String #

def self.format_compact(total_seconds : Int32) : String #

def self.format_human(total_seconds : Int32) : String #

def self.next_day_of_week(target_day : Int32, from_time : Time) : Time #

def self.next_trigger(pattern : String, from_time : Time = Time.utc) : Int64 #

def self.parse_day_of_week(pattern : String) : Int32 | Nil #

def self.parse_interval(pattern : String) : Int32 | Nil #

def self.valid?(pattern : String) : Bool #