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

Re: [PATCH] builtin-commit: add --date option

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2009, 17:55 UTC
Message-ID
<7vaay1gt0z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vpr6xgtxn.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 21 quoted lines
> Miklos Vajna <vmiklos@frugalware.org> writes:
> ...
>> Is there any documentation describing what does parse_date() accept?
>>
>> Based on t0006-date.sh and the comments in the source, I see 3 supported
>> formats:
>>
>> 1) <unix timestamp> <timezone>
>>
>> 2) A format like 2008-12-02 18:04:00
>>
>> 3) RFC 2822 (Thu, 21 Dec 2000 16:01:07 +0200)
>
> The above are all supported (you can label 2 as ISO even though the
> official ISO8601 wants "T" instead of " " between date and time).
>
> For more amusing ones, see
>
>     http://article.gmane.org/gmane.comp.version-control.git/12241
>
> and follow the discussion there ;-)

I should have mentioned ones with more importance in real-life before referring you to the amusing ones: US and European dates.

date.c::match_multi_number() groks these:
    mm/dd/yy[yy] (US)
    dd.mm.yy[yy] (European)
Previous: Junio C HamanoNext: Miklos Vajna
Message 4 of 12 in “builtin-commit: add --date option”
  1. builtin-commit: add --date optionMiklos Vajna, Dec 1, 2009
  2. Miklos VajnaDec 2, 2009
  3. Junio C HamanoDec 2, 2009
  4. Junio C HamanoDec 2, 2009
  5. Miklos VajnaDec 2, 2009
  6. Jeff KingDec 2, 2009
  7. Miklos VajnaDec 2, 2009
  8. Jeff KingDec 2, 2009
  9. Junio C HamanoDec 2, 2009
  10. Miklos VajnaDec 2, 2009
  11. Miklos VajnaDec 2, 2009
  12. Jeff KingDec 2, 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.