るりまサーチ

最速Rubyリファレンスマニュアル検索!
315件ヒット [301-315件を表示] (0.113秒)
トップページ > クエリ:l[x] > クエリ:h[x] > クエリ:Day[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

キーワード

検索結果

<< < ... 2 3 4 >>

Exception#==(other) -> bool (206.0)

自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。

...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。

@param other 自身と比較したいオブジェクトを指定します。...
...//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end

def get_exception
return begin
yield
rescue => e
e
end
end

results = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }...
...p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]

# class, message, backtrace が同一のため true になる
p results[0] == results[1] # => true

# class, b...

Time#strftime(format) -> String (192.0)

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

...

@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世...
...週の年の下2桁(00-99)
* %H: 24時間制の時(00-23)
* %h: %b と同等
* %I: 12時間制の時(01-12)
* %j: 年中の通算日(001-366)
* %k: 24時間制の時。一桁の場合、半角空白で埋める ( 0..23)
* %L: ミリ秒 (000..999)
* %l: 12時間制の時。一桁の場...
...me で使えます)
* %R: 24時間制の時刻。%H:%M と同等。
* %r: 12時間制の時刻。%I:%M:%S %p と同等。
* %S: 秒(00-60) (60はうるう秒)
* %s: 1970-01-01 00:00:00 UTC からの経過秒
* %T: 24時間制の時刻。%H:%M:%S と同等。
* %t: タブ文字 (\t)
* %...
<< < ... 2 3 4 >>