demos/src/CalendarDayMoonPhase.js
function jd0(year, month, day) {
  let y  = year;
  let m = month;
  if (m < 3) {
    m += 12;
    y -= 1
  };
  const a = Math.floor(y/100);
  const b = 2-a+Math.floor(a/4);
  const j = Math.floor(365.25*(y+4716))+Math.floor(30.6001*(m+1))+day+b-1524.5;
  return j;
}
function jd0(year, month, day) {
  let y  = year;
  let m = month;
  if (m < 3) {
    m += 12;
    y -= 1
  };
  const a = Math.floor(y/100);
  const b = 2-a+Math.floor(a/4);
  const j = Math.floor(365.25*(y+4716))+Math.floor(30.6001*(m+1))+day+b-1524.5;
  return j;
}
function jd0 ( year , month , day ) { let y = year ; let m = month ; if ( m < 3 ) { m += 12 ; y -= 1 } ; const a = Math . floor ( y / 100 ) ; const b = 2 - a + Math . floor ( a / 4 ) ; const j = Math . floor ( 365.25 * ( y + 4716 ) ) + Math . floor ( 30.6001 * ( m + 1 ) ) + day + b - 1524.5 ; return j ; }
The Julian date at 0 hours UT at Greenwich
The Julian date at 0 hours UT at Greenwich