JavaScript library for calculating moon position, phases and zodiac sign, created by Philippe Gibert (@giboow).
Sources of the algorithm : http://www.abecedarical.com/zenosamples/zs_lunarphasecalc.html
// get datas for current day :
var date = new Date();
var moonDatas = MoonCalc.datasForDay(date);
In addition to browsers, MoonCalc can be used in server environments like Node,
and is available as an NPM package (npm install mooncalc
).
var MoonCalc = require('mooncalc');