class Evertils::Common::Query::Base

Public Instance Methods

end_of_day(date = nil) click to toggle source

@since 0.2.8

# File lib/evertils/common/query.rb, line 15
def end_of_day(date = nil)
  date = ::Time.now unless date

  ::Time.mktime(date.year, date.month, date.day, 23, 59, 59).to_datetime
end
start_of_day(date = nil) click to toggle source

@since 0.2.8

# File lib/evertils/common/query.rb, line 7
def start_of_day(date = nil)
  date = ::Time.now unless date

  ::Time.mktime(date.year, date.month, date.day, 12, 0, 0).to_datetime
end