Skip to content

Commit 2cd5be0

Browse files
authored
Add abstract method getUTCNoon()
1 parent aa43a9b commit 2cd5be0

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Zmanim Java API
3-
* Copyright (C) 2004-2022 Eliyahu Hershfeld
3+
* Copyright (C) 2004-2023 Eliyahu Hershfeld
44
*
55
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
66
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
@@ -23,7 +23,7 @@
2323
* @todo Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link
2424
* #setRefraction(double) setting the refraction}.
2525
*
26-
* @author © Eliyahu Hershfeld 2004 - 2022
26+
* @author © Eliyahu Hershfeld 2004 - 2023
2727
*/
2828
public abstract class AstronomicalCalculator implements Cloneable {
2929
/**
@@ -146,6 +146,22 @@ public abstract double getUTCSunrise(Calendar calendar, GeoLocation geoLocation,
146146
*/
147147
public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, double zenith,
148148
boolean adjustForElevation);
149+
150+
151+
/**
152+
* Return <a href="https://en.wikipedia.org/wiki/Noon#Solar_noon">solar noon</a> (UTC) for the given day at the
153+
* given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates
154+
* true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating
155+
* the time as halfway between sunrise and sunset.
156+
*
157+
* @param calendar
158+
* Used to calculate day of year.
159+
* @param geoLocation
160+
* The location information used for astronomical calculating sun times.
161+
*
162+
* @return the time in minutes from zero UTC
163+
*/
164+
public abstract double getUTCNoon(Calendar calendar, GeoLocation geoLocation);
149165

150166
/**
151167
* Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher

0 commit comments

Comments
 (0)