shithub: scc

ref: b843da74b79d585a30bd2b3f13e7c63d105baf94
dir: /src/libc/time/_newyear.c/

View raw version
/*
 * Happy New Year!!!!
 */
int
_newyear(int year)
{
	int day;

	year += 1900 - 1;
	day = 1 + year + year/4;
	day -= year/100;
	day += year/400;

	return day % 7;
}