286 @verb #9598:"moonphase" this none this rxdo #9598 @program #9598:"moonphase" this none this "Algorithm for calculating moon phase" "From: http://ruyeyama.best.vwh.net/rage/auspice.html" "Ported to MOO by: azaroth@liv.ac.uk" whentime = args[1] newmoon = 1021214782 remainder = tofloat(abs(whentime - newmoon)) / 86400.0 % 29.5306 waxwane = remainder < 14.7653 ? "waxing" | "waning" pcvis = 1.0 - abs(remainder - 14.7653) / 14.7653 phases = {"new", "crescent", "half", "gibbous", "full"} p = toint(pcvis * 5.0) + 1 p = p == 6 ? 5 | p return {waxwane, phases[p]} "Last modified by Azaroth (#9598) on Tue May 28 15:05:48 2002 MDT." . 0