D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Date
/
Filename :
new-c.ri
back
Copy
U:RDoc::AnyMethod[iI"new:ETI"Date::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"EReturns a new \Date object constructed from the given arguments:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"2Date.new(2022).to_s # => "2022-01-01" ;TI"2Date.new(2022, 2).to_s # => "2022-02-01" ;TI"2Date.new(2022, 2, 4).to_s # => "2022-02-04" ;T:@format0o; ; [I"EArgument +month+ should be in range (1..12) or range (-12..-1); ;TI"Mwhen the argument is negative, counts backward from the end of the year:;T@o;; [I"3Date.new(2022, -11, 4).to_s # => "2022-02-04" ;T; 0o; ; [I"AArgument +mday+ should be in range (1..n) or range (-n..-1) ;TI"3where +n+ is the number of days in the month; ;TI"Nwhen the argument is negative, counts backward from the end of the month.;T@o; ; [I"GSee argument {start}[rdoc-ref:date/calendars.rdoc@Argument+start].;T@o; ; [I"Related: Date.jd.;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I"NDate.new(year = -4712, month = 1, mday = 1, start = Date::ITALY) -> date ;T0[ I")(p1 = v1, p2 = v2, p3 = v3, p4 = v4);T@&FI" Date;TcRDoc::NormalClass00