From: Linus Torvalds <torvalds@linux-foundation.org>
To: Stephan Beyer <s-beyer@gmx.net>
Cc: sverre@rabbelier.nl, Brandon Casey <casey@nrlssc.navy.mil>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Date parsing
Date: Sat, 21 Jun 2008 15:37:04 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0806211530560.2926@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0806211507370.2926@woody.linux-foundation.org>
On Sat, 21 Jun 2008, Linus Torvalds wrote:
>
> Remember: the git date handling was _not_ meant to be a generic date
> library. It is very much meant to be a *git* date library.
Btw, I'm not proud of that. The whole of "date.c" was a huge hack to
overcome the fact that
- standard library date parsing is pure and utter shit, even for standard
date formats.
- Never mind the standard date formats, very few seem to do the relative
dateslike "10 days ago".
- So I couldn't find anybody elses code to "borrow" that did a reasonable
job and handled the nice relative dates too.
The GNU "date" command has pretty good support for doing things like "5
minutes ago", but I think I tried to look at the code, and quicky decided
that it was not an option (when I say "I think I tried", I have to admit
that I don't have strong memories from it, but I suspect it was all so
utterly horrid that I repressed the episode).
I don't mind using other peoples code (the whole xdiff library and the
SHA1 stuff was certainly all from outside), but it needs to be in a format
that doesn't cause projectile vomiting.
If somebody has a good date parser, I think we could drop the git-specific
one in an instant.
Or if somebody wants to just improve on it... Hint, hint.
Linus
next prev parent reply other threads:[~2008-06-21 22:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 14:58 Date parsing Sverre Rabbelier
2008-06-10 15:07 ` Johannes Sixt
2008-06-10 15:27 ` Sverre Rabbelier
2008-06-10 15:10 ` Brandon Casey
2008-06-10 15:31 ` Sverre Rabbelier
2008-06-10 16:55 ` Linus Torvalds
2008-06-10 17:51 ` Sverre Rabbelier
2008-06-21 21:52 ` Stephan Beyer
2008-06-21 22:28 ` Linus Torvalds
2008-06-21 22:37 ` Linus Torvalds [this message]
2008-06-21 22:40 ` Stephan Beyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0806211530560.2926@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
--cc=s-beyer@gmx.net \
--cc=sverre@rabbelier.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox