Commit 3c8d9f83 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

days_per_year: cleanup.

parent 5fd9b850
......@@ -58,22 +58,12 @@ int days_per_year(int calendar, int year)
if ( daysperyear == 0 )
{
if ( calendar == CALENDAR_STANDARD )
{
if ( year == 1582 )
daysperyear = 355;
else if ( (year%4 == 0 && year%100 != 0) || year%400 == 0 )
daysperyear = 366;
else
daysperyear = 365;
}
if ( year == 1582 && calendar == CALENDAR_STANDARD )
daysperyear = 355;
else if ( (year%4 == 0 && year%100 != 0) || year%400 == 0 )
daysperyear = 366;
else
{
if ( (year%4 == 0 && year%100 != 0) || year%400 == 0 )
daysperyear = 366;
else
daysperyear = 365;
}
daysperyear = 365;
}
return daysperyear;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment