Subject: Re: [PATCH v5 0/4] approxidate: tweak special date formats

From: Tuomas Ahola <[email-masked]>
Date: Thu, 21 May 2026 17:14:09 +0300

Junio C Hamano <[email-masked]> wrote:

> Tuomas Ahola <[email-masked]> writes:
> 
> > -static void date_today(struct tm *tm, struct tm *now, int *num UNUSED)
> > +static void date_today(struct tm *tm, struct tm *now, int *num)
> >  {
> >  	if (tm->tm_hour == now->tm_hour &&
> >  	    tm->tm_min == now->tm_min &&
> >  	    tm->tm_sec == now->tm_sec)
> >  		date_time(tm, 0);
> > +	*num = 0;
> >  	tm->tm_mday = -1;
> >  	update_tm(tm, now, 0);
> >  }
> 
> Hmph, what is this change about?  Does the lack of this clearing
> break some test?
> 

As you can see, many other date_*() functions have that same assignment, too.
It looked a bit off, so I first left it out, but this revision does add a
corner case test[*] that would fail without it.

> In any case, will queue.  It seems that we are getting to the point
> of diminishing returns and better off declaring victory soonish?
> 

Yes, I agree.  The patch series is effectively finished as I don't have any
further itches or ideas.  And I think the series gets its work done quite well
actually.

> > +check_approxidate 'January 5th today pm' '2009-01-30 12:00:00'

[*] Namely, this one.