650件ヒット
[1-100件を表示]
(0.125秒)
ライブラリ
- date (638)
-
json
/ add / date (12)
キーワード
- + (12)
- - (12)
- << (12)
- <=> (12)
- >> (12)
- ajd (12)
- amjd (12)
- asctime (12)
- ctime (12)
- cwday (12)
- cweek (12)
- cwyear (12)
- day (12)
-
deconstruct
_ keys (2) - downto (24)
- england (12)
- gregorian (12)
- gregorian? (12)
- httpdate (12)
- iso8601 (12)
- jd (12)
- jisx0301 (12)
- julian (12)
- julian? (12)
- ld (12)
- mday (12)
- mjd (12)
- mon (12)
- monday? (12)
- month (12)
-
new
_ start (12) - next (12)
-
next
_ day (12) -
next
_ month (12) -
next
_ year (12) -
prev
_ day (12) -
prev
_ month (12) -
prev
_ year (12) - rfc2822 (12)
- rfc3339 (12)
- rfc822 (12)
- start (12)
- step (12)
- strftime (12)
- succ (12)
- sunday? (12)
-
to
_ json (12) -
to
_ s (12) - upto (12)
- wday (12)
- wednesday? (12)
- xmlschema (12)
- yday (12)
- year (12)
検索結果
先頭5件
-
Date
# month -> Integer (6202.0) -
月を返します (1-12)。
月を返します (1-12)。 -
Date
# next _ year(n = 1) -> Date (6131.0) -
n 年後を返します。
...n 年後を返します。
self >> (n * 12) に相当します。
//emlist[例][ruby]{
require 'date'
Date.new(2001,2,3).next_year #=> #<Date: 2002-02-03 ...>
Date.new(2008,2,29).next_year #=> #<Date: 2009-02-28 ...>
Date.new(2008,2,29).next_year(4) #=> #<Date: 2012-02-29 ...>
//}
Date#......>> も参照してください。
@param n 年数... -
Date
# next _ day(n = 1) -> Date (6125.0) -
n 日後を返します。
...n 日後を返します。
Date#succ も参照してください。
@param n 日数... -
Date
# next _ month(n = 1) -> Date (6125.0) -
n ヶ月後を返します。
...n ヶ月後を返します。
Date#>> も参照してください。
@param n 月数... -
Date
# prev _ month(n = 1) -> Date (6125.0) -
n ヶ月前を返します。
...n ヶ月前を返します。
Date#<< も参照してください。
@param n 月数... -
Date
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (6102.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_......れます
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
# downto(min) -> Enumerator (6102.0) -
このメソッドは、step(min, -1){|date| ...} と等価です。
...このメソッドは、step(min, -1){|date| ...} と等価です。
@param min 日付オブジェクト
@see Date#step, Date#upto... -
Date
# downto(min) {|date| . . . } -> self (6102.0) -
このメソッドは、step(min, -1){|date| ...} と等価です。
...このメソッドは、step(min, -1){|date| ...} と等価です。
@param min 日付オブジェクト
@see Date#step, Date#upto... -
Date
# england -> Date (6102.0) -
このメソッドは、new_start(Date::ENGLAND) と等価です。
...このメソッドは、new_start(Date::ENGLAND) と等価です。
Date#new_start、および Date::ENGLAND を参照してください。... -
Date
# gregorian -> Date (6102.0) -
このメソッドは、new_start(Date::GREGORIAN) と等価です。
...このメソッドは、new_start(Date::GREGORIAN) と等価です。
Date#new_start、および Date::GREGORIAN を参照してください。...