<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/stdtime, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2024-12-16T10:37:08Z</updated>
<entry>
<title>strptime: Fix day-of-week calculation.</title>
<updated>2024-12-16T10:37:08Z</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2024-12-09T12:37:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=259dcedc4ade538c35100d364e5cfe30b89c9a95'/>
<id>urn:sha1:259dcedc4ade538c35100d364e5cfe30b89c9a95</id>
<content type='text'>
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

(cherry picked from commit 4285e024baa80f81d13cdcc016fdf0721fe57862)
</content>
</entry>
</feed>
