Index: /trunk/FACT++/www/shift/calendar.js
===================================================================
--- /trunk/FACT++/www/shift/calendar.js	(revision 14311)
+++ /trunk/FACT++/www/shift/calendar.js	(revision 14312)
@@ -841,4 +841,7 @@
     this.getMoonPhase = function(Y, M, D)
     {
+        // M=0..11 --> 1..12
+        M += 1;
+
         // calculate the Julian date at 12h UT
         var YY = Y - Math.floor( ( 12 - M ) / 10 );
@@ -855,9 +858,9 @@
         // calculate moon's age in days
         var IP = ( ( JD - 2451550.1 ) / 29.530588853 ) % 1;
+
         return IP;
 
         // Moon's age
         //var AG = IP*29.53;
-
     }
 
