Export parse_date_basic() to convert a date string to timestamp
authorJonathan Nieder <jrnieder@gmail.com>
Thu, 15 Jul 2010 16:22:57 +0000 (18:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jul 2010 22:35:12 +0000 (15:35 -0700)
commit9644c0616374f8c621b10793b1732b26a0482820
tree8d241d7c138a4f2855a50a5657ab9429f9c91547
parent53b304224a561b5fd4ae35cedc0a978d91d4b1da
Export parse_date_basic() to convert a date string to timestamp

approxidate() is not appropriate for reading machine-written dates
because it guesses instead of erroring out on malformed dates.
parse_date() is less convenient since it returns its output as a
string.  So export the underlying function that writes a timestamp.

While at it, change the return value to match the usual convention:
return 0 for success and -1 for failure.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
date.c