Git Product home page Git Product logo

Comments (2)

Extarys avatar Extarys commented on August 22, 2024

I also noticed newMoon only accept a year where first, full, and last need day month and year.

from astronomia.

commenthol avatar commenthol commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.