class Prosperity::Helpers::Time

Public Class Methods

beginning_of_hour(date) click to toggle source
# File lib/prosperity/helpers/time.rb, line 3
def self.beginning_of_hour(date)
  DateTime.new(date.year, date.month, date.day, date.hour)
end
end_of_hour(date) click to toggle source
# File lib/prosperity/helpers/time.rb, line 7
def self.end_of_hour(date)
  DateTime.new(date.year, date.month, date.day, date.hour) + 1.hour
end