Object
# File xmlrpc/datetime.rb, line 129
def ==(o)
Array(self) == Array(o)
end
# File xmlrpc/datetime.rb, line 84
def day= (value)
raise ArgumentError, "date/time out of range" unless (1..31).include? value
@day = value
end
# File xmlrpc/datetime.rb, line 89
def hour= (value)
raise ArgumentError, "date/time out of range" unless (0..24).include? value
@hour = value
end
# File xmlrpc/datetime.rb, line 94
def min= (value)
raise ArgumentError, "date/time out of range" unless (0..59).include? value
@min = value
end
# File xmlrpc/datetime.rb, line 79
def month= (value)
raise ArgumentError, "date/time out of range" unless (1..12).include? value
@month = value
end
# File xmlrpc/datetime.rb, line 99
def sec= (value)
raise ArgumentError, "date/time out of range" unless (0..59).include? value
@sec = value
end
# File xmlrpc/datetime.rb, line 125
def to_a
[@year, @month, @day, @hour, @min, @sec]
end
# File xmlrpc/datetime.rb, line 121
def to_date
Date.new(*to_a[0,3])
end
Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.
If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.