method

to_a

v1_8_7_330 - Show latest stable - Class: Time
to_a()
public

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 Time::utc or Time::local to create a new Time.

now = Time.now   #=> Wed Apr 09 08:56:04 CDT 2003
t = now.to_a     #=> [4, 56, 8, 9, 4, 2003, 3, 99, true, "CDT"]