class Time
A base-zero that supports assigning arbitrary values (both positive and negative) to all units. This simplifies computing relative times and dates by incrementing the relevant units and normalizing the result.
Note that base-zero means that the month and day start from zero, not one, as is the case with the standard Ruby Time and Date classes. That is because the fields also accept negative values, which would be ambiguous if the month and day started from one.
Definitions
def initialize(years, months, days, hours, minutes, seconds, offset)
Signature
-
parameter
yearsInteger The number of years.
-
parameter
monthsInteger The number of months.
-
parameter
daysInteger The number of days.
-
parameter
hoursInteger The number of hours.
-
parameter
minutesInteger The number of minutes.
-
parameter
secondsInteger The number of seconds.
-
parameter
offsetInteger The time zone offset.
Implementation
def initialize(years, months, days, hours, minutes, seconds, offset)
@years = years
@months = months
@days = days
@hours = hours
@minutes = minutes
@seconds = seconds
@offset = offset
end