Ryan Seys

human (for now) • maker • reimagining healthcare at verily / google life sciences


Lune.js is a JavaScript library for calculating the phases of the moon. It can calculate the phase of the moon for any date, as well as the note-worthy phases around a given date.


To calculate current phase information:

var lune = require('lune');
var current_phase = lune.phase();


  phase: 0.5358014231208499,
  illuminated: 0.9874029678753915,
  age: 15.822531440340462,
  distance: 399704.2447849964,
  angular_diameter: 0.4982638055473454,
  sun_distance: 147790721.2629182,
  sun_angular_diameter: 0.539600532418603

You can check it out on GitHub here.

- - -