Releases: shred/commons-suncalc
Releases · shred/commons-suncalc
v3.4
v2.11
v3.3
v2.10
v3.2
3.1
fullCycle()
is the default mode now. This means thatSunTimes
andMoonTimes
will now always give all the times (rise, set, noon, nadir) even if more than 24 hours ahead. UseoneDay()
to revert to the previous behavior.- A new
limit()
parameter can limit theSunTimes
andMoonTimes
window to any givenDuration
.
The old oneDay()
default behavior had rather historical than technical reasons, but it was confusing people and sometimes giving unexpected results. I was always pondering to make fullCycle()
the default mode. I'm sorry that I didn't do this change in v3.0 already, and causing some kind of breaking API change in v3.1 now.
v3.0
Starting with major version 3, suncalc now requires at least Java 8, or Android API level 26 (Android 8.0 "Oreo"). If you are using older Java or Android versions, you can still use suncalc v2, which will still receive bugfixes and some enhancements for a while.
- suncalc now uses the new Java Time API. No more hassle with outdated
Date
andCalendar
objects! truncateTo()
has been removed, as this can be done with Java'sZonedDateTime
.- The precision of SunTime noon and nadir has been greatly enhanced. A big shout-out for @isomeme for finding this bug, and her help to fix it.
- This is a multi-version jar file. It contains Java 8 classes, but also a
module-info
for modularized Java applications. - The JSR305 null-safe annotations have been replaced by SpotBugs annotations. This should have no impact on your code, as the method signatures themselves are unchanged. However, the compiler could now complain about some
null
dereferences that have been undetected before. Reason is that JSR305 uses thejavax.annotations
package, which leads to split packages in a Java 9 modular environment.
See the migration guide for how to migrate from version 2.
v2.9
v2.8
- A new
copy()
method creates an independent copy of aParameters
instance. sameLocationAs()
andsameTimeAs()
can be used to copy location and time parameters from otherParameters
instances, even from other calculation types.MoonIllumination
is now also using more accurate formulas, like all the other classes. This was the last relic of the old JavaScript port (version 1). suncalc is now a completely independent project. 🎉- Documentation is now using mkdocs. It has been reviewed and extended. There are now usage examples.