I found this understandable once I went through it with the debugger. A person can get caught up in the geometry of it. This comes at it with strings. I changed the events to my locality and then switched the location to a point somewhere in bliako's neighborhood:

{ "name" => "Current Moon in the 'Ho", "date" => "2021-10-09", "time" => "01:00:00", "timezone" => "America/Boise", }, { "name" => "Scylla and Charybdis", "date" => "2021-10-09", "time" => "01:00:00", "location" => {lon=>38.245833, lat=>15.6325}, },
Current Moon in the 'Ho on 2021-10-09T01:00:00 (1633762800 seconds uni +x-epoch) timezone: America/Boise Moon age: 3.16929659167535 days Moon phase: 10.7 % of cycle (birth-to-death) Moon's illuminated fraction: 10.9 % of full disc important moon phases around the event: New Moon = Wed Oct 6 05:05:44 2021 First quarter = Tue Oct 12 21:27:35 2021 Full moon = Wed Oct 20 08:57:41 2021 Last quarter = Thu Oct 28 14:06:44 2021 New Moon = Thu Nov 4 15:15:26 2021 end event. Scylla and Charybdis on 2021-10-09T01:00:00 (1633730400 seconds unix-e +poch) timezone: Africa/Nairobi (lat: 15.6325, lon: 38.245833) Moon age: 2.74601783357238 days Moon phase: 9.3 % of cycle (birth-to-death) Moon's illuminated fraction: 8.3 % of full disc important moon phases around the event: New Moon = Wed Oct 6 05:05:44 2021 First quarter = Tue Oct 12 21:27:35 2021 Full moon = Wed Oct 20 08:57:41 2021 Last quarter = Thu Oct 28 14:06:44 2021 New Moon = Thu Nov 4 15:15:26 2021 end event.

These data seem plausible. I don't know why I needed Geo::Location::TimeZone to get this done and also Math::Polygon, but it works as advertised.

In starting this I was not aware that Moon phase for a specific time is more-or-less the same for anywhere on the surface of our planet, irrespective of standpoint. With the caveat that our antipodean fellows will see it, well ... , antipodeanly.

Yeah, so if you freeze time, we all see the same moon, barring obstructions like walls, trees, mountains, clouds, or the earth itself. If you wonder what it was like for someone at one a.m. at the antipode, the answer will differ as the above. The comparison of phase to fraction illuminated is also interesting.

Fun stuff. Thanks for posting.


In reply to Re: Moon phase on historical events by Aldebaran
in thread Moon phase on historical events by bliako

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.