9件ヒット
[1-9件を表示]
(0.118秒)
キーワード
- == (1)
-
backtrace
_ locations (1) - mon (2)
-
next
_ month (1) -
prev
_ month (1) - strftime (1)
検索結果
先頭5件
-
Time
# month -> Integer (63625.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
//} -
Date
# month -> Integer (63607.0) -
月を返します (1-12)。
月を返します (1-12)。 -
Date
# next _ month(n = 1) -> Date (36607.0) -
n ヶ月後を返します。
n ヶ月後を返します。
Date#>> も参照してください。
@param n 月数 -
Date
# prev _ month(n = 1) -> Date (36607.0) -
n ヶ月前を返します。
n ヶ月前を返します。
Date#<< も参照してください。
@param n 月数 -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (27730.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
Time
# mon -> Integer (18325.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
//} -
Date
# mon -> Integer (18307.0) -
月を返します (1-12)。
月を返します (1-12)。 -
Exception
# ==(other) -> bool (9166.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
自身と異なるクラスのオブジェクトを指定した場合は
Exception#exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if D... -
Time
# strftime(format) -> String (94.0) -
時刻を format 文字列に従って文字列に変換した結果を返します。
時刻を format 文字列に従って文字列に変換した結果を返します。
@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。
* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月の名称(January, February ... )
* %b: 月の省略名(Jan, Feb ... )
* %C: 世紀 (2009年であれば 20)
* %c: 日付と時刻 (%a %b %e %T %Y)
* %D: 日付 (%m/%d/%y)
* ...