[ruby-core:90552] [Ruby trunk Misc#15418] Date.parse('2018')

From: foonlyboy@...
Date: 2018-12-15 18:43:58 UTC
List: ruby-core #90552
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:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next