146件ヒット
[1-100件を表示]
(0.090秒)
ライブラリ
- date (146)
検索結果
先頭5件
-
Date
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (6102.0) -
パターンマッチに使用する名前と値の Hash を返します。
...[ruby]{
d = Date.new(2022, 10, 5)
if d in wday: 3, day: ..7 # deconstruct_keys が使われます
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......g 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
# julian -> Date (6102.0) -
このメソッドは、new_start(Date::JULIAN) と等価です。
...このメソッドは、new_start(Date::JULIAN) と等価です。
Date#new_start、および Date::JULIAN を参照してください。... -
Date
# julian? -> bool (6102.0) -
ユリウス暦なら真を返します。
ユリウス暦なら真を返します。 -
Date
# saturday? -> bool (6102.0) -
土曜日なら真を返します。
土曜日なら真を返します。 -
Date
# sunday? -> bool (6102.0) -
日曜日なら真を返します。
日曜日なら真を返します。 -
Date
# thursday? -> bool (6102.0) -
木曜日なら真を返します。
木曜日なら真を返します。 -
Date
# tuesday? -> bool (6102.0) -
火曜日なら真を返します。
火曜日なら真を返します。 -
Date
# upto(max) -> Enumerator (6102.0) -
このメソッドは、step(max, 1){|date| ...} と等価です。
...このメソッドは、step(max, 1){|date| ...} と等価です。
@param max 日付オブジェクト
@see Date#step, Date#downto... -
Date
# upto(max) {|date| . . . } -> self (6102.0) -
このメソッドは、step(max, 1){|date| ...} と等価です。
...このメソッドは、step(max, 1){|date| ...} と等価です。
@param max 日付オブジェクト
@see Date#step, Date#downto... -
Date
# succ -> Date (3102.0) -
翌日の日付オブジェクトを返します。
翌日の日付オブジェクトを返します。