class Playbook::PbKit::PbDateTime
def convert_to_timestamp
def convert_to_timestamp @value = @value.is_a?(String) ? DateTime.parse(@value) : @value end
def convert_to_timestamp_and_zone(value, zone)
def convert_to_timestamp_and_zone(value, zone) converted_time = value.is_a?(String) ? DateTime.parse(value) : value converted_time.in_time_zone(zone) end
def convert_to_timezone(zone = "America/New_York")
def convert_to_timezone(zone = "America/New_York") @value = @value.in_time_zone(zone) end
def initialize(value, zone = "America/New_York")
def initialize(value, zone = "America/New_York") @value = convert_to_timestamp_and_zone(value, zone) end
def to_day
def to_day @value.strftime("%e") end
def to_day_of_week
def to_day_of_week @value.strftime("%a") end
def to_day_of_week_compact
def to_day_of_week_compact abbr_days = %w[SU M T W TH F S] abbr_days[@value.strftime("%w").to_i] end
def to_full_hour
def to_full_hour @value.strftime("%I") end
def to_hour
def to_hour @value.strftime("%l") end
def to_iso
def to_iso @value.iso8601 end
def to_meridian
def to_meridian @value.strftime("%P")[0, 1] end
def to_minutes
def to_minutes @value.strftime("%M") end
def to_month
def to_month @value.strftime("%^b") end
def to_month_downcase
def to_month_downcase @value.strftime("%b") end
def to_month_full
def to_month_full @value.strftime("%B") end
def to_month_number
def to_month_number @value.strftime("%m") end
def to_timezone
def to_timezone @value.strftime("%Z") end
def to_unpadded_day
def to_unpadded_day @value.strftime("%-d") end
def to_unpadded_month_number
def to_unpadded_month_number @value.strftime("%-m") end
def to_year
def to_year @value.strftime("%Y") end