Template:Moons/today: Difference between revisions
From A KoL Wiki
imported>Flargen m cat |
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). |
||
Line 1: | Line 1: | ||
{{#expr: | {{#expr:((({{#time:U}}-1149046260)/86400)-0.5)round0}}<noinclude> | ||
}}<noinclude> | |||
---- | ---- | ||
This evaluates the number of days since | This evaluates the number of days since May 31 2006 03:31 UTC, one day before all three phases of the moons were ‘1’: {{moon|1|1|1}} | ||
The constant 1149046260 is obtained via | |||
:<nowiki>{{#time: U|2006-05-31 03:31 UTC}}</nowiki> | |||
and 86400 is the number of seconds in one day (discarding [[:wikipedia:leap second|leap second]]s). The rest of the code takes care of truncating fractional results. | |||
[[Category:Utility Templates|{{PAGENAME}}]] | [[Category:Utility Templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Latest revision as of 21:27, 5 January 2011
7039
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.