Template:Moons/today

From A KoL Wiki
Revision as of 21:27, 5 January 2011 by imported>Xyzzyn (Use Unix timestamp difference to compute this value, accounting for the time difference between midnight UTC and rollover. Make including templates show precise values just before rollover (I hope).)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

7038


This evaluates the number of days since May 31 2006 03:31 UTC, one day before all three phases of the moons were ‘1’:

The constant 1149046260 is obtained via

{{#time: U|2006-05-31 03:31 UTC}}

and 86400 is the number of seconds in one day (discarding leap seconds). The rest of the code takes care of truncating fractional results.