Difference between revisions of "User:Alleryn/Sandbox/MoonPhase"

From Project: Gorgon Wiki
Jump to: navigation, search
m
m (3 day chart (proof of concept / testing))
Line 16: Line 16:
 
|-
 
|-
 
|Today || {{#ifexpr:
 
|Today || {{#ifexpr:
abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or  
+
abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in EST--> ) <= 24*60*60 or  
abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
+
abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in EST--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 9}}<!--Date of Last Quarter Moon in EST-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in EST-->)<=24*60*60|First Quarter|
 
{{#ifexpr: ({{#timel:xNU|today}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous| <!-- 29.53/4 is a quarter of the average synodic month, but we could use something less precise, we have a lot of leeway-->
 
{{#ifexpr: ({{#timel:xNU|today}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous| <!-- 29.53/4 is a quarter of the average synodic month, but we could use something less precise, we have a lot of leeway-->
 
{{#ifexpr: {{#timel:xNU|today}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
 
{{#ifexpr: {{#timel:xNU|today}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
Line 33: Line 33:
 
|-
 
|-
 
|Tomorrow ||{{#ifexpr:
 
|Tomorrow ||{{#ifexpr:
abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or  
+
abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in EST--> ) <= 24*60*60 or  
abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
+
abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in EST--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 9}}<!--Date of Last Quarter Moon in EST-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in EST-->)<=24*60*60|First Quarter|
 
{{#ifexpr: ({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: ({{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: {{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
 
{{#ifexpr: {{#timel:xNU|today + 1 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
Line 50: Line 50:
 
|-
 
|-
 
|In 2 Days ||{{#ifexpr:
 
|In 2 Days ||{{#ifexpr:
abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or  
+
abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in EST--> ) <= 24*60*60 or  
abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
+
abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in EST--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 9}}<!--Date of Last Quarter Moon in EST-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in EST-->)<=24*60*60|First Quarter|
 
{{#ifexpr: ({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: ({{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: {{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
 
{{#ifexpr: {{#timel:xNU|today + 2 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
Line 67: Line 67:
 
|-
 
|-
 
|In 3 Days ||{{#ifexpr:
 
|In 3 Days ||{{#ifexpr:
abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or  
+
abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 1}} <!--Date of Last Full Moon in EST--> ) <= 24*60*60 or  
abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
+
abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 31}} <!--Date of Next Full Moon in EST--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 9}}<!--Date of Last Quarter Moon in EST-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
+
{{#ifexpr: abs({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 23}}<!--Date of First Quarter Moon in EST-->)<=24*60*60|First Quarter|
 
{{#ifexpr: ({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: ({{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
 
{{#ifexpr: {{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|
 
{{#ifexpr: {{#timel:xNU|today + 3 days}}-{{#timel:xNU|Oct 16}}<-24*60*60|Waning Crescent|

Revision as of 07:00, 1 October 2020

Scratch

113056477
  • in 2 days Wed, 01 May 2024 20:00:00 -0400
  • today Mon, 29 Apr 2024 20:00:00 -0400
  • now Tue, 30 Apr 2024 08:34:37 -0400
  • oct 1 Mon, 30 Sep 2024 20:00:00 -0400
  • 1727740800 seconds since fixed time (#time and #timel each renders both given time and fixed time as same time zone)
  • -14400 local server offset from GMT in seconds

3 day chart (proof of concept / testing)

Purge (This link will clear the page's cache, which may be necessary to fetch the current day correctly.)

Day Moon phase
Today Waning Gibbous
Tomorrow Waning Gibbous
In 2 Days Waning Gibbous
In 3 Days Waning Gibbous

GMT

Oct 1 - full
Oct 10 - last q
Oct 16 - new
Oct 23 - first q
Oct 31 - full

EST(Server Time)

Oct 1 - full
Oct 9 - last q
Oct 16 - new
Oct 23 - first q
Oct 31 - full