Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement