1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[DOC] Shorten examples for Time#{round,floor}

This commit is contained in:
Marcus Stollsteimer 2019-05-18 13:06:49 +02:00
parent cc0e460bcc
commit 60de17258b

12
time.c
View file

@ -4177,12 +4177,6 @@ rb_time_succ(VALUE time)
* t.round(2).iso8601(10) #=> "2010-03-30T05:43:25.1200000000Z"
* t.round(3).iso8601(10) #=> "2010-03-30T05:43:25.1230000000Z"
* t.round(4).iso8601(10) #=> "2010-03-30T05:43:25.1235000000Z"
* t.round(5).iso8601(10) #=> "2010-03-30T05:43:25.1234600000Z"
* t.round(6).iso8601(10) #=> "2010-03-30T05:43:25.1234570000Z"
* t.round(7).iso8601(10) #=> "2010-03-30T05:43:25.1234568000Z"
* t.round(8).iso8601(10) #=> "2010-03-30T05:43:25.1234567900Z"
* t.round(9).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
* t.round(10).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
*
* t = Time.utc(1999,12,31, 23,59,59)
* (t + 0.4).round.iso8601(3) #=> "1999-12-31T23:59:59.000Z"
@ -4249,12 +4243,6 @@ time_round(int argc, VALUE *argv, VALUE time)
* t.floor(2).iso8601(10) #=> "2010-03-30T05:43:25.1200000000Z"
* t.floor(3).iso8601(10) #=> "2010-03-30T05:43:25.1230000000Z"
* t.floor(4).iso8601(10) #=> "2010-03-30T05:43:25.1234000000Z"
* t.floor(5).iso8601(10) #=> "2010-03-30T05:43:25.1234500000Z"
* t.floor(6).iso8601(10) #=> "2010-03-30T05:43:25.1234560000Z"
* t.floor(7).iso8601(10) #=> "2010-03-30T05:43:25.1234567000Z"
* t.floor(8).iso8601(10) #=> "2010-03-30T05:43:25.1234567800Z"
* t.floor(9).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
* t.floor(10).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
*
* t = Time.utc(1999,12,31, 23,59,59)
* (t + 0.4).floor.iso8601(3) #=> "1999-12-31T23:59:59.000Z"