mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Update about sec
argument of Time.new
This commit is contained in:
parent
7b1d23fd29
commit
a145a204ec
1 changed files with 6 additions and 1 deletions
7
timev.rb
7
timev.rb
|
@ -330,12 +330,17 @@ class Time
|
|||
# Time.new(2000, 1, 1, 0, 0) # => 2000-01-01 00:00:00 -0600
|
||||
# Time.new(2000, 1, 1, 0, 59) # => 2000-01-01 00:59:00 -0600
|
||||
#
|
||||
# - +sec+: Second in range (0..59), or 60 if +usec+ is zero:
|
||||
# - +sec+: Second in range (0...61):
|
||||
#
|
||||
# Time.new(2000, 1, 1, 0, 0, 0) # => 2000-01-01 00:00:00 -0600
|
||||
# Time.new(2000, 1, 1, 0, 0, 59) # => 2000-01-01 00:00:59 -0600
|
||||
# Time.new(2000, 1, 1, 0, 0, 60) # => 2000-01-01 00:01:00 -0600
|
||||
#
|
||||
# +sec+ may be Float or Rational.
|
||||
#
|
||||
# Time.new(2000, 1, 1, 0, 0, 59.5) # => 2000-12-31 23:59:59.5 +0900
|
||||
# Time.new(2000, 1, 1, 0, 0, 59.7r) # => 2000-12-31 23:59:59.7 +0900
|
||||
#
|
||||
# These values may be:
|
||||
#
|
||||
# - Integers, as above.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue