On Mon, 14 Nov 2005, Randal L. Schwartz wrote:
git-rev-parse calls GNU date externally for --since, --after, --before,
and --until, which will fail on at least OpenBSD and Mac OSX (Darwin).
At a minimum, this code can be commented out on such platforms. Better
would be to have some sort of suitable replacement.
I really wanted to do the date parsing myself, rather than call out to
date, but I got lazy.
It shouldn't be all that difficult to do some trivial cases (gnu date
handles totally insane things, we could easily do with just a simpler
thing).
Anybody want to handle
- partial real dates ("August 5th" - figure out the year automatically,
and notice that it might be _last_ year since the date only makes
sense if it's in the past)
- relative dates ("5 days ago", "yesterday", "one week ago")
It shouldn't be that hard, and if you do _not_ touch the date.c functions
(which have to be totally dependable) you can be pretty damn lazy and lax
and just guess a lot.
Linus