Flowdock
parse(p1 = v1, p2 = v2, p3 = v3) public

Parses the given representation of date and time, and creates a date object.

If the optional second argument is true and the detected year is in the range “00” to “99”, considers the year a 2-digit form and makes it full.

For example:

Date.parse('2001-02-03')          #=> #<Date: 2001-02-03 ...>
Date.parse('20010203')            #=> #<Date: 2001-02-03 ...>
Date.parse('3rd Feb 2001')        #=> #<Date: 2001-02-03 ...>
Show source
Register or log in to add new notes.