* libc/time/strptime.c (first_day): Actually return the wday
of the first day of the year.
This commit is contained in:
		| @@ -1,3 +1,8 @@ | ||||
| 2011-05-12  Peter Rosin  <peda@lysator.liu.se> | ||||
|  | ||||
| 	* libc/time/strptime.c (first_day): Actually return the wday | ||||
| 	of the first day of the year. | ||||
|  | ||||
| 2011-05-10  Corinna Vinschen  <vinschen@redhat.com> | ||||
|  | ||||
| 	* libc/locale/lmessages.c (_C_messages_locale): Add missing comma. | ||||
|   | ||||
| @@ -78,8 +78,8 @@ first_day (int year) | ||||
| { | ||||
|     int ret = 4; | ||||
|  | ||||
|     for (; year > 1970; --year) | ||||
| 	ret = (ret + 365 + is_leap_year (year) ? 1 : 0) % 7; | ||||
|     while (--year >= 1970) | ||||
| 	ret = (ret + 365 + is_leap_year (year)) % 7; | ||||
|     return ret; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user