git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Nicolas Pitre <nico@cam.org>,
	David Reiss <dreiss@facebook.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] Add date formatting and parsing functions relative to  a given time
Date: Sun, 30 Aug 2009 09:51:25 +0200	[thread overview]
Message-ID: <81b0412b0908300051g19bc2c5buecf5d925bd0d40b6@mail.gmail.com> (raw)
In-Reply-To: <20090830073619.GA14217@coredump.intra.peff.net>

On Sun, Aug 30, 2009 at 09:36, Jeff King<peff@peff.net> wrote:
> 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.

Yes, I just noticed that 200 was much too much, made the note
to fix it sometime and forgot the note in the final submission.

>> +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?

Been there, tried that. Didn't like it, because it didn't feel enough
approxidate (the original) anymore. Not even internally, because
of missing parse_date. My other attempts were guessdate and
approxidate_bottom_half (but only very shortly).

The "approximation", if you consider the functions arguments,
seems to me the closest to what the function _is_. OTOH,
maybe I should have used a verb...

  reply	other threads:[~2009-08-30  7:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 21:04 [PATCH 1/2] Add date formatting and parsing functions relative to a given time Alex Riesen
2009-08-28 21:05 ` [PATCH 2/2] Allow testing of _relative family of time formatting and parsing functions Alex Riesen
2009-08-30  7:36 ` [PATCH 1/2] Add date formatting and parsing functions relative to a given time Jeff King
2009-08-30  7:51   ` Alex Riesen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-28  7:58 [PATCH] Round-down years in "years+months" relative date view Alex Riesen
2009-08-28 15:02 ` Jeff King
2009-08-28 17:28   ` Nicolas Pitre
2009-08-28 19:03     ` Alex Riesen
2009-08-28 19:15       ` Jeff King
2009-08-28 19:20         ` Alex Riesen
2009-08-28 19:33           ` Alex Riesen
2009-08-28 20:52             ` [PATCH] Allow testing of _relative family of time formatting and parsing functions Alex Riesen
2009-08-29 21:46               ` Junio C Hamano
2009-08-30  7:25                 ` Alex Riesen
2009-08-30  9:13                   ` [PATCH 1/2] Add date formatting and parsing functions relative to a given time Alex Riesen
2009-08-30  9:15                     ` Jeff King
2009-08-30  9:36                       ` Jeff King
2009-08-30  9:56                         ` Alex Riesen
2009-08-30 10:08                           ` Jeff King
2009-08-30 11:17                             ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81b0412b0908300051g19bc2c5buecf5d925bd0d40b6@mail.gmail.com \
    --to=raa.lkml@gmail.com \
    --cc=dreiss@facebook.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@cam.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).