Issue #15418 has been reported by foonlyboy (Eike Dierks).

----------------------------------------
Misc #15418: Date.parse('2018')
https://bugs.ruby-lang.org/issues/15418

* Author: foonlyboy (Eike Dierks)
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Date.parse('2018')
ArgumentError: invalid date

I did expect that to return the same as:
Date.parse('2018-1-1')
=> Mon, 01 Jan 2018

working with dates and times is really weird and complicated,
so it makes sense to be strict with parsing.

I watched this one:
https://www.youtube.com/watch?v=-5wpm-gesOY
He's really coming up with some some crazy test cases. 

In ruby this is split between Time and DateTime,
some in the core, some in in the standard lib.

---

Im looking forward for the new version,
let's freeze the strings!


~eike












-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>