Open main menu

Project: Gorgon Wiki β

Changes

User:Alleryn/Sandbox/MoonPhase

4,040 bytes added, 09:29, 30 September 2020
Created page with "==Scratch== ;{{#expr: {{#time:xNU|now}}- {{#time:xNU|2020-09-30}}}} *{{#time:r|today +2 days}} *{{#time:r|today}} *{{#time:r|Oct 1}} *{{#time:xNU|Oct 1}} <!-- seconds since f..."
==Scratch==
;{{#expr: {{#time:xNU|now}}- {{#time:xNU|2020-09-30}}}}

*{{#time:r|today +2 days}}
*{{#time:r|today}}
*{{#time:r|Oct 1}}
*{{#time:xNU|Oct 1}} <!-- seconds since fixed time-->

==3 day chart (proof of concept / testing)==
{|
!Day
!Moon phase
|-
|Today || {{#ifexpr:
abs({{#time:xNU|today}}-{{#time:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or
abs({{#time:xNU|today}}-{{#time:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#time:xNU|today}}-{{#time:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#time:xNU|today}}-{{#time:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
{{#ifexpr: ({{#time:xNU|today}}-{{#time: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: {{#time:xNU|today}}-{{#time:xNU|Oct 16}}<-24*60*60|Waning Crescent|
{{#ifexpr: {{#time:xNU|today}}-{{#time:xNU|Oct 16}}<=24*60*60|New Moon|
{{#ifexpr: {{#time:xNU|today}}-{{#time:xNU|Oct 16}}<29.53/4*24*60*60|Waxing Crescent|Waxing Gibbous
}}
}}
}}
}}
}}
}}
}}
|-
|Tomorrow ||{{#ifexpr:
abs({{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or
abs({{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
{{#ifexpr: ({{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
{{#ifexpr: {{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 16}}<-24*60*60|Waning Crescent|
{{#ifexpr: {{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 16}}<=24*60*60|New Moon|
{{#ifexpr: {{#time:xNU|today + 1 days}}-{{#time:xNU|Oct 16}}<29.53/4*24*60*60|Waxing Crescent|Waxing Gibbous
}}
}}
}}
}}
}}
}}
}}
|-
|In 2 Days ||{{#ifexpr:
abs({{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or
abs({{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
{{#ifexpr: ({{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
{{#ifexpr: {{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 16}}<-24*60*60|Waning Crescent|
{{#ifexpr: {{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 16}}<=24*60*60|New Moon|
{{#ifexpr: {{#time:xNU|today + 2 days}}-{{#time:xNU|Oct 16}}<29.53/4*24*60*60|Waxing Crescent|Waxing Gibbous
}}
}}
}}
}}
}}
}}
}}
|-
|In 3 Days ||{{#ifexpr:
abs({{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 1}} <!--Date of Last Full Moon in GMT--> ) <= 24*60*60 or
abs({{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 31}} <!--Date of Next Full Moon in GMT--> ) <= 24*60*60 | Full Moon |
{{#ifexpr: abs({{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 10}}<!--Date of Last Quarter Moon in GMT-->)<=24*60*60|Last Quarter|
{{#ifexpr: abs({{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 23}}<!--Date of First Quarter Moon in GMT-->)<=24*60*60|First Quarter|
{{#ifexpr: ({{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 16}}) < -29.53/4*24*60*60|Waning Gibbous|
{{#ifexpr: {{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 16}}<-24*60*60|Waning Crescent|
{{#ifexpr: {{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 16}}<=24*60*60|New Moon|
{{#ifexpr: {{#time:xNU|today + 3 days}}-{{#time:xNU|Oct 16}}<29.53/4*24*60*60|Waxing Crescent|Waxing Gibbous
}}
}}
}}
}}
}}
}}
}}
|}

==GMT==
;Oct 1 - full
;Oct 10 - last q
;Oct 16 - new
;Oct 23 - first q
;Oct 31 - full
5,698
edits