timeFullMoon.frink

Download or view timeFullMoon.frink in plain text format

/** Time Magazine claimed that
    "the next full moon on Friday the 13th isn’t expected to happen again for
    another 30 years—on Aug. 13, 2049"

    I've found almost every claim of this sort to be wrong, especially when
    time zones are involved.  Let's see if it's right.  (Hint:  it's right
    for the continental U.S. but wrong for the "US/Hawaii" timezone.)

    (Note that this program is quickly hardcoded to an English-speaking
    locale.  If your computer's locale outputs Friday as something other than
    (Fri) you'll need to change that part of the program.)
*/

use sun.frink
tz = "US/Mountain"
d = #2019-09-13#
do
{
   f = fullMoon[d]
   fs = f-> tz
   if fs =~ %r/\d\d-13 .*(Fri)/
      println[fs]
   d = f + lunarmonth
} while d < #2099-09-13#




Download or view timeFullMoon.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20145 days, 21 hours, 47 minutes ago.