Skip to content

Releases: shred/commons-suncalc

v3.11

11 Jun 16:48
4704659
Compare
Choose a tag to compare
  • Add .reverse() method to revert time window in SunTimes and MoonTimes. The provided date is the end of the time window instead of the start, and the computed times are in the past. See the documentation and example for usage. (Fixes #45, thanks to @elydpg.)

v3.10

03 Mar 08:52
7d36e0d
Compare
Choose a tag to compare
  • Fixed a glitch in some results if MoonIllumination is used in topocentric mode. (Thanks to Hussam Almulhim for the pointer.)

v3.9

06 Feb 15:59
68de05d
Compare
Choose a tag to compare
  • MoonIllumination now also returns the elongation (visible distance between sun and moon), moon radius (visible radius of the moon disc), and crescent width (visible width of the crescent). Thanks to Hussam Almulhim for the feature request and for testing.
  • MoonIllumination now accepts an optional geolocation. If set, the result will be topocentric. If unset, the result will be geocentric as before (so there is no need to migrate your code).
  • height() and heightFt() are now called elevation() and elevationFt(), because that's the correct term for the observer's altitude. The old methods are marked as deprecated, but are still functional. Please use the new ones.
  • If a geolocation is required for proper results, it is required to be set now, otherwise execute() will throw an exception. If you want to emulate the old behavior (for whatever reason), you can use .at(0.0, 0.0) to set Null Island again.

Please also see the migration guide for details.

v3.8

17 Jan 16:01
d6fe78d
Compare
Choose a tag to compare
  • New method .heightFt() sets the observer's height in foot.
  • New method MoonPosition.getTrueAltitude() returns the moon's true altitude without atmospheric refraction (thanks to jari)

v3.7

14 Apr 12:00
d027936
Compare
Choose a tag to compare
  • MoonIllumination.getAngle() was off by several degrees under certain circumstances. (@amoledwatchfaces)

v2.14

14 Apr 11:59
0ac5f07
Compare
Choose a tag to compare
  • MoonIllumination.getAngle() was off by several degrees under certain circumstances. (@amoledwatchfaces)

v3.6

10 Apr 19:26
458c5d5
Compare
Choose a tag to compare
  • Fixed a very old bug in MoonPosition.getParallacticAngle() that gave completely wrong results. (@amoledwatchfaces)

v2.13

10 Apr 19:21
feefbf4
Compare
Choose a tag to compare

Backport from v3.6:

  • Fixed a very old bug in MoonPosition.getParallacticAngle() that gave completely wrong results. (@amoledwatchfaces)

v3.5

05 Jun 06:53
fa61ad0
Compare
Choose a tag to compare
  • Add moon phase constants for WAXING_CRESCENT, WAXING_GIBBOUS, WANING_GIBBOUS, WANING_CRESCENT. (Thanks to @mslalith for the pointer.)
  • New method MoonPhase.Phase.toPhase() converts a moon phase angle to the closest constant.
  • New method MoonIllumination.getClosestPhase() returns the closest moon phase constant of an illumination result.

v2.12

05 Jun 06:53
4e0c574
Compare
Choose a tag to compare

Backports from v3.5:

  • Add moon phase constants for WAXING_CRESCENT, WAXING_GIBBOUS, WANING_GIBBOUS, WANING_CRESCENT. (Thanks to @mslalith for the pointer.)
  • New method MoonPhase.Phase.toPhase() converts a moon phase angle to the closest constant.
  • New method MoonIllumination.getClosestPhase() returns the closest moon phase constant of an illumination result.