Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. const SunCalc = require('suncalc');
  2. const moment = require('moment-timezone');
  3.  
  4. const dates = ['2016-03-20', '2016-06-21', '2016-09-22', '2016-12-21'];
  5.  
  6. dates.forEach((target) => {
  7. console.log('==========')
  8. for (let h = 0; h < 24; h++) {
  9. for (let m = 0; m < 60; m++) {
  10. const date = new Date(`${target} ${h}:${m}:0`);
  11. console.log(moment(date).tz('Asia/Tokyo').format(), SunCalc.getPosition(date, 34.649394, 135.001478).altitude);
  12. }
  13. }
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement