module Timely::Rails::Time
Public Instance Methods
on_date(year, month = nil, day = nil)
click to toggle source
# File lib/timely/rails/time.rb, line 6 def on_date(year, month = nil, day = nil) if year.is_a?(Date) date = year year = date.year month = date.month day = date.day end raise ArgumentError, 'Year, month, and day needed' unless [year, month, day].all? ::Time.zone.local(year, month, day, hour, min, sec) end
Also aliased as: on