Re: [PATCH 1/8] Export parse_date_basic() to convert a date string to timestamp
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 15, 2010, 17:25 UTC
- Message-ID
- <20100715172506.GA23989@burratino>
- In-Reply-To
- <1279210984-31604-2-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
Show 7 quoted lines
> 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.
Junio: I think this should be ejected from the series as an independently useful cleanup.
Currently parse_date_toffset() is exported but not declared anywhere. This patch gives it a more predictable API and adds a declaration.
Ram: thanks for the reminder.