class TimeManagement

Constants

TODAY_START_PERIOD
YESTERDAY_START_PERIOD

Public Instance Methods

epoch_time(time) click to toggle source
# File lib/time-management.rb, line 22
def epoch_time(time)
  time.to_i.to_s
end
period_epoch(time, a_given_period) click to toggle source
# File lib/time-management.rb, line 17
def period_epoch(time, a_given_period)
  period = time - period_seconds(a_given_period)
  epoch_time(period)
end
period_seconds(a_given_day_period) click to toggle source
# File lib/time-management.rb, line 13
def period_seconds(a_given_day_period)
  a_given_day_period * 60
end
today_start_period() click to toggle source
# File lib/time-management.rb, line 5
def today_start_period
  TODAY_START_PERIOD
end
yesterday_start_period() click to toggle source
# File lib/time-management.rb, line 9
def yesterday_start_period
  YESTERDAY_START_PERIOD
end