Sha256: 510c93a11185ec4f3b79894a994e72c0013622b030aea394d135d3cdfd693686
Contents?: true
Size: 556 Bytes
Versions: 13
Compression:
Stored size: 556 Bytes
Contents
class Time # Like change but does not reset earlier times. # # NOTE: It would be better, probably if this were called "change". # and that #change were called "reset". # def set(options) opts={}; options.each_pair{ |k,v| opts[k] = v.to_i } self.class.send( self.utc? ? :utc : :local, opts[:year] || self.year, opts[:month] || self.month, opts[:day] || self.day, opts[:hour] || self.hour, opts[:min] || self.min, opts[:sec] || self.sec, opts[:usec] || self.usec ) end end
Version data entries
13 entries across 13 versions & 2 rubygems