aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmlrpc/datetime.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /lib/xmlrpc/datetime.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
downloadruby-287a34ae0dfc23e4158f67cb7783d239f202c368.tar.gz
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/xmlrpc/datetime.rb')
-rw-r--r--lib/xmlrpc/datetime.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/xmlrpc/datetime.rb b/lib/xmlrpc/datetime.rb
index f66ef8963a..d6c80a2cb9 100644
--- a/lib/xmlrpc/datetime.rb
+++ b/lib/xmlrpc/datetime.rb
@@ -10,19 +10,19 @@ Released under the same term of license as Ruby.
= XMLRPC::DateTime
== Description
This class is important to handle XMLRPC (('dateTime.iso8601')) values,
-correcly, because normal UNIX-dates (class (({Date}))) only handle dates
+correcly, because normal UNIX-dates (class (({Date}))) only handle dates
from year 1970 on, and class (({Time})) handles dates without the time
-component. (({XMLRPC::DateTime})) is able to store a XMLRPC
+component. (({XMLRPC::DateTime})) is able to store a XMLRPC
(('dateTime.iso8601')) value correctly.
== Class Methods
--- XMLRPC::DateTime.new( year, month, day, hour, min, sec )
Creates a new (({XMLRPC::DateTime})) instance with the
- parameters ((|year|)), ((|month|)), ((|day|)) as date and
+ parameters ((|year|)), ((|month|)), ((|day|)) as date and
((|hour|)), ((|min|)), ((|sec|)) as time.
Raises (({ArgumentError})) if a parameter is out of range, or ((|year|)) is not
of type (({Integer})).
-
+
== Instance Methods
--- XMLRPC::DateTime#year
--- XMLRPC::DateTime#month
@@ -50,7 +50,7 @@ component. (({XMLRPC::DateTime})) is able to store a XMLRPC
--- XMLRPC::DateTime#to_time
Return a (({Time})) object of the date/time which (({self})) represents.
- If the (('year')) is below 1970, this method returns (({nil})),
+ If the (('year')) is below 1970, this method returns (({nil})),
because (({Time})) cannot handle years below 1970.
The used timezone is GMT.
@@ -68,7 +68,7 @@ require "date"
module XMLRPC
class DateTime
-
+
attr_reader :year, :month, :day, :hour, :min, :sec
def year= (value)
@@ -102,14 +102,14 @@ class DateTime
end
alias mon month
- alias mon= month=
-
+ alias mon= month=
+
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
-
+
def to_time
if @year >= 1970
Time.gm(*to_a)