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

Re: Improve on 'approxidate'

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Sep 1, 2009, 03:27 UTC
Message-ID
<alpine.LFD.2.00.0908311725260.21913@eeepc.linux-foundation.org>
In-Reply-To
<20090830223558.GA29807@coredump.intra.peff.net>
On Sun, 30 Aug 2009, Jeff King wrote:
Show 6 quoted lines
> 
> This breaks relative dates like "3.months.ago", because
> approxidate_alpha needs to see the "current" date in tm (and now it sees
> -1, subtracts from it, and assumes we are just crossing a year boundary
> because of the negative).  3.years.ago is also broken, but I don't think
> 3.days.ago is.

Gaah. Thanks for noticing and the fixes. I had tested the relative modes, but only the "fixed offset" ones (days, hours, minutes, seconds), not the months and years cases.

			Linus
Previous: Jeff King
Message 6 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.