Methods
#
D
H
M
N
S
T
Y
Attributes
[R] day
[R] hour
[R] min
[R] mon
[R] month
[R] sec
[R] year
Class Public methods
new(year, month, day, hour, min, sec)
# File ../ruby/lib/xmlrpc/datetime.rb, line 108
def initialize(year, month, day, hour, min, sec)
  self.year, self.month, self.day = year, month, day
  self.hour, self.min, self.sec   = hour, min, sec
end
Instance Public methods
==(o)
# File ../ruby/lib/xmlrpc/datetime.rb, line 129
def ==(o)
  self.to_a == Array(o) rescue false
end
day=(value)
# File ../ruby/lib/xmlrpc/datetime.rb, line 84
def day= (value)
  raise ArgumentError, "date/time out of range" unless (1..31).include? value
  @day = value
end
hour=(value)
# File ../ruby/lib/xmlrpc/datetime.rb, line 89
def hour= (value)
  raise ArgumentError, "date/time out of range" unless (0..24).include? value
  @hour = value
end
min=(value)
# File ../ruby/lib/xmlrpc/datetime.rb, line 94
def min= (value)
  raise ArgumentError, "date/time out of range" unless (0..59).include? value
  @min = value
end
mon=(value)
Alias for: month=
month=(value)
Also aliased as: mon=
# File ../ruby/lib/xmlrpc/datetime.rb, line 79
def month= (value)
  raise ArgumentError, "date/time out of range" unless (1..12).include? value
  @month = value
end
sec=(value)
# File ../ruby/lib/xmlrpc/datetime.rb, line 99
def sec= (value)
  raise ArgumentError, "date/time out of range" unless (0..59).include? value
  @sec = value
end
to_a()
# File ../ruby/lib/xmlrpc/datetime.rb, line 125
def to_a
  [@year, @month, @day, @hour, @min, @sec]
end
to_date()
# File ../ruby/lib/xmlrpc/datetime.rb, line 121
def to_date
  Date.new(*to_a[0,3])
end
to_time()
# File ../ruby/lib/xmlrpc/datetime.rb, line 113
def to_time
  if @year >= 1970
    Time.gm(*to_a)
  else
    nil
  end
end
year=(value)
# File ../ruby/lib/xmlrpc/datetime.rb, line 74
def year= (value)
  raise ArgumentError, "date/time out of range" unless value.is_a? Integer
  @year = value
end