Created
January 17, 2017 17:02
-
-
Save nulltask/af067ca050c9e53b1b62e105bfa12b88 to your computer and use it in GitHub Desktop.
Revisions
-
nulltask created this gist
Jan 17, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ const SunCalc = require('suncalc'); const moment = require('moment-timezone'); const dates = ['2016-03-20', '2016-06-21', '2016-09-22', '2016-12-21']; dates.forEach((target) => { console.log('==========') for (let h = 0; h < 24; h++) { for (let m = 0; m < 60; m++) { const date = new Date(`${target} ${h}:${m}:0`); console.log(moment(date).tz('Asia/Tokyo').format(), SunCalc.getPosition(date, 34.649394, 135.001478).altitude); } } });