Quote:
|
Originally Posted by attachment
NPC Code:
this.year = 1970 + int(this.temp / 31557600);
// 31557600 = 60 secs/min * 60 mins/hr * 24 hrs/day * 365.25 days/year
|
What calendar year has 365.25 days in it? If you're going to take the easy way out, at least find a more accurate number to divide by. I don't recommend taking the easy way out.
Quote:
NPC Code:
this.monthdays = {31,28.25,31,30,31,30,31,31,30,31,30,31};
// the number of days for each month
|
What month has 28.25 days in it? See above.
Quote:
NPC Code:
if (this.hour > 11) {
this.time = "PM";
}else this.time = "AM";
|
Consistency of formatting is important.