src/moonphase.js
function snap (y, q) {
  const k = (y - 2000) * 12.3685 // (49.2) p. 350
  return Math.floor(k - q + 0.5) + q
}
function snap (y, q) {
  const k = (y - 2000) * 12.3685 // (49.2) p. 350
  return Math.floor(k - q + 0.5) + q
}
function snap ( y , q ) { const k = ( y - 2000 ) * 12.3685 // (49.2) p. 350 return Math . floor ( k - q + 0.5 ) + q }
snap returns k at specified quarter q nearest year y.
snap returns k at specified quarter q nearest year y .