sixdouglas / suncalc Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
input parameters
current time:
2020-05-17 15:05:16.414278 +0700 +07 m=+2.439547175
position:
lat: 55.00737904819233
lon: 82.95613288879396
Sun pos azimuth(218.097705), elevation(49.632049)
function called
times := suncalc.GetTimes(now, e.lat, e.lon)
result:
{
"dawn": {
"MorningName": "dawn",
"Time": "2020-05-17T04:29:45.597476352+07:00"
},
"dusk": {
"MorningName": "dusk",
"Time": "2020-05-17T22:22:12.176962304+07:00"
},
"goldenHour": {
"MorningName": "goldenHour",
"Time": "2020-05-17T20:37:57.783930368+07:00"
},
"goldenHourEnd": {
"MorningName": "goldenHourEnd",
"Time": "2020-05-17T06:13:59.990508544+07:00"
},
"nadir": {
"MorningName": "nadir",
"Time": "2020-05-17T01:25:58.887219456+07:00"
},
"nauticalDawn": {
"MorningName": "nauticalDawn",
"Time": "2020-05-17T03:16:15.785467136+07:00"
},
"nauticalDusk": {
"MorningName": "nauticalDusk",
"Time": "2020-05-17T23:35:41.988972032+07:00"
},
"night": {
"MorningName": "night",
"Time": "1677-09-21T05:44:23.145224192+05:31"
},
"nightEnd": {
"MorningName": "nightEnd",
"Time": "1677-09-21T05:44:23.145224192+05:31"
},
"solarNoon": {
"MorningName": "solarNoon",
"Time": "2020-05-17T13:25:58.887219456+07:00"
},
"sunrise": {
"MorningName": "sunrise",
"Time": "2020-05-17T05:18:13.48675328+07:00"
},
"sunriseEnd": {
"MorningName": "sunriseEnd",
"Time": "2020-05-17T05:22:50.375977472+07:00"
},
"sunset": {
"MorningName": "sunset",
"Time": "2020-05-17T21:33:44.287685888+07:00"
},
"sunsetStart": {
"MorningName": "sunsetStart",
"Time": "2020-05-17T21:29:07.39846144+07:00"
}
}
"Time": "1677-09-21T05:44:23.145224192+05:31"
Line 256 in f30ff7e
This leads to them being unusable:
moonIllum.fraction undefined (cannot refer to unexported field or method fraction)
Every item in the map gets returned in CST, I couldn't find anything in the docs on if this is intended/how to reformat. It's no big deal if not but if there is a way to somehow designate the LoadLocation that would be helpful.
This is a helpful lib btw, thanks for this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.