给出日期输出是星期几

UINT32 i_32u = 1990u, j_u32 = 0u, year_flag = 0u, year_day_u32 = 0u, sum_day_u32 = 0u, weekday_u32 = 0u;
	
	for ( i_32u = 1990u; i_32u <= year_u32; i_32u++)
	{
		year_flag = Is_Leap_Year(year_u32);
		if ( 1u == year_flag )
		{
			year_day_u32 = 366u;
		}
		else
		{
			year_day_u32 = 365u;
		}

		switch (mouth_u32 - 1u)
		{
			case 1u:
				sum_day_u32 += 31u;
				break;
			case 2u:
				sum_day_u32 += 31u + 28u + year_flag;
				break;
			case 3u:
				sum_day_u32 += 31u + 28u + year_flag + 31u;
				break;
			case 4u:
				sum_day_u32 += 31u + 28u + year_flag + 31u + 30u;
				break;
			case 5u:
				sum_day_u32 += 31u + 28u + year_flag + 31u + 30u + 31u;
				break;
			case 6u:
				sum_day_u32 += 31u + 28u + year_flag + 31u + 30u + 31u + 30u;
				break;
			case 7u:
				sum_day_u32 += 31u + 28u + year_flag + 31u + 30u + 31u + 30u + 31u;
				break;
			case 8u:
				sum_day_u32 += 31u + 28u + year_flag + 31u + 30u + 31u + 30u + 31u + 31u;
				break;
			case 9u

你可能感兴趣的:(C语言)