るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. socket af_local
  2. socket pf_local
  3. socket local_creds
  4. socket local_peercred
  5. socket local_connwait

クラス

検索結果

Time#<=>(other) -> -1 | 0 | 1 | nil (54433.0)

self と other の時刻を比較します。self の方が大きい場合は 1 を、等しい場合は 0 を、 小さい場合は -1 を返します。比較できない場合は、nil を返します。

self と other の時刻を比較します。self の方が大きい場合は 1 を、等しい場合は 0 を、
小さい場合は -1 を返します。比較できない場合は、nil を返します。

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

//emlist[][ruby]{
p t = Time.local(2000) # => 2000-01-01 00:00:00 +0900
p t2 = t + 2592000 # => 2000-01-31 00:00:00 +0900
p t <=> t2 # => -1
p ...