time.to_a â array
Instance Public methods
Returns a ten-element array of values for time:
[sec, min, hour, day, month, year, wday, yday, isdst, zone]
See the individual methods for an explanation of the valid ranges of each value. The ten elements can be passed directly to ::utc or ::local to create a new Time object.
t = Time.now #=> 2007-11-19 08:36:01 -0600 now = t.to_a #=> [1, 36, 8, 19, 11, 2007, 1, 323, false, "CST"]
Please login to continue.