Gestionnaire de fichiers - Editer - /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Time/round-i.ri
Arrière
U:RDoc::AnyMethod[iI" round:ETI"Time#round;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"VRounds sub seconds to a given precision in decimal digits (0 digits by default). ;TI"#It returns a new Time object. ;TI"2+ndigits+ should be zero or positive integer.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [ I"require 'time' ;TI" ;TI"7t = Time.utc(2010,3,30, 5,43,"25.123456789".to_r) ;TI"Ep t.iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" ;TI"Ep t.round.iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" ;TI"Ep t.round(0).iso8601(10) #=> "2010-03-30T05:43:25.0000000000Z" ;TI"Ep t.round(1).iso8601(10) #=> "2010-03-30T05:43:25.1000000000Z" ;TI"Ep t.round(2).iso8601(10) #=> "2010-03-30T05:43:25.1200000000Z" ;TI"Ep t.round(3).iso8601(10) #=> "2010-03-30T05:43:25.1230000000Z" ;TI"Ep t.round(4).iso8601(10) #=> "2010-03-30T05:43:25.1235000000Z" ;TI"Ep t.round(5).iso8601(10) #=> "2010-03-30T05:43:25.1234600000Z" ;TI"Ep t.round(6).iso8601(10) #=> "2010-03-30T05:43:25.1234570000Z" ;TI"Ep t.round(7).iso8601(10) #=> "2010-03-30T05:43:25.1234568000Z" ;TI"Ep t.round(8).iso8601(10) #=> "2010-03-30T05:43:25.1234567900Z" ;TI"Ep t.round(9).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" ;TI"Ep t.round(10).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"Ep((t + 0.4).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z" ;TI"Ep((t + 0.49).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z" ;TI"Ep((t + 0.5).round.iso8601(3)) #=> "2000-01-01T00:00:00.000Z" ;TI"Ep((t + 1.4).round.iso8601(3)) #=> "2000-01-01T00:00:00.000Z" ;TI"Ep((t + 1.49).round.iso8601(3)) #=> "2000-01-01T00:00:00.000Z" ;TI"Ep((t + 1.5).round.iso8601(3)) #=> "2000-01-01T00:00:01.000Z" ;TI" ;TI"(t = Time.utc(1999,12,31, 23,59,59) ;TI"Op (t + 0.123456789).round(4).iso8601(6) #=> "1999-12-31T23:59:59.123500Z";T:@format0: @fileI"time.c;T:0@omit_headings_from_table_of_contents_below0I")time.round([ndigits]) -> new_time ;T0[ I"(p1 = v1);T@.FI" Time;TcRDoc::NormalClass00
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages