You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ad91c0a
Browse filesBrowse the repository at this point in the historyBrowse files
// Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all
@@ -1380,6 +1379,79 @@ public int getTekufasTishreiElapsedDays() {
1380
1379
return (int) Math.floor(days - solar);
1381
1380
}
1382
1381
1382
+
/**
1383
+
* Calculates the hours for when the <a href="https://en.wikipedia.org/wiki/Tekufah"><em>Tekufa</em></a> (season) changes.
1384
+
* There are 4 <em>tekufos</em> a year: Nissan/Spring, Tammuz/Summer, Tishri/Fall, and Teves/Winter. This calculation is
1385
+
* according to <a href="https://en.wikipedia.org/wiki/Samuel_of_Nehardea">Shmuel</a> in <a href=
1386
+
* "https://hebrewbooks.org/shas.aspx?mesechta=3&daf=56">Eruvin 56a</a>, which is a more rounded up version of <a href=
1387
+
* "https://en.wikipedia.org/wiki/Adda_bar_Ahavah">Rav Adda's</a> calculation. The <a href=
1388
+
* "https://en.wikipedia.org/wiki/Moses_Isserles">Rama</a> writes in <a href=
1389
+
* "https://hebrewbooks.org/pdfpager.aspx?req=67715&st=&pgnum=218">Yoreh De'ah 116:5</a> that one should not drink water during
1390
+
* the <em>tekufa</em> change. <a href="https://en.wikipedia.org/wiki/Ovadia_Yosef">Rabbi Ovadia Yosef</a> (Halichot Olam,
1391
+
* Chelek 7, Page 183) recommends to abstain from drinking water for a range of 1 hour (30 minutes before and after the
1392
+
* <em>tekufa</em> event).
1393
+
*
1394
+
* @return the number of hours into the Hebrew day that the <em>tekufa</em> (season) change takes place as a {code Double}, or
1395
+
* {@code null} if the <em>tekufa</em> does not occur on current day. For example: 19.5 would mean that the
1396
+
* <em>tekufa</em> occurs 19 hours and a half into the Hebrew date, or 13 and a half hours (-6 hours) into the Gregorian
1397
+
* date.
1398
+
*/
1399
+
privateDoublegetTekufa() {
1400
+
doubleINITIAL_TEKUFA_OFFSET = 12.625; // the number of days Tekufas Tishrei occurs before JEWISH_EPOCH
1401
+
1402
+
doubledays = getJewishCalendarElapsedDays(getJewishYear()) + getDaysSinceStartOfJewishYear() + INITIAL_TEKUFA_OFFSET - 1; // total days since first Tekufas Tishrei event
1403
+
1404
+
doublesolarDaysElapsed = days % 365.25; // total days elapsed since the start of solar year
1405
+
doubletekufaDaysElapsed = solarDaysElapsed % 91.3125; // the number of days that have passed since a tekufa event
1406
+
if (tekufaDaysElapsed > 0 && tekufaDaysElapsed <= 1) { // if the tekufa happens in the upcoming 24 hours
1407
+
return ((1.0 - tekufaDaysElapsed) * 24.0) % 24;// rationalize the tekufa event to number of hours since start of jewish day
1408
+
} else {
1409
+
returnnull;
1410
+
}
1411
+
}
1412
+
1413
+
/**
1414
+
* Returns an {@code Instant} if the current day has a <a href="https://en.wikipedia.org/wiki/Tekufah"><em>Tekufa</em></a>
1415
+
* (season) change. The {@code Instant} will contain the time that the <em>tekufa</em> (season) is arriving. If this method is
1416
+
* called on a day without a <em>tekufa</em> change, it will return a {@code null}. The default implementation of this method
1417
+
* will return the <em>tekufa</em> change according to the calculations of the <a href="https://zmanim.online/">Luach Itim
1418
+
* Lebinah</a> following <a href="https://en.wikipedia.org/wiki/Yechiel_Michel_Tucazinsky">Rabbi Yechiel Michel Tucazinsky</a>.
1419
+
* However, there is also the opinion of Rabbi Yonah Boron, who calculates the <em>tekufa</em> based on Local Mean Time (LMT)
1420
+
* in Israel which causes a 21-minute difference. There is a third opinion as well to use seasonal midday but that is not a
1421
+
* generally followed opinion, so it has not been implemented.
1422
+
* @param useLocalMeanTime if true, removes ~21 minutes from the time of the <em>tekufa</em> calculated by Rabbi Yechiel Michel
1423
+
* Tucazinsky, and will follow the opinion of Rabbi Yonah Boron.
1424
+
* @return an Instant with the time that the <em>tekufa</em> (season) changes or a null on a day with no <em>tekufa</em> change.
0 commit comments