03.03.2012, 04:26
I have a problem with day calculation of my ban sistem , There are months with 29 day , 30 and 31 .
Код:
while(hour > 24)
{
day++;
hour -= 24;
}
while(day > 30)
{
month++;
day -= 30;
}
while(month > 12)
{
year++;
month -= 12;
}



it's repeating untill the condition is false
And I have an ideea how to make , thanks.