14.12.2012, 00:05
Quote:
So time is basically made of minutes, correct? And you use a loop to decrease minutes?
edit: minutes/hours etc. |
I loop the value I add to - if I ban someone for 20 days, I'll run a loop on the current day + 20. If I ban someone for 20 months, I'll run a loop on the current month + 20. All this to adjust the higher values.
For minutes, I have to adjust hours, days, months and years.
For hours, I have to adjust days, months and years.
For days, I have to adjust months and years.
And lastly for months, I have to adjust years and sometimes days (because of the alternating days in a month + leap years).