History log of /freebsd/lib/libc/tests/stdtime/Makefile (Results 1 – 1 of 1)
Revision Date Author Comments
# 4285e024 09-Dec-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

strptime: Fix day-of-week calculation.

The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened t

strptime: Fix day-of-week calculation.

The day-of-week calculation used the raw year value without adjusting
for TM_YEAR_BASE, so it was off by one for 300 years out of every 400;
it just happened to be correct for 1901 through 2000. It also used a
loop where a simple addition would have sufficed.

While here, simplify our version of Gauss's algorithm, and document
that we assume the Gregorian calendar.

MFC after: 1 week
PR: 282916
Reviewed by: imp, allanjude, philip
Differential Revision: https://reviews.freebsd.org/D47977

show more ...