Sha256: dbbf7159c13685ea03a7b6658fa5f51d0ac5ffdc6a640006156c213365c580fa
Contents?: true
Size: 430 Bytes
Versions: 8
Compression:
Stored size: 430 Bytes
Contents
module Timely module Rails module Time def on_date(year, month = nil, day = nil) if year.is_a?(Date) date = year year, month, day = date.year, date.month, 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 alias_method :on, :on_date end end end
Version data entries
8 entries across 8 versions & 1 rubygems