るりまサーチ

最速Rubyリファレンスマニュアル検索!
440件ヒット [201-300件を表示] (0.106秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 > >>

Time#ctime -> String (114.0)

時刻を asctime(3) の形式の文字列に変換します。た だし、末尾の改行文字 "\n" は含まれません。

...を asctime(3) の形式の文字列に変換します。た
だし、末尾の改行文字 "\n" は含まれません。

戻り値の文字エンコーディングは Encoding::US_ASCII です。

//emlist[][ruby]{
p Time.local(2000).asctime # => "Sat Jan 1 00:00:00 2000"
p Time.local(...
...2000).asctime.encoding # => #<Encoding:US-ASCII>
p Time.local(2000).ctime # => "Sat Jan 1 00:00:00 2000"
//}...

Time#day -> Integer (114.0)

日を整数で返します。

...日を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.day # => 2
p t.mday # => 2
//}...

Time#eql?(other) -> bool (114.0)

other が Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に true を返します。そうでない場合に false を返します。

...other Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に
true を返します。そうでない場合に false を返します。

@param other 自身と比較したい時刻を Time オブジェクトを指定します。

//emlist[][ruby]{
p Time.lo...
...cal(2000, 1, 1).eql?(Time.local(2000, 1, 1)) # => true
p Time.local(2000, 1, 1).eql?(Time.local(2000, 1, 2)) # => false
//}...

Time#inspect -> String (114.0)

時刻を文字列に変換した結果を返します。

...刻を文字列に変換した結果を返します。

Time
#to_s とは異なりナノ秒まで含めて返します。

//emlist[][ruby]{
t = Time.now
t.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
t.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.2612...
...57655 +0100"

t.utc.inspect #=> "2012-11-10 17:16:12.261257655 UTC"
t.strftime "%Y-%m-%d %H:%M:%S.%N UTC" #=> "2012-11-10 17:16:12.261257655 UTC"
//}

戻り値の文字エンコーディングは Encoding::US_ASCII です。...

Time#mday -> Integer (114.0)

日を整数で返します。

...日を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.day # => 2
p t.mday # => 2
//}...

絞り込み条件を変える

Time#min -> Integer (114.0)

分を整数で返します。

...分を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.min # => 4
//}...

Time#mon -> Integer (114.0)

月を整数で返します。

...月を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.month # => 1
p t.mon # => 1
//}...

Time#month -> Integer (114.0)

月を整数で返します。

...月を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5) # => 2000-01-02 03:04:05 +0900
p t.month # => 1
p t.mon # => 1
//}...

Time#nsec -> Integer (114.0)

時刻のナノ秒の部分を整数で返します。

...の部分を整数で返します。

//emlist[][ruby]{
t = Time.local(2000,1,2,3,4,5,6)
p "%10.9f" % t.to_f # => "946749845.000005960"
p t.nsec # => 6000
//}

IEEE 754 浮動小数点数で表現できる精度が違うため、Time#to_fの最小
の桁とnsecの最小の桁は異な...
<< < 1 2 3 4 5 > >>