diff options
add a day for the leap year only if we are currently counting Feb., not if
2002-07-24 <jpr@ximian.com>
* cal-util/timeutil.c (time_day_of_year): add a day for the leap
year only if we are currently counting Feb., not if the month
passed in is Feb. Fixes #23446.
svn path=/trunk/; revision=17571
Diffstat (limited to 'calendar/cal-util')
-rw-r--r-- | calendar/cal-util/timeutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/calendar/cal-util/timeutil.c b/calendar/cal-util/timeutil.c index f909022565..75e04611a3 100644 --- a/calendar/cal-util/timeutil.c +++ b/calendar/cal-util/timeutil.c @@ -365,7 +365,7 @@ time_day_of_year (int day, int month, int year) for (i = 0; i < month; i++) { day += days_in_month[i]; - if (month == 1 && time_is_leap_year (year)) + if (i == 1 && time_is_leap_year (year)) day++; } |