module TandaCLI::Utils::Time

Extended Modules

Defined in:

tanda_cli/utils/time.cr

Constant Summary

DEFAULT_DATE_FORMAT = "%A, %d %b %Y"
DEFAULT_DATE_TIME_FORMAT = "#{DEFAULT_DATE_FORMAT} | #{DEFAULT_TIME_FORMAT}"
DEFAULT_TIME_FORMAT = "%l:%M %p"
ISO_DATE = "%Y-%m-%d"

Instance Method Summary

Instance Method Detail

def iso_date(date : ::Time) : String #

[View source]
def iso_date(date : String) : ::Time #

[View source]
def location : ::Time::Location #

[View source]
def now : ::Time #

[View source]
def pretty_date(date : ::Time) : String #

[View source]
def pretty_date_time(time : ::Time) : String #

[View source]
def pretty_time(time : ::Time) : String #

[View source]
def span_between(start_time : ::Time, finish_time : ::Time) : ::Time::Span #

Times of day carry no date, so a finish before the start wraps past midnight


[View source]