るりまサーチ

最速Rubyリファレンスマニュアル検索!
5019件ヒット [1-100件を表示] (0.131秒)
トップページ > クエリ:I[x] > クエリ:time[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

time (44060.0)

組み込みの Time クラスを拡張します。 日時を表す文字列をパースして Time オブジェクトに変換したり、 逆に Time オブジェクトを RFC などで定められた文字列に 変換する機能を提供します。

...組み込みの Time クラスを拡張します。
日時を表す文字列をパースして Time オブジェクトに変換したり、
逆に Time オブジェクトを RFC などで定められた文字列に
変換する機能を提供します。

* date-time は 2822 で定義されてい...
...ます。
* HTTP-date は 2616 で定義されています。
* dateTime は XML Schema Part 2: Datatypes (ISO 8601) で定義されています。
* 文字列から Time オブジェクトへの変換では Date._parse により様々な形式を扱えます。...

Time.strptime(date, format, now=self.now) -> Time (32448.0)

文字列を Date._strptime を用いて Time オブジェクト に変換します。

...time を用いて Time オブジェクト
に変換します。

require 'time'
Time
.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900

ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time
.strptime...
...('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
i
f y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}
#=> 1991-05-18 04:13:00 +0900

Time
.strptime('01/5/18 4:13:00', '%Y/%m/%d %T'){|y|
i
f y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}...
...#=> 2001-05-18 04:13:00 +0900

詳しくは DateTime.strptime, Date.strptime を見てください。

@param date 時刻を表す文字列
@param format 書式文字列...

Time.strptime(date, format, now=self.now) {|y| ... } -> Time (32448.0)

文字列を Date._strptime を用いて Time オブジェクト に変換します。

...time を用いて Time オブジェクト
に変換します。

require 'time'
Time
.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900

ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time
.strptime...
...('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
i
f y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}
#=> 1991-05-18 04:13:00 +0900

Time
.strptime('01/5/18 4:13:00', '%Y/%m/%d %T'){|y|
i
f y > 100 then y
elsif y >= 69 then y + 1900
else y + 2000
end
}...
...#=> 2001-05-18 04:13:00 +0900

詳しくは DateTime.strptime, Date.strptime を見てください。

@param date 時刻を表す文字列
@param format 書式文字列...

Integer#times -> Enumerator (32200.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...

Integer#times {|n| ... } -> self (32200.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@see Integer#upto, Integer#downto, Numeric#step...

絞り込み条件を変える

IO#wait_writable(timeout) -> self | nil (29300.0)

self が書き込み可能になるまでブロックし、書き込み可能になったら self を 返します。

...、書き込み可能になったら self を
返します。

time
out を指定した場合は、指定秒数経過するまでブロックし、タイムアウト
した場合は nil を返します。

@param timeout タイムアウトまでの秒数を指定します。

@see IO#wait_readable...

IO#wait(timeout = nil) -> bool | self | nil (26200.0)

self が読み込み可能になるまでブロックし、読み込み可能になったら 真値を返します。タイムアウト、もしくはEOFで それ以上読みこめない場合は偽の値を返します。

...

time
out を指定した場合は、指定秒数経過するまでブロックし、タ
イムアウトした場合は nil を返します。

self が EOF に達していれば false を返します。

@param timeout タイムアウトまでの秒数を指定します。


@see IO#wait_writabl...

IO#wait_readable(timeout = nil) -> bool | self | nil (26200.0)

self が読み込み可能になるまでブロックし、読み込み可能になったら 真値を返します。タイムアウト、もしくはEOFで それ以上読みこめない場合は偽の値を返します。

...

time
out を指定した場合は、指定秒数経過するまでブロックし、タ
イムアウトした場合は nil を返します。

self が EOF に達していれば false を返します。

@param timeout タイムアウトまでの秒数を指定します。


@see IO#wait_writabl...

VALUE rb_time_timespec_new(const struct timespec *ts, int offset) (24616.0)

引数 ts、offset を元に Time オブジェクトを作成して返します。

...元に Time オブジェクトを作成して返します。

@param ts timespec 構造体のポインタ

@param offset 協定世界時との時差(秒)。
-86400 < offset < 86400 の場合は指定した時差に、INT_MAX
を指定した場合は地方時、INT_MAX-1...
...を指定した場合は UTC に
なります。

@raise ArgumentError offset に上述の範囲以外の値を指定した場合に発生し
ます。...

Time#to_time -> Time (24418.0)

対応する Time オブジェクトを返します。

...対応する Time オブジェクトを返します。...

絞り込み条件を変える

<< 1 2 3 ... > >>