るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Time#getutc -> Time (6256.0)

タイムゾーンを協定世界時に設定した Time オブジェクトを新しく 生成して返します。

...に設定した Time オブジェクトを新しく
生成して返します。

//emlist[][ruby]{
p t = Time.local(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 +0900
p t.gmt? #=> false
p y = t.getgm #=> 2000-01-01 11:15:01 UTC
p y.gmt?...
...#=> true
p t == y #=> true
//}...

Time#to_i -> Integer (6250.0)

起算時からの経過秒数を整数で返します。

...起算時からの経過秒数を整数で返します。

//emlist[][ruby]{
t
= Time.local(2000,1,2,3,4,5,6)
p t # => 2000-01-02 03:04:05 +0900
p "%10.6f" % t.to_f # => "946749845.000006"
p t.to_i # => 946749845
p t.tv_sec # => 946749845
//}...

Time#tv_sec -> Integer (6250.0)

起算時からの経過秒数を整数で返します。

...起算時からの経過秒数を整数で返します。

//emlist[][ruby]{
t
= Time.local(2000,1,2,3,4,5,6)
p t # => 2000-01-02 03:04:05 +0900
p "%10.6f" % t.to_f # => "946749845.000006"
p t.to_i # => 946749845
p t.tv_sec # => 946749845
//}...

Time#to_f -> Float (6244.0)

起算時からの経過秒数を浮動小数点数で返します。1 秒に満たない経過も 表現されます。

...らの経過秒数を浮動小数点数で返します。1 秒に満たない経過も
表現されます。

//emlist[][ruby]{
t
= Time.local(2000,1,2,3,4,5,6)
p t # => 2000-01-02 03:04:05 +0900
p "%10.6f" % t.to_f # => "946749845.000006"
p t.to_i # => 946749845
//}...

Time#deconstruct_keys(array_of_names_or_nil) -> Hash (6238.0)

パターンマッチに使用する名前と値の Hash を返します。

...month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。

//emlist[例][ruby]{
t
= Time.utc(2...
...if t in wday: 3, day: ..7 # deconstruct_keys が使われます
puts "first Wednesday of the month"
end
#=> "first Wednesday of the month" が出力される

case t
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"...
...end
#=> "working day in month 10" が出力される

# クラスのチェックと組み合わせて利用することもできます
if t in Time(wday: 3, day: ..7)
puts "first Wednesday of the month"
end
//}

@see d:spec/pattern_matching#matching_non_primitive_objects...

絞り込み条件を変える

Time#month -> Integer (6238.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#to_r -> Rational (6238.0)

起算時からの経過秒数を有理数で返します。1 秒に満たない経過も 表現されます。

...起算時からの経過秒数を有理数で返します。1 秒に満たない経過も
表現されます。

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

Time#saturday? -> bool (6232.0)

self の表す時刻が土曜日である場合に true を返します。 そうでない場合に false を返します。

...self の表す時刻が土曜日である場合に true を返します。
そうでない場合に false を返します。

//emlist[][ruby]{
t
= Time.local(2006, 6, 10) # => 2006-06-10 00:00:00 +0900
p t.saturday? # => true
//}...

Time#thursday? -> bool (6232.0)

self の表す時刻が木曜日である場合に true を返します。 そうでない場合に false を返します。

...self の表す時刻が木曜日である場合に true を返します。
そうでない場合に false を返します。

//emlist[][ruby]{
t
= Time.local(1995, 12, 21) # => 1995-12-21 00:00:00 +0900
p t.thursday? # => true
//}...

Time#tuesday? -> bool (6232.0)

self の表す時刻が火曜日である場合に true を返します。 そうでない場合に false を返します。

...self の表す時刻が火曜日である場合に true を返します。
そうでない場合に false を返します。

//emlist[][ruby]{
t
= Time.local(1991, 2, 19) # => 1991-02-19 00:00:00 +0900
p t.tuesday? # => true
//}...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>