Skip to content

Commit

Permalink
clean up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
guregu committed Nov 6, 2022
1 parent 65b1e99 commit f3d513f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions www/public_html/moon.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
( Month < 3 -> M = 12 ; M = Month ),
JulianDay is (1461 * (Year + 4800 + (M - 14)/12))/4 + (367 * (M - 2 - 12 * ((M - 14)/12)))/12 - (3 * ((Year + 4900 + (M - 14)/12)/100))/4 + Day - 32075.

moon_phase(X) :-
moon_phase(Point) :-
date_time(Y, M, D, _, _, _),
julian(Y, M, D, JD),
Moons is (JD - 2451549.5) / 29.53,
Point is Moons - floor(Moons),
X is Point.
Point is Moons - floor(Moons).

emoji(X, 🌑) :- X < 0.125.
emoji(X, 🌒) :- X >= 0.125, X < 0.25.
Expand Down

0 comments on commit f3d513f

Please sign in to comment.