Re: Further 'approxidate' improvements
- From
Nicolas Pitre <nico@cam.org>
- Date
- Aug 23, 2009, 02:08 UTC
- Message-ID
- <alpine.LFD.2.00.0908222204590.6044@xanadu.home>
- In-Reply-To
- <alpine.LFD.2.01.0908221759420.3158@localhost.localdomain>
On Sat, 22 Aug 2009, Linus Torvalds wrote:
Show 9 quoted lines
> So trying to date-parse nonsensical crud still gives odd results: > > I ate six hot-dogs in June -> Sat Jun 6 18:09:26 2009 > > because it parses "six" and "June" and then puts it together as a date, > and then adds the current time (and year) and is happy. > > But parsing random things amusingly is a _feature_. Misparsing something > that makes sense as a date is a bug.
Maybe that would be a good idea to write a test just for this, so known cases making sense aren't accidentally broken by eventual modifications to add more such cases.
Nicolas