Thread (28 messages) 28 messages, 3 authors, 8d ago

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

From: Tuomas Ahola <hidden>
Date: 2026-05-21 14:14:18

Junio C Hamano [off-list ref] wrote:
Tuomas Ahola [off-list ref] writes:
quoted
-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.
quoted
+check_approxidate 'January 5th today pm' '2009-01-30 12:00:00'
[*] Namely, this one.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help