How to use the astronomia/lib/solstice.longitude function in astronomia

To help you get started, we’ve selected a few astronomia examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commenthol / date-chinese / src / Chinese.js View on Github external
solarTerm (term, gyear) {
    if (gyear && term <= 3) gyear--
    const years = gyear || this.yearFromEpochCycle()
    const lon = (((term + 20) % 24) * 15) % 360
    let st = solstice.longitude(years, earth, lon / p)
    st = this.midnight(st)
    return st
  }
github commenthol / date-chinese / lib / Chinese.js View on Github external
value: function solarTerm(term, gyear) {
      if (gyear && term <= 3) gyear--;
      var years = gyear || this.yearFromEpochCycle();
      var lon = (term + 20) % 24 * 15 % 360;
      var st = solstice.longitude(years, earth, lon / p);
      st = this.midnight(st);
      return st;
    }