304件ヒット
[1-100件を表示]
(0.108秒)
種類
- インスタンスメソッド (160)
- 特異メソッド (144)
キーワード
- - (12)
- ajd (12)
- amjd (12)
- civil (24)
-
deconstruct
_ keys (4) - httpdate (24)
- mon (12)
- monday? (12)
- month (12)
- new (24)
-
next
_ month (12) - offset (12)
-
prev
_ month (12) - rfc2822 (24)
- rfc822 (24)
-
sec
_ fraction (12) - second (12)
-
second
_ fraction (12) -
valid
_ civil? (12) -
valid
_ date? (12) - zone (12)
検索結果
先頭5件
-
DateTime
# second _ fraction -> Rational (15502.0) -
秒の小数点以下の部分を表す分数を返します。
秒の小数点以下の部分を表す分数を返します。 -
DateTime
# sec _ fraction -> Rational (12402.0) -
秒の小数点以下の部分を表す分数を返します。
秒の小数点以下の部分を表す分数を返します。 -
Date
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (12202.0) -
パターンマッチに使用する名前と値の Hash を返します。
...* :month
* :day
* :yday
* :wday
@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
d = Date.new(2022, 10, 5)
if d in wday: 3, day: ..7 # deconstruct_key......使われます
puts "first Wednesday of the month"
end
#=> "first Wednesday of the month" が出力される
case d
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 d in Date(wday: 3, day: ..7)
puts "first Wednesday of the month"
end
//}
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Date
# month -> Integer (12202.0) -
月を返します (1-12)。
月を返します (1-12)。 -
Date
# next _ month(n = 1) -> Date (12202.0) -
n ヶ月後を返します。
...n ヶ月後を返します。
Date#>> も参照してください。
@param n 月数... -
Date
# prev _ month(n = 1) -> Date (12202.0) -
n ヶ月前を返します。
...n ヶ月前を返します。
Date#<< も参照してください。
@param n 月数... -
DateTime
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (12202.0) -
パターンマッチに使用する名前と値の Hash を返します。
...* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone
@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
dt = DateTime.......dt in wday: 1..5, hour: 10..18 # deconstruct_keys が使われます
puts "Working time"
end
#=> "Working time" が出力される
case dt
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 mont......h 10" が出力される
# クラスのチェックと組み合わせて利用することもできます
if dt in DateTime(wday: 1..5, hour: 10..18, day: ..7)
puts "Working time, first week of the month"
end
//}
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Date
# mon -> Integer (9202.0) -
月を返します (1-12)。
月を返します (1-12)。 -
Date
. httpdate(str = & # 39;Mon , 01 Jan -4712 00:00:00 GMT& # 39; , start = Date :: ITALY) -> Date (9202.0) -
2616 で定められた書式の日付を解析し、 その情報に基づいて日付オブジェクトを生成します。
...で定められた書式の日付を解析し、
その情報に基づいて日付オブジェクトを生成します。
Date._httpdate も参照してください。
@param str 日付をあらわす文字列
@param start グレゴリオ暦をつかい始めた日をあらわすユリウス日... -
DateTime
# zone -> String (9202.0) -
タイムゾーンを返します。
タイムゾーンを返します。
これは、正確には時差をあらわす文字列です。