PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Date
U:RDoc::AnyMethod[iI"commercial:ETI"Date::commercial;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"?Returns a new \Date object constructed from the arguments.;To:RDoc::Markup::BlankLine o; ; [I"@Argument +cwyear+ gives the year, and should be an integer.;T@o; ; [ I"CArgument +cweek+ gives the index of the week within the year, ;TI"2and should be in range (1..53) or (-53..-1); ;TI"4in some years, 53 or -53 will be out-of-range; ;TI";if negative, counts backward from the end of the year:;T@o:RDoc::Markup::Verbatim; [I"9Date.commercial(2022, 1, 1).to_s # => "2022-01-03" ;TI"9Date.commercial(2022, 52, 1).to_s # => "2022-12-26" ;T:@format0o; ; [ I"FArgument +cwday+ gives the indes of the weekday within the week, ;TI"0and should be in range (1..7) or (-7..-1); ;TI"1 or -7 is Monday; ;TI";if negative, counts backward from the end of the week:;T@o;; [I"9Date.commercial(2022, 1, 1).to_s # => "2022-01-03" ;TI"9Date.commercial(2022, 1, -7).to_s # => "2022-01-03" ;T; 0o; ; [I"When +cweek+ is 1:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"4If January 1 is a Friday, Saturday, or Sunday, ;TI"-the first week begins in the week after:;T@o;; [I"?Date::ABBR_DAYNAMES[Date.new(2023, 1, 1).wday] # => "Sun" ;TI"8Date.commercial(2023, 1, 1).to_s # => "2023-01-02" ;TI"8Date.commercial(2023, 1, 7).to_s # => "2023-01-08" ;T; 0o;;0; [o; ; [I"9Otherwise, the first week is the week of January 1, ;TI"=which may mean some of the days fall on the year before:;T@o;; [I"?Date::ABBR_DAYNAMES[Date.new(2020, 1, 1).wday] # => "Wed" ;TI"8Date.commercial(2020, 1, 1).to_s # => "2019-12-30" ;TI"8Date.commercial(2020, 1, 7).to_s # => "2020-01-05" ;T; 0o; ; [I"GSee argument {start}[rdoc-ref:date/calendars.rdoc@Argument+start].;T@o; ; [I".Related: Date.jd, Date.new, Date.ordinal.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"XDate.commercial(cwyear = -4712, cweek = 1, cwday = 1, start = Date::ITALY) -> date ;T0[ I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@GFI" Date;TcRDoc::NormalClass00
[+]
..
[+]
Error
[-] cwyear-i.ri
[edit]
[-] valid_commercial%3f-c.ri
[edit]
[-] commercial-c.ri
[edit]
[-] julian-i.ri
[edit]
[-] %2d-i.ri
[edit]
[-] amjd-i.ri
[edit]
[-] _iso8601-c.ri
[edit]
[-] jd-c.ri
[edit]
[-] upto-i.ri
[edit]
[-] rfc822-i.ri
[edit]
[-] valid_date%3f-c.ri
[edit]
[-] gregorian_leap%3f-c.ri
[edit]
[-] %3c%3c-i.ri
[edit]
[-] to_s-i.ri
[edit]
[-] valid_civil%3f-c.ri
[edit]
[-] _rfc822-c.ri
[edit]
[-] valid_ordinal%3f-c.ri
[edit]
[-] prev_year-i.ri
[edit]
[-] to_json-i.ri
[edit]
[-] strptime-c.ri
[edit]
[-] iso8601-i.ri
[edit]
[-] _xmlschema-c.ri
[edit]
[-] year-i.ri
[edit]
[-] %3c%3d%3e-i.ri
[edit]
[-] as_json-i.ri
[edit]
[-] rfc2822-c.ri
[edit]
[-] civil-c.ri
[edit]
[-] downto-i.ri
[edit]
[-] new-c.ri
[edit]
[-] start-i.ri
[edit]
[-] sunday%3f-i.ri
[edit]
[-] rfc3339-c.ri
[edit]
[-] valid_jd%3f-c.ri
[edit]
[-] mon-i.ri
[edit]
[-] jd-i.ri
[edit]
[-] strftime-i.ri
[edit]
[-] jisx0301-c.ri
[edit]
[-] _rfc2822-c.ri
[edit]
[-] italy-i.ri
[edit]
[-] cdesc-Date.ri
[edit]
[-] json_create-c.ri
[edit]
[-] cwday-i.ri
[edit]
[-] saturday%3f-i.ri
[edit]
[-] _rfc3339-c.ri
[edit]
[-] julian%3f-i.ri
[edit]
[-] today-c.ri
[edit]
[-] _strptime-c.ri
[edit]
[-] day-i.ri
[edit]
[-] rfc822-c.ri
[edit]
[-] cweek-i.ri
[edit]
[-] parse-c.ri
[edit]
[-] day_fraction-i.ri
[edit]
[-] deconstruct_keys-i.ri
[edit]
[-] mday-i.ri
[edit]
[-] gregorian%3f-i.ri
[edit]
[-] step-i.ri
[edit]
[-] %3d%3d%3d-i.ri
[edit]
[-] ajd-i.ri
[edit]
[-] asctime-i.ri
[edit]
[-] leap%3f-i.ri
[edit]
[-] infinite%3f-i.ri
[edit]
[-] rfc2822-i.ri
[edit]
[-] next_month-i.ri
[edit]
[-] new_start-i.ri
[edit]
[-] friday%3f-i.ri
[edit]
[-] _httpdate-c.ri
[edit]
[-] %3e%3e-i.ri
[edit]
[-] xmlschema-i.ri
[edit]
[-] xmlschema-c.ri
[edit]
[-] england-i.ri
[edit]
[-] _parse-c.ri
[edit]
[-] ld-i.ri
[edit]
[-] prev_month-i.ri
[edit]
[-] prev_day-i.ri
[edit]
[-] next_day-i.ri
[edit]
[-] leap%3f-c.ri
[edit]
[-] next_year-i.ri
[edit]
[-] rfc3339-i.ri
[edit]
[-] %2b-i.ri
[edit]
[-] tuesday%3f-i.ri
[edit]
[-] yday-i.ri
[edit]
[-] mjd-i.ri
[edit]
[-] jisx0301-i.ri
[edit]
[-] succ-i.ri
[edit]
[-] gregorian-i.ri
[edit]
[-] to_time-i.ri
[edit]
[-] to_datetime-i.ri
[edit]
[-] ctime-i.ri
[edit]
[-] thursday%3f-i.ri
[edit]
[-] httpdate-i.ri
[edit]
[-] wednesday%3f-i.ri
[edit]
[-] wday-i.ri
[edit]
[-] inspect-i.ri
[edit]
[-] _jisx0301-c.ri
[edit]
[-] monday%3f-i.ri
[edit]
[-] julian_leap%3f-c.ri
[edit]
[-] next-i.ri
[edit]
[-] ordinal-c.ri
[edit]
[-] httpdate-c.ri
[edit]
[-] iso8601-c.ri
[edit]
[-] to_date-i.ri
[edit]
[-] month-i.ri
[edit]