Comments (2)
I also noticed newMoon
only accept a year where first
, full
, and last
need day month and year.
from astronomia.
Hi @Extarys,
Sorry for the late answer.
This should return the required results.
const date = new Date('2019-02-02')
const decimalYear = new julian.Calendar().fromDate(date).toYear()
console.log(decimalYear)
console.log({
ascending: julian.JDEToDate(moonnode.ascending(decimalYear)),
descending: julian.JDEToDate(moonnode.descending(decimalYear)),
phases: {
newMoon: julian.JDEToDate(moonphase.newMoon(decimalYear)),
first: julian.JDEToDate(moonphase.first(decimalYear)),
full: julian.JDEToDate(moonphase.full(decimalYear)),
last: julian.JDEToDate(moonphase.last(decimalYear))
}
})
2019.0876712328768
{
ascending: 2019-02-17T09:42:17.498Z,
descending: 2019-02-03T06:35:14.400Z,
phases: {
newMoon: 2019-02-04T21:03:34.348Z,
first: 2019-02-12T22:26:07.453Z,
full: 2019-02-19T15:53:28.628Z,
last: 2019-01-27T21:10:30.121Z
}
}
from astronomia.
Related Issues (19)
- Calculate lunar zodiac sign? HOT 1
- Get planetary posision? HOT 1
- [sunrise.js] TypeError: date.midnight is not a function HOT 2
- vsop87 return undefined HOT 1
- [eclipse-lunar] Invalid attempt to destructure non-iterable instance when using decimal year
- Question about horizontal position / change of coordinates for moon HOT 2
- no functions to calculate local planetocentric solar time
- Using un-supported characters in variable names makes the script unusable in a browser HOT 6
- strange output of julian.JDEToDate
- julian day at January 27 at noon of the year
- How to find apparent ra/dec of planets(such as mars, jupiter)? HOT 1
- No way to calculate Jupiter's moons' shadows?
- Example usage? HOT 1
- Calculation of sun's azimuth and altitude based on location HOT 1
- optionalDependencies -> devDependencies HOT 2
- Bundle library and VSOP87 data as UMD module HOT 7
- Orient celestial sphere? HOT 2
- Great library but hard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astronomia.