D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Date
/
Filename :
_parse-c.ri
back
Copy
U:RDoc::AnyMethod[iI"_parse:ETI"Date::_parse;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"<b>Note</b>: ;TI"4This method recognizes many forms in +string+, ;TI" but it is not a validator. ;TI"For formats, see ;TI"{{"Specialized Format Strings" in Formats for Dates and Times}[rdoc-ref:strftime_formatting.rdoc@Specialized+Format+Strings];To:RDoc::Markup::BlankLine o; ; [I"0If +string+ does not specify a valid date, ;TI""the result is unpredictable; ;TI"+consider using Date._strptime instead.;T@o; ; [I"3Returns a hash of values parsed from +string+:;T@o:RDoc::Markup::Verbatim; [I"EDate._parse('2001-02-03') # => {:year=>2001, :mon=>2, :mday=>3} ;T:@format0o; ; [I"NIf +comp+ is +true+ and the given year is in the range <tt>(0..99)</tt>, ;TI"&the current century is supplied; ;TI"+otherwise, the year is taken as given:;T@o;; [I"JDate._parse('01-02-03', true) # => {:year=>2001, :mon=>2, :mday=>3} ;TI"GDate._parse('01-02-03', false) # => {:year=>1, :mon=>2, :mday=>3} ;T; 0o; ; [I"8See argument {limit}[rdoc-ref:Date@Argument+limit].;T@o; ; [I"1Related: Date.parse(returns a \Date object).;T: @fileI"ext/date/date_core.c;T:0@omit_headings_from_table_of_contents_below0I":Date._parse(string, comp = true, limit: 128) -> hash ;T0[ I"(*args);T@-FI" Date;TcRDoc::NormalClass00