Ruby/Справочник/Time: различия между версиями

Содержимое удалено Содержимое добавлено
м Откат правок 86.45.183.237 (обс.) к версии Ashikbot
Строка 105:
Synonym for <tt>Time.new</tt>.
Returns a <tt>Time</tt> object initialized to the current system time. <b>Note:</b> The object created will be created using the resolution available on your system clock, and so may include fractional seconds.
<code>a = Time.newnow #=&gt; Wed Apr 09 08:56:03 CDT 2003
b = Time.newnow #=> Wed Apr 09 08:56:03 CDT 2003
a == b #=> falseTrue
"%.6f" % a.to_f #=> "1049896563.230740"
"%.6f" % b.to_f #=> "1049896563.231466"</code>