8000 rdoc update. · devrandom/ruby@efdd218 · GitHub
[go: up one dir, main page]

Skip to content

Commit efdd218

Browse files
committed
rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent af49fb2 commit efdd218

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

lib/time.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ def make_time(year, mon, day, hour, min, sec, sec_fraction, zone, now)
252252
#
253253
# A failure for Time.parse should be checked, though.
254254
#
255+
# time library should be required to use this method as follows.
256+
#
257+
# require 'time'
258+
#
255259
def parse(date, now=self.now)
256260
comp = !block_given?
257261
d = Date._parse(date, comp)
@@ -293,6 +297,10 @@ def strptime(date, format, now=self.now)
293297
#
294298
# See #rfc2822 for more information on this format.
295299
#
300+
# time library should be required to use this method as follows.
301+
#
302+
# require 'time'
303+
#
296304
def rfc2822(date)
297305
if /\A\s*
298306
(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*,\s*)?
@@ -342,6 +350,10 @@ def rfc2822(date)
342350
#
343351
# See #httpdate for more information on this format.
344352
#
353+
# time library should be required to use this method as follows.
354+
#
355+
# require 'time'
356+
#
345357
def httpdate(date)
346358
if /\A\s*
347359
(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\x20
@@ -389,6 +401,10 @@ def httpdate(date)
389401
#
390402
# See #xmlschema for more information on this format.
391403
#
404+
# time library should be required to use this method as follows.
405+
#
406+
# require 'time'
407+
#
392408
def xmlschema(date)
393409
if /\A\s*
394410
(-?\d+)-(\d\d)-(\d\d)
@@ -431,6 +447,10 @@ def xmlschema(date)
431447
#
432448
# If +self+ is a UTC time, -0000 is used as zone.
433449
#
450+
# time library should be required to use this method as follows.
451+
#
452+
# require 'time'
453+
#
434454
def rfc2822
435455
sprintf('%s, %02d %s %0*d %02d:%02d:%02d ',
436456
RFC2822_DAY_NAME[wday],
@@ -462,6 +482,10 @@ def rfc2822
462482
#
463483
# Note that the result is always UTC (GMT).
464484
#
485+
# time library should be required to use this method as follows.
486+
#
487+
# require 'time'
488+
#
465489
def httpdate
466490
t = dup.utc
467491
sprintf('%s, %02d %s %0*d %02d:%02d:%02d GMT',
@@ -484,6 +508,10 @@ def httpdate
484508
# +fractional_seconds+ specifies a number of digits of fractional seconds.
485509
# Its default value is 0.
486510
#
511+
# time library should be required to use this method as follows.
512+
#
513+
# require 'time'
514+
#
487515
def xmlschema(fraction_digits=0)
488516
sprintf('%0*d-%02d-%02dT%02d:%02d:%02d',
489517
year < 0 ? 5 : 4, year, mon, day, hour, min, sec) +

0 commit comments

Comments
 (0)
0