git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Add date formatting and parsing functions relative to a given time

From
Jeff King <peff@peff.net>
Date
Aug 30, 2009, 07:36 UTC
Message-ID
<20090830073619.GA14217@coredump.intra.peff.net>
In-Reply-To
<20090828210404.GA11867@blimp.localdomain>
On Fri, Aug 28, 2009 at 11:04:04PM +0200, Alex Riesen wrote:
> +const char *show_date_relative(unsigned long time, int tz, const struct timeval *now)
> +{
> +	static char timebuf[100 /* TODO: can be optimized */];

This was 200 in the original version. I doubt that it makes a difference, but I think in a refactoring patch I think it is best to simply reorganize and make no other changes.

> +static unsigned long approximation(const char *date, const struct timeval *tv)

I know it's static, but this is a terribly undescriptive function name. Approximation of what? Can we call it approxidate_internal or something?

-Peff
Previous: Alex RiesenNext: Alex Riesen
Message 3 of 4 in “Add date formatting and parsing functions relative to a given time”
  1. 1/2 Add date formatting and parsing functions relative to a given timeAlex Riesen, Aug 28, 2009
  2. 2/2 Allow testing of _relative family of time formatting and parsing functionsAlex Riesen, Aug 28, 2009
  3. Jeff KingAug 30, 2009
  4. Alex RiesenAug 30, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.