Object
# File xmlrpc/datetime.rb, line 129 def ==(o) self.to_a == Array(o) rescue false 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, code samples, or clarification of the documentation.
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 bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.