Class SunriseSunset

java.lang.Object
org.deltava.util.SunriseSunset

public class SunriseSunset extends Object
A utility class to calculate sunrise and sunset times.
Since:
7.4
Version:
7.4
Author:
Luke
  • Method Details

    • getSunrise

      public static ZonedDateTime getSunrise(GeoLocation loc, ZonedDateTime dt)
      Calculates sunrise time for a given location and date.
      Parameters:
      loc - the GeoLocation
      dt - a ZonedDateTime
      Returns:
      the zoned time of sunrise, or null if none
    • getSunset

      public static ZonedDateTime getSunset(GeoLocation loc, ZonedDateTime dt)
      Calculates sunset time for a given location and date.
      Parameters:
      loc - the GeoLocation
      dt - a ZonedDateTime
      Returns:
      the zoned time of sunset, or null if none