This class is important to handle XMLRPC dateTime.iso8601 values, correctly, because normal UNIX-dates, ie: Date, only handle dates from year 1970 on, and ruby’s native Time class handles dates without the time component.

XMLRPC::DateTime is able to store a XMLRPC dateTime.iso8601 value correctly.

Attributes
Read

Return the value of the specified date/time component.

Read

Return the value of the specified date/time component.

day

Read

Return the value of the specified date/time component.

Read

Return the value of the specified date/time component.

min

Read

Return the value of the specified date/time component.

sec

Read

Return the value of the specified date/time component.

mon

Read

Return the value of the specified date/time component.

Class Methods

Creates a new XMLRPC::DateTime instance with the parameters year, month, day as date and hour, min, sec as time.

Raises an ArgumentError if a parameter is out of range, or if year is not of the Integer type.

Instance Methods

Returns whether or not all date/time components are an array.

Set value as the new date/time component.

Raises an ArgumentError if the given value isn’t between 1 and 31.

Set value as the new date/time component.

Raises an ArgumentError if the given value isn’t between 0 and 24.

Set value as the new date/time component.

Raises an ArgumentError if the given value isn’t between 0 and 59.

An alias for month=

Set value as the new date/time component.

Raises an ArgumentError if the given value isn’t between 1 and 12.

Set value as the new date/time component.

Raises an ArgumentError if the given value isn’t between 0 and 59.

Returns all date/time components in an array.

Returns +[year, month, day, hour, min, sec]+.

Return a Date object of the date which represents self.

The Date object do not contain the time component (only date).

Return a Time object of the date/time which represents self. If the @year is below 1970, this method returns nil, because Time cannot handle years below 1970.

The timezone used is GMT.

Set value as the new date/time component.

Raises ArgumentError if the given value is out of range, or in the case of XMLRPC::DateTime#year= if value is not of type Integer.