Skip to content

Commit 4484876

Browse files
authored
ZmanimCalendar - Rename some method names for consistency
- getAlos72() -> getAlos72Minutes() - getTzais72() -> getTzais72Minutes() - getShaahZmanisGra() -> getShaahZmanisGRA() - many JavaDoc fixes for recent changes
1 parent ac6b0a0 commit 4484876

1 file changed

Lines changed: 44 additions & 46 deletions

File tree

src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
* be factored into <em>zmanim</em> calculations. The setting defaults to false (elevation will not be used for
4242
* <em>zmanim</em> calculations besides sunrise and sunset), unless the setting is changed to true in {@link
4343
* #setUseElevation(boolean)}. This will impact sunrise and sunset-based <em>zmanim</em> such as {@link #getSunriseWithElevation()},
44-
* {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, <em>alos</em>-based <em>zmanim</em> such as {@link #getSofZmanShmaMGA()}
45-
* that are based on a fixed offset of sunrise or sunset and <em>zmanim</em> based on a percentage of the day such as
46-
* {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to
47-
* true it will not impact <em>zmanim</em> that are a degree-based offset of sunrise and sunset, such as {@link
48-
* ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()} since
49-
* these <em>zmanim</em> are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of
50-
* sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use
44+
* {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, <em>alos</em>-based <em>zmanim</em> such as {@link
45+
* #getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and <em>zmanim</em> based on a percentage
46+
* of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset.
47+
* Even when set to true it will not impact <em>zmanim</em> that are a degree-based offset of sunrise and sunset, such as {@link
48+
* ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()}
49+
* since these <em>zmanim</em> are not linked to sunrise or sunset times (the calculations are based on the astronomical definition
50+
* of sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use
5151
* of elevation.
5252
* For additional information on the <em>halachic</em> impact of elevation on <em>zmanim</em> see:
5353
* <ul>
@@ -90,7 +90,7 @@ public class ZmanimCalendar extends AstronomicalCalendar {
9090
* should be factored into <em>zmanim</em> calculations.The setting defaults to false (elevation will not be used for
9191
* <em>zmanim</em> calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will
9292
* impact sunrise and sunset based <em>zmanim</em> such as {@link #getSofZmanShmaGRA()},
93-
* alos based <em>zmanim</em> such as {@link #getSofZmanShmaMGA()} that are based on a
93+
* alos based <em>zmanim</em> such as {@link #getSofZmanShmaMGA72Minutes()} that are based on a
9494
* fixed offset of sunrise or sunset and <em>zmanim</em> based on a percentage of the day such as {@link
9595
* ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact
9696
* <em>zmanim</em> that are a degree based offset of sunrise and sunset, such as
@@ -136,9 +136,9 @@ public void setUseElevation(boolean useElevation) {
136136
* @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
137137
* <em>Sof zman Shma</em> GRA} would be calculated as 3 <em>shaos zmaniyos</em> after sunrise, but the <em>shaos
138138
* zmaniyos</em> would be calculated a a 6th of the time between sunrise and <em>chatzos</em>, as opposed to a 12th of the
139-
* time between sunrise and sunset. {@link #getMinchaGedola() <em>mincha gedola</em>} will be calculated as half a
139+
* time between sunrise and sunset. {@link #getMinchaGedolaGRA() <em>mincha gedola</em>} will be calculated as half a
140140
* <em>shaah zmanis</em> of afternoon hours (a 6th of the time between <em>chatzos</em> and sunset after astronomical
141-
* <em>chatzos</em> as opposed to 6.5 <em>shaos zmaniyos</em> after sunrise. {@link #getPlagHamincha() <em>Plag
141+
* <em>chatzos</em> as opposed to 6.5 <em>shaos zmaniyos</em> after sunrise. {@link #getPlagHaminchaGRA() <em>Plag
142142
* hamincha</em>} would be calculated as 4.75 <em>shaos zmaniyos</em> after astronomical <em>chatzos</em> as opposed to 10.75
143143
* <em>shaos zmaniyos</em> after sunrise. Etc.
144144
*
@@ -189,9 +189,9 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) {
189189
* @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA()
190190
* <em>Sof zman Shma</em> GRA} would be calculated as 3 <em>shaos zmaniyos</em> after sunrise, but the <em>shaos
191191
* zmaniyos</em> would be calculated a a 6th of the time between sunrise and <em>chatzos</em>, as opposed to a 12th of the
192-
* time between sunrise and sunset. {@link #getMinchaGedola() <em>mincha gedola</em>} will be calculated as half a
192+
* time between sunrise and sunset. {@link #getMinchaGedolaGRA() <em>mincha gedola GRA</em>} will be calculated as half a
193193
* <em>shaah zmanis</em> of afternoon hours (a 6th of the time between <em>chatzos</em> and sunset after astronomical
194-
* <em>chatzos</em> as opposed to 6.5 <em>shaos zmaniyos</em> after sunrise. {@link #getPlagHamincha() <em>Plag
194+
* <em>chatzos</em> as opposed to 6.5 <em>shaos zmaniyos</em> after sunrise. {@link #getPlagHaminchaGRA() <em>Plag
195195
* hamincha</em>} would be calculated as 4.75 <em>shaos zmaniyos</em> after astronomical <em>chatzos</em> as opposed to 10.75
196196
* <em>shaos zmaniyos</em> after sunrise. Etc.
197197
*
@@ -225,8 +225,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz
225225
* "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux</a> is
226226
* 16.1&deg; below {@link #GEOMETRIC_ZENITH geometric zenith}.
227227
*
228-
* @see #getAlosHashachar()
229-
* @see ComprehensiveZmanimCalendar#getAlos16Point1Degrees()
228+
* @see #getAlos16Point1Degrees()
230229
* @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees()
231230
* @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()
232231
* @see ComprehensiveZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees()
@@ -247,8 +246,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz
247246
* "https://www.worldcat.org/oclc/29283612">Ohr Meir</a></em> considers this the time that 3 small stars are visible,
248247
* which is later than the required 3 medium stars.
249248
*
250-
* @see #getTzais()
251-
* @see ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees()
249+
* @see #getTzaisGeonim8Point5Degrees()
252250
*/
253251
protected static final double ZENITH_8_POINT_5 = GEOMETRIC_ZENITH + 8.5;
254252

@@ -355,7 +353,7 @@ public Instant getAlos16Point1Degrees() {
355353
* a <code>null</code> will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
356354
* documentation.
357355
*/
358-
public Instant getAlos72() {
356+
public Instant getAlos72Minutes() {
359357
return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS);
360358
}
361359

@@ -490,15 +488,15 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) {
490488

491489
/**
492490
* This method returns the latest <em>zman krias shema</em> (time to recite shema in the morning) that is 3 *
493-
* {@link #getShaahZmanisGra() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
491+
* {@link #getShaahZmanisGRA() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
494492
* {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
495493
* to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>.
496494
* The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level
497495
* sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the
498496
* {@link #isUseElevation()} setting).
499497
*
500498
* @see #getSofZmanShma(Instant, Instant)
501-
* @see #getShaahZmanisGra()
499+
* @see #getShaahZmanisGRA()
502500
* @see #isUseElevation()
503501
* @see ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()
504502
* @return the <code>Instant</code> of the latest <em>zman shema</em> according to the GRA. If the calculation can't be
@@ -513,24 +511,24 @@ public Instant getSofZmanShmaGRA() {
513511
/**
514512
* This method returns the latest <em>zman krias shema</em> (time to recite Shema in the morning) according to the
515513
* opinion of the <a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a> based on
516-
* <em>alos</em> being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link
517-
* #getShaahZmanis72Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos72() dawn} based on the opinion
518-
* of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to
519-
* {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link
520-
* #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}.
514+
* <em>alos</em> being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link
515+
* #getShaahZmanis72Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos72Minutes() dawn} based on the opinion
516+
* of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to
517+
* {@link #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link
518+
* #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() dawn}.
521519
*
522520
* @return the <code>Instant</code> of the latest <em>zman krias shema</em>. If the calculation can't be computed such
523521
* as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one where
524522
* it does not set, a <code>null</code> will be returned. See detailed explanation on top of the
525523
* {@link AstronomicalCalendar} documentation.
526524
* @see #isUseAstronomicalChatzosForOtherZmanim()
527525
* @see #getShaahZmanis72Minutes()
528-
* @see #getAlos72()
529-
* @see #getSofZmanShmaMGA()
526+
* @see #getAlos72Minutes()
527+
* @see #getSofZmanShmaMGA72Minutes()
530528
* @see #getSofZmanShma(Instant, Instant, boolean)
531529
*/
532530
public Instant getSofZmanShmaMGA72Minutes() {
533-
return getSofZmanShma(getAlos72(), getTzais72(), true);
531+
return getSofZmanShma(getAlos72Minutes(), getTzais72Minutes(), true);
534532
}
535533

536534
/**
@@ -549,7 +547,7 @@ public Instant getSofZmanShmaMGA72Minutes() {
549547
* and one where it does not set, a <code>null</code> will be returned See detailed explanation on top of the
550548
* {@link AstronomicalCalendar} documentation.
551549
*/
552-
public Instant getTzais72() {
550+
public Instant getTzais72Minutes() {
553551
return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS);
554552
}
555553

@@ -617,13 +615,13 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn
617615
* This method returns the latest time for burning <em>chametz</em> on <em>Erev Pesach</em> according to the opinion
618616
* of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. This time is 5 hours into the day based on the
619617
* opinion of the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a> that the day is calculated from
620-
* sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea
618+
* sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea
621619
* level sunrise}. If it is not <em>erev Pesach</em>, a null will be returned.
622620
* @return the <code>Instant</code> of the latest time for burning <em>chametz</em> on <em>Erev Pesach</em>. If it is not
623621
* <em>erev Pesach</em> or the calculation can't be computed such as in the Arctic Circle where there is at least
624622
* one day a year where the sun does not rise, and one where it does not set, a <code>null</code> will be
625623
* returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
626-
* @see ZmanimCalendar#getShaahZmanisGra()
624+
* @see ZmanimCalendar#getShaahZmanisGRA()
627625
* @see #getSofZmanBiurChametz(Instant, Instant, boolean)
628626
*/
629627

@@ -735,15 +733,15 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) {
735733

736734
/**
737735
* This method returns the latest <em>zman tfila</em> (time to recite shema in the morning) that is 4 *
738-
* {@link #getShaahZmanisGra() <em>shaos zmaniyos</em> }(solar hours) after {@link #getSunriseWithElevation() sunrise} or
736+
* {@link #getShaahZmanisGRA() <em>shaos zmaniyos</em> }(solar hours) after {@link #getSunriseWithElevation() sunrise} or
739737
* {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
740738
* to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>.
741739
* The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level
742740
* sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the
743741
* {@link #isUseElevation()} setting).
744742
*
745743
* @see #getSofZmanTfila(Instant, Instant)
746-
* @see #getShaahZmanisGra()
744+
* @see #getShaahZmanisGRA()
747745
* @see ComprehensiveZmanimCalendar#getSofZmanTfilaBaalHatanya()
748746
* @return the <code>Instant</code> of the latest <em>zman tfilah</em>. If the calculation can't be computed such as in
749747
* the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it
@@ -757,7 +755,7 @@ public Instant getSofZmanTfilaGRA() {
757755

758756
/**
759757
* This method returns the latest <em>zman tfila</em> (time to recite shema in the morning) that is 4 *
760-
* {@link #getShaahZmanisMGA() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos72()}, according to the
758+
* {@link #getShaahZmanis72Minutes() <em>shaos zmaniyos</em>} (solar hours) after {@link #getAlos72Minutes()}, according to the
761759
* <em><a href="https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA)</a></em>. The day is calculated
762760
* from 72 minutes before {@link #getSunriseBasedOnElevationSetting()} to 72 minutes after {@link
763761
* #getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link #isUseElevation()} setting).
@@ -768,10 +766,10 @@ public Instant getSofZmanTfilaGRA() {
768766
* {@link AstronomicalCalendar} documentation.
769767
* @see #getSofZmanTfila(Instant, Instan, boolean)
770768
* @see #getShaahZmanis72Minutes()
771-
* @see #getAlos72()
769+
* @see #getAlos72Minutes()
772770
*/
773771
public Instant getSofZmanTfilaMGA72Minutes() {
774-
return getSofZmanTfila(getAlos72(), getTzais72(), true);
772+
return getSofZmanTfila(getAlos72Minutes(), getTzais72Minutes(), true);
775773
}
776774

777775
/**
@@ -845,11 +843,11 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) {
845843

846844
/**
847845
* This method returns the latest <em>mincha gedola</em>,the earliest time one can pray <em>mincha</em> that is 6.5 *
848-
* {@link #getShaahZmanisGra() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
846+
* {@link #getShaahZmanisGRA() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
849847
* {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
850848
* to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. <em>Mincha gedola</em> is the earliest
851849
* time one can pray <em>mincha</em>. The Ramba"m is of the opinion that it is better to delay <em>mincha</em> until
852-
* {@link #getMinchaKetana() <em>mincha ketana</em>} while the Ra"sh, Tur, GRA and others are of the
850+
* {@link #getMinchaKetanaGRA() <em>mincha ketana GRA</em>} while the Ra"sh, Tur, GRA and others are of the
853851
* opinion that <em>mincha</em> can be prayed <em>lechatchila</em> starting at <em>mincha gedola</em>.
854852
* The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level
855853
* sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}
@@ -859,8 +857,8 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) {
859857
* for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}.
860858
*
861859
* @see #getMinchaGedola(Instant, Instant)
862-
* @see #getShaahZmanisGra()
863-
* @see #getMinchaKetana()
860+
* @see #getShaahZmanisGRA()
861+
* @see #getMinchaKetanaGRA()
864862
* @see ComprehensiveZmanimCalendar#getMinchaGedolaBaalHatanya()
865863
* @return the <code>Instant</code> of the time of mincha gedola. If the calculation can't be computed such as in the
866864
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
@@ -995,17 +993,17 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) {
995993
/**
996994
* This method returns <em>mincha ketana</em>,the preferred earliest time to pray <em>mincha</em> in the
997995
* opinion of the <em><a href="https://en.wikipedia.org/wiki/Maimonides">Rambam</a></em> and others, that is 9.5
998-
* * {@link #getShaahZmanisGra() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
996+
* * {@link #getShaahZmanisGRA() <em>shaos zmaniyos</em>} (solar hours) after {@link #getSunriseWithElevation() sunrise} or
999997
* {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according
1000998
* to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon">GRA</a>. For more information on this see the
1001-
* documentation on {@link #getMinchaGedola() <em>mincha gedola</em>}.
999+
* documentation on {@link #getMinchaGedolaGRA() <em>mincha gedola</em>}.
10021000
* The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level
10031001
* sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}
10041002
* setting.
10051003
*
10061004
* @see #getMinchaKetana(Instant, Instant)
1007-
* @see #getShaahZmanisGra()
1008-
* @see #getMinchaGedola()
1005+
* @see #getShaahZmanisGRA()
1006+
* @see #getMinchaGedolaGRA()
10091007
* @see ComprehensiveZmanimCalendar#getMinchaKetanaBaalHatanya()
10101008
* @return the <code>Instant</code> of the time of mincha ketana. If the calculation can't be computed such as in the
10111009
* Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does
@@ -1075,7 +1073,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) {
10751073
}
10761074

10771075
/**
1078-
* This method returns <em>plag hamincha</em>, that is 10.75 * {@link #getShaahZmanisGra() <em>shaos zmaniyos</em>}
1076+
* This method returns <em>plag hamincha</em>, that is 10.75 * {@link #getShaahZmanisGRA() <em>shaos zmaniyos</em>}
10791077
* (solar hours) after {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on
10801078
* the {@link #isUseElevation()} setting), according to the <a href="https://en.wikipedia.org/wiki/Vilna_Gaon"
10811079
* >GRA</a>. <em>Plag hamincha</em> is the earliest time that <em>Shabbos</em> can be started.
@@ -1111,7 +1109,7 @@ public Instant getPlagHaminchaGRA() {
11111109
* @see #getSeaLevelSunset()
11121110
* @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya()
11131111
*/
1114-
public long getShaahZmanisGra() {
1112+
public long getShaahZmanisGRA() {
11151113
return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting());
11161114
}
11171115

@@ -1131,7 +1129,7 @@ public long getShaahZmanisGra() {
11311129
* {@link AstronomicalCalendar} documentation.
11321130
*/
11331131
public long getShaahZmanis72Minutes() {
1134-
return getTemporalHour(getAlos72(), getTzais72());
1132+
return getTemporalHour(getAlos72Minutes(), getTzais72Minutes());
11351133
}
11361134

11371135
/**

0 commit comments

Comments
 (0)