From: Junio C Hamano Date: Sat, 19 Mar 2011 18:00:51 GMT Subject: Re: [PATCH 1/2] gitweb: rename parse_date() to format_date() Message-ID: <7vwrjvq9bg.fsf@alter.siamese.dyndns.org> In-Reply-To: Kevin Cernekee writes: > One might reasonably expect a function named parse_date() to be used > for something along these lines: > > $unix_time_t = parse_date("2011-03-19"); > > But instead, gitweb's parse_date works more like: > > &parse_date(1300505805) = { > 'hour' => 3, > 'minute' => 36, > ... > 'rfc2822' => 'Sat, 19 Mar 2011 03:36:45 +0000', > ... > } > > Rename the function to improve clarity. No change to functionality. Except for a small detail that the function also takes the "-0800" timezone string, I think this is a good change. The word "parse" makes the readers expect that its input is something "format" would have produced for use by others (often humans, but there are functions that parse xml ;-).