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

[PATCH 0/2] relative future date

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 16, 2012, 23:02 UTC
Message-ID
<1345158123-22189-1-git-send-email-gitster@pobox.com>
In-Reply-To
<1341505087-13632-1-git-send-email-tomxue0126@gmail.com>
Jundong Xue <tomxue0126@gmail.com> writes:
Show 8 quoted lines
> tomxue@ubuntu:~/mycode/life$ git todo
> * d768da9 - (in the future: 3 hours later) Meeting with vendor
> * 5fcd556 - (in the future: 12 days later) Take my personal ho
> * 9dd280b - (in the future: 11 months later)
> * 4680099 - (in the future: 9 months later)
> * 59d5266 - (in the future: 8 months later)
> * b5308da - (in the future: 7 months later)
> ...

I was re-reading the backlog and after looking at it again, I do not think what the patch tries to do is a bad thing per-se. There are changes I want to see _how_ it is done, though.

Especially, the duplication of the exact same logic in the future and in the past was an unmaintainable mess.

Here is an attempt to clean it up.

Opinions? If the list finds this is a worthwhile thing to do (I am neutral), it needs help from i18n people to mark format messages up properly again.

Thanks.
Junio C Hamano (2):
  date: refactor the relative date logic from presentation
  date: show relative dates in the future
 date.c          | 187 +++++++++++++++++++++++++++++++++++++++++++-------------
 t/t0006-date.sh |   2 +
 2 files changed, 146 insertions(+), 43 deletions(-)
-- 
1.7.12.rc3.69.gaf0166d
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 8 in “Can show relative date of the commit with future timestamp”
  1. Can show relative date of the commit with future timestampTom Xue, Jul 5, 2012
  2. Junio C HamanoJul 5, 2012
  3. 0/2 relative future dateJunio C Hamano, Aug 16, 2012
  4. 1/2 date: refactor the relative date logic from presentationJunio C Hamano, Aug 16, 2012
  5. 2/2 date: show relative dates in the futureJunio C Hamano, Aug 16, 2012
  6. Jundong XueJul 6, 2012
  7. Junio C HamanoAug 20, 2012
  8. Jundong XueAug 21, 2012

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.