tracks/lib/date_utils.rb
Matt Rogers a1aaa283f1 Remove User#at_midnight
Replace it with a class called DateUtils with a method called
`#midnight_for` that takes a preference instance and date to convert to
midnight.
2013-07-29 16:34:23 -05:00

5 lines
156 B
Ruby

class DateUtils
def self.midnight_for(prefs, date)
ActiveSupport::TimeZone[prefs.time_zone].local(date.year, date.month, date.day, 0, 0, 0)
end
end