git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Linus TorvaldsNext: Jeff King
Message 3 of 6 in “Improve on 'approxidate'”
  1. Linus TorvaldsAug 22, 2009
  2. Further 'approxidate' improvementsLinus Torvalds, Aug 23, 2009
  3. Nicolas PitreAug 23, 2009
  4. Jeff KingAug 30, 2009
  5. Jeff KingAug 31, 2009
  6. Linus TorvaldsSep 1, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.