diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 02b8bd78..8714fcfc 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -39,7 +39,7 @@ * {@link java.util.Date} is expected and {@link Long#MIN_VALUE} when a long is expected. The * reason that Exceptions are not thrown in these cases is because the lack of a rise/set or twilight is * not an exception, but an expected condition in many parts of the world. - * + *

* Here is a simple example of how to use the API to calculate sunrise. * First create the Calendar for the location you would like to calculate sunrise or sunset times for: * @@ -107,7 +107,7 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The getSunrise method Returns a Date representing the + * The getSunrise method returns a Date representing the * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used * for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the @@ -192,7 +192,7 @@ public Date getBeginAstronomicalTwilight() { } /** - * The getSunset method Returns a Date representing the + * The getSunset method returns a Date representing the * {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for * the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90° plus * {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the @@ -367,8 +367,8 @@ public AstronomicalCalendar() { /** * A constructor that takes in geolocation information as a * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar - * calculations is the the {@link com.kosherjava.zmanim.util.NOAACalculator}. - * + * calculations is the more accurate {@link com.kosherjava.zmanim.util.NOAACalculator}. + * * @param geoLocation * The location information used for calculating astronomical sun times. * @@ -470,7 +470,7 @@ public long getTemporalHour() { * non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and * {@link #getSeaLevelSunset() sea level sunset} as parameters. * - * @param startOfday + * @param startOfDay * The start of the day. * @param endOfDay * The end of the day. @@ -480,11 +480,11 @@ public long getTemporalHour() { * * @see #getTemporalHour() */ - public long getTemporalHour(Date startOfday, Date endOfDay) { - if (startOfday == null || endOfDay == null) { + public long getTemporalHour(Date startOfDay, Date endOfDay) { + if (startOfDay == null || endOfDay == null) { return Long.MIN_VALUE; } - return (endOfDay.getTime() - startOfday.getTime()) / 12; + return (endOfDay.getTime() - startOfDay.getTime()) / 12; } /** @@ -562,8 +562,8 @@ public Date getSunTransit(Date startOfDay, Date endOfDay) { * @param time * The time to be set as the time for the Date. The time expected is in the format: 18.75 * for 6:45:00 PM.time is sunrise and false if it is sunset - * @param isSunrise true if the - * @return The Date. + * @param isSunrise true if this time is for sunrise + * @return The Date object representation of the time double */ protected Date getDateFromTime(double time, boolean isSunrise) { if (Double.isNaN(time)) { @@ -786,7 +786,7 @@ public AstronomicalCalculator getAstronomicalCalculator() { * different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on NOAA's implementation of Jean Meeus's algorithms as well as {@link * com.kosherjava.zmanim.util.SunTimesCalculator} based on the US - * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms. + * Naval Observatory's algorithm. This allows easy runtime switching and comparison of different algorithms. * * @param astronomicalCalculator * The astronomicalCalculator to set. diff --git a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java index 1adca8f2..070ccf1e 100644 --- a/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java @@ -28,7 +28,7 @@ * As an example of the number of different zmanim made available by this class, there are methods to return 18 * different calculations for alos (dawn), 18 for plag hamincha and 29 for tzais available in this * API. The real power of this API is the ease in calculating zmanim that are not part of the library. The methods for - * zmanim calculations not present in this class or it's superclass {@link ZmanimCalendar} are contained in the + * zmanim calculations not present in this class, or it's superclass {@link ZmanimCalendar} are contained in the * {@link AstronomicalCalendar}, the base class of the calendars in our API since they are generic methods for calculating * time based on degrees or time before or after {@link #getSunrise sunrise} and {@link #getSunset sunset} and are of interest * for calculation beyond zmanim calculations. Here are some examples. @@ -84,7 +84,7 @@ * czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083)); *

* Something a drop more challenging, but still simple, would be calculating a zman using the same "complex" - * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not + * offset day used in the above-mentioned Manchester calendar, but for a shaos zmaniyos based zman not * supported by this library, such as calculating the point that one should be makpid * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day. *

    @@ -101,7 +101,7 @@ * Calculating this sof zman achila according to the GRA * is simplicity itself. *
    - * Date sofZamnAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);
    + * Date sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9); * *

    Documentation from the {@link ZmanimCalendar} parent class

    * {@inheritDoc} @@ -146,10 +146,10 @@ public class ComplexZmanimCalendar extends ZmanimCalendar { /** * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as * 7°5' or 7° and 5 minutes. This calculation is used for calculating alos (dawn) and - * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium sized - * stars by Dr. Baruch Cohen in his calendar published in in 1899 in Strasbourg, France. This calculates to + * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium-sized + * stars by Dr. Baruch Cohen in his calendar published in 1899 in Strasbourg, France. This calculates to * 7.0833333° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Sh"Ut - * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh"Ut Bnei Tziyon, Tenuvas Sadeh and + * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh"Ut Bnei Tziyon, Tenuvas Sadeh, and * it is very close to the time of the Mekor Chesed of the Sefer chasidim. * It is close to the position of the sun 30 minutes after sunset in Jerusalem around the equinox / equilux, but not @@ -657,7 +657,7 @@ public long getShaahZmanis96MinutesZmanis() { * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40 * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset() * sunset}. This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this - * system, chatzos (mid-day) will not be the point that the sun is {@link #getSunTransit() halfway across + * system, chatzos (midday) will not be the point that the sun is {@link #getSunTransit() halfway across * the sky}. * * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed @@ -679,7 +679,7 @@ public long getShaahZmanisAteretTorah() { * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 14 minutes after sunset in * degrees {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°}. This day is split into 12 equal parts with - * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point + * each part being a shaah zmanis. Note that with this system, chatzos (midday) will not be the point * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha * Ketana and Plag Hamincha. The 14 minutes are based on 3/4 of an 18 minute mil, with half a minute * added for Rav Yosi. @@ -702,7 +702,7 @@ public long getShaahZmanisAlos16Point1ToTzais3Point8() { * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before * sunrise in degrees {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset in * degrees {@link #getTzaisGeonim3Point7Degrees() tzais 3.7°}. This day is split into 12 equal parts with - * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point + * each part being a shaah zmanis. Note that with this system, chatzos (midday) will not be the point * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha * Gedola calculation. * @@ -834,7 +834,7 @@ public Date getPlagHamincha120Minutes() { * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair in the Mekor Chaim, Orach Chaim Ch. * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that - * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who * mentions the 15 minute mil lechumra by baking matzos. Also see the alos (dawn) calculated using 72 minutes zmaniyos or 1/10th of the day before * sunrise. This is based on an 18-minute Mil so the time for 4 Mil is 72 minutes which is 1/10th - * of a day (12 * 60 = 720) based on the a day being from {@link #getSeaLevelSunrise() sea level sunrise} to - * {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} + * of a day (12 * 60 = 720) based on the day being from {@link #getSeaLevelSunrise() sea level sunrise} to + * {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} * (depending on the {@link #isUseElevation()} setting). * The actual calculation is {@link #getSeaLevelSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation * is used in the calendars published by the alos (dawn) calculated using 96 minutes before before {@link #getSunrise() sunrise} or + * Method to return alos (dawn) calculated using 96 minutes before {@link #getSunrise() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based * on the time to walk the distance of 4 Mil at 24 minutes a Mil. Time based offset * calculations for alos are based on the opinion of the Mil so the time for 5 Mil is 120 minutes which is 1/6th of a day (12 * 60 / * 6 = 120). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link - * #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending + * #getSeaLevelSunset() sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending * on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunrise()} - ({@link * #getShaahZmanisGra()} * 2). Since this time is extremely early, it should only be used lechumra, such * as not eating after this time on a fast day, and not as the start time for mitzvos that can only be @@ -1858,7 +1858,7 @@ public Date getMinchaGedola16Point1Degrees() { * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah - * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise + * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes before sunrise * {@link #getAlos16Point1Degrees() alos 16.1°} and ending 13.5 minutes after sunset {@link * #getTzaisGeonim3Point7Degrees() tzais 3.7°}. Mincha gedola is the earliest time to pray mincha. * The later of this time or 30 clock minutes after chatzos is returned. See {@link #getMinchaGedolaGreaterThan30()} @@ -1886,7 +1886,7 @@ public Date getMinchaGedolaAhavatShalom() { } /** - * FIXME check for syncronous + * FIXME check for synchronous * This is a convenience method that returns the later of {@link #getMinchaGedola()} and * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is * less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise {@link #getMinchaGedola()} @@ -1942,7 +1942,7 @@ public Date getMinchaKetana16Point1Degrees() { * the opinion of the Rambam and others. For more information * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. * - * @return the the Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Date of the time of mincha ketana. If the calculation can't be computed such as * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the * sun may not reach low enough below the horizon for this calculation, a null will be returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. @@ -2637,8 +2637,8 @@ public Date getTzaisGeonim5Point95Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 - * of a Mil based on an 18 - * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western + * of a Mil based on an + * 18-minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_65 3.65°} below the western * horizon. This is a very early zman and should not be relied on without Rabbinical guidance. * * @return the Date representing the time when the sun is 3.65° below sea level. If the calculation @@ -2658,8 +2658,8 @@ public Date getTzaisGeonim3Point65Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 - * of a Mil based on an 18 - * minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western + * of a Mil based on an + * 18-minute Mil, or 13.5 minutes. It is the sun's position at {@link #ZENITH_3_POINT_676 3.676°} below the western * horizon based on the calculations of Stanley Fishkind. This is a very early zman and should not be * relied on without Rabbinical guidance. * @@ -2735,7 +2735,7 @@ public Date getTzaisGeonim5Point88Degrees() { * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 * of a Mil based on the * sun's position at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rabbi Leo Levi's - * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance. + * calculations. This is a very early zman and should not be relied on without Rabbinical guidance. * @todo Additional documentation needed. * * @return the Date representing the time when the sun is 4.8° below sea level. If the calculation @@ -2773,7 +2773,7 @@ public Date getTzaisGeonim6Point45Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the * sun's position {@link #ZENITH_7_POINT_083 7.083° (or 7° 5\u2032}) below the western horizon. This is often - * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized + * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium-sized * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben für * den Beginn der Nacht und des Tages für die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899. @@ -2887,7 +2887,7 @@ public Date getTzaisGeonim9Point75Degrees() { * "https://he.wikipedia.org/wiki/%D7%9E%D7%9C%D7%9B%D7%99%D7%90%D7%9C_%D7%A6%D7%91%D7%99_%D7%98%D7%A0%D7%A0%D7%91%D7%95%D7%99%D7%9D" * >Divrei Malkiel that the time to walk the distance of a Mil is 15 minutes for a total of 60 minutes * for 4 Mil after {@link #getSeaLevelSunset() sea level sunset}. See detailed documentation explaining the - * 60 minute concept at {@link #getAlos60()}. + * 60-minute concept at {@link #getAlos60()}. * * @return the Date representing 60 minutes after sea level sunset. If the calculation can't be * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, @@ -2905,10 +2905,10 @@ public Date getTzais60() { /** * This method returns tzais usually calculated as 40 minutes (configurable to any offset via * {@link #setAteretTorahSunsetOffset(double)}) after sunset. Please note that Chacham Yosef Harari-Raful - * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom + * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanei hayom * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman - * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change + * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be changed * by calling {@link #setAteretTorahSunsetOffset(double)}. * * @return the Date representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset}) @@ -2937,7 +2937,7 @@ public double getAteretTorahSunsetOffset() { /** * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception - * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method. + * of Israel where a 25-minute offset is used. This 40 minute (or any other) offset can be overridden by this method. * This offset impacts all Ateret Torah zmanim. * * @param ateretTorahSunsetOffset @@ -2998,7 +2998,7 @@ public Date getSofZmanTfilaAteretTorah() { /** * @see #getSofZmanTfilaAteretTorah() - * @deprecated misspelled method name (all other methods spell tfila witout an H) to be removed in 3.0.0. + * @deprecated misspelled method name (all other methods spell tfila without an H) to be removed in 3.0.0. * @return the Date of the latest zman krias shema based on this calculation. If the * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where * the sun does not rise, and one where it does not set, a null will be returned. See detailed @@ -3093,7 +3093,7 @@ public Date getPlagHaminchaAteretTorah() { * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the * equinox. This does not match reality, since there is no direct relationship between the length of the day and - * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the + * twilight. The shortest twilight is during the equinox, the longest is during the summer solstice, and in the * winter with the shortest daylight, the twilight period is longer than during the equinoxes. * * @return the Date representing the time. If the calculation can't be computed such as in the Arctic @@ -3108,7 +3108,7 @@ public Date getTzais72Zmanis() { /** * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. - * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn + * @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk) * (adding the time to sunset). If 0 is passed in, a null will be returned (since we can't tell if it @@ -3209,7 +3209,7 @@ public Date getTzais120() { /** * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman - * is extremely late and at a point when the it is long past the 18° point where the darkest point is + * is extremely late and at a point when it is long past the 18° point where the darkest point is * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos. * * @deprecated This method should be used lechumra only since it returns a very late time, and if used @@ -3344,8 +3344,8 @@ public Date getFixedLocalChatzos() { * A method that returns the latest zman krias shema (time to recite Shema in the morning) calculated as 3 * clock hours before {@link #getFixedLocalChatzos()}. Note that there are opinions brought down in Yisrael Vehazmanim * page 57 and Rav Yitzchak Silber's Sha'aos Shavos Balalacha that this calculation is a mistake and regular - * chatzos shoud be used for clock-hour calculations as opposed to fixed local chatzos. According to + * "https://www.worldcat.org/oclc/811253716">Sha'aos Shavos Bahalacha that this calculation is a mistake and regular + * chatzos should be used for clock-hour calculations as opposed to fixed local chatzos. According to * these opinions it should be 3 clock hours before regular chatzos as calculated in {@link * #getSofZmanShma3HoursBeforeChatzos()}. * @@ -3357,7 +3357,7 @@ public Date getFixedLocalChatzos() { * * @deprecated This method of calculating sof zman Shma is considered a mistaken understanding of the proper * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael + * "https://www.worldcat.org/oclc/811253716">Sha'aos Shavos Bahalacha. On pages 316-318 he discusses Rav Yisrael * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions @@ -3384,7 +3384,7 @@ public Date getSofZmanShmaFixedLocal() { * * @deprecated This method of calculating sof zman Tfila is considered a mistaken understanding of the proper * calculation of this zman in the opinion of Rav Yitzchak Silber's Sha'aos Shavos Balalacha. On pages 316-318 he discusses Rav Yisrael + * "https://www.worldcat.org/oclc/811253716">Sha'aos Shavos Bahalacha. On pages 316-318 he discusses Rav Yisrael * Harfenes's calculations and points to his seeming agreement that using fixed local chatzos as the focal * point is problematic. See Yisrael Vehazmanim page 57. While the Yisrael Vehazmanim mentions @@ -3451,7 +3451,7 @@ public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { * optional end of day to limit molad times to the end of the night before or beginning of the next night. * Ignored if either tzais or alos are null * @param techila - * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and + * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, * and if it is the end, return the end of the previous night (alos passed in). Ignored if either * alos or tzais are null. * @return the molad based time. If the zman does not occur during the current date, null will be @@ -3459,8 +3459,8 @@ public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { */ private Date getMoladBasedTime(Date moladBasedTime, Date alos, Date tzais, boolean techila) { Date lastMidnight = getMidnightLastNight(); - Date midnightTonigh = getMidnightTonight(); - if (!(moladBasedTime.before(lastMidnight) || moladBasedTime.after(midnightTonigh))){ + Date midnightTonight = getMidnightTonight(); + if (!(moladBasedTime.before(lastMidnight) || moladBasedTime.after(midnightTonight))){ if (alos != null || tzais != null) { if (techila && !(moladBasedTime.before(tzais) || moladBasedTime.after(alos))){ return tzais; @@ -3781,7 +3781,7 @@ public Date getSofZmanAchilasChametzGRA() { * * @return the Date of the latest time of eating chametz. If it is not erev Pesach or the * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does - * not rise, and one where it does not set), a null will be returned. See detailed explanation on top of + * not rise, and one where it does not set, a null will be returned. See detailed explanation on top of * the {@link AstronomicalCalendar} documentation. * @todo in v 3.0.0 enable the calendar check for erev pesach and return null in all other cases. * @see #getShaahZmanisMGA() @@ -3831,7 +3831,7 @@ public Date getSofZmanAchilasChametzMGA16Point1Degrees() { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion * of the GRA. This time is 5 hours into the day based on the * opinion of the GRA that the day is calculated from @@ -3857,7 +3857,7 @@ public Date getSofZmanBiurChametzGRA() { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of * the Magen Avraham (MGA) based on alos * being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 5 {@link @@ -3868,7 +3868,7 @@ public Date getSofZmanBiurChametzGRA() { * @todo in v 3.0.0 enable the calendar check for erev pesach and return null in all other cases. * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not * erev Pesach or the calculation can't be computed such as in the Arctic Circle where there is at - * least one day a year where the sun does not rise, and one where it does not set), a null will be + * least one day a year where the sun does not rise, and one where it does not set, a null will be * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getShaahZmanisMGA() * @see #getAlos72() @@ -3886,7 +3886,7 @@ public Date getSofZmanBiurChametzMGA72Minutes() { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion * of the Magen Avraham (MGA) based on alos * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time is 5 @@ -3921,7 +3921,7 @@ public Date getSofZmanBiurChametzMGA16Point1Degrees() { * netz amiti (sunrise) without {@link AstronomicalCalculator#getElevationAdjustment(double) * elevation adjustment}. This forms the base for the Baal Hatanya's dawn-based calculations that are * calculated as a dip below the horizon before sunrise. - * + *

    * According to the Baal Hatanya, netz amiti, or true (halachic) sunrise, is when the top of the sun's * disk is visible at an elevation similar to the mountains of Eretz Yisrael. The time is calculated as the point at which * the center of the sun's disk is 1.583° below the horizon. This degree-based calculation can be found in Rabbi Shalom @@ -3936,7 +3936,7 @@ public Date getSofZmanBiurChametzMGA16Point1Degrees() { * "https://en.wikipedia.org/wiki/Chabad">Chabad calendars that use the Baal Hatanya's zmanim. See * About Our * Zmanim Calculations @ Chabad.org. - * + *

    * Note: netz amiti is used only for calculating certain zmanim, and is intentionally unpublished. For * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the * published time for netz / sunrise. @@ -3959,14 +3959,14 @@ private Date getSunriseBaalHatanya() { * shkiah amiti (sunset) without {@link AstronomicalCalculator#getElevationAdjustment(double) * elevation adjustment}. This forms the base for the Baal Hatanya's dusk-based calculations that are calculated * as a dip below the horizon after sunset. - * + *

    * According to the Baal Hatanya, shkiah amiti, true (halachic) sunset, is when the top of the * sun's disk disappears from view at an elevation similar to the mountains of Eretz Yisrael. * This time is calculated as the point at which the center of the sun's disk is 1.583 degrees below the horizon. - * + *

    * Note: shkiah amiti is used only for calculating certain zmanim, and is intentionally unpublished. For * practical purposes, all daytime mitzvos should be completed before the published time for shkiah / sunset. - * + *

    * For further explanation of the calculations used for the Baal Hatanya's zmanim in this library, see * About Our * Zmanim Calculations @ Chabad.org. @@ -4143,7 +4143,7 @@ public Date getMinchaGedolaBaalHatanya() { } /** - * FIXME syncronous + * FIXME synchronous * This is a convenience method that returns the later of {@link #getMinchaGedolaBaalHatanya()} and * {@link #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisBaalHatanya() * shaah zmanis} is less than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise @@ -4435,7 +4435,7 @@ public Date getPlagHaminchaGRAFixedLocalChatzosToSunset() { /** * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should - * not be used for latitudes different than the NY area. + * not be used for latitudes different from the NY area. * * @return the Date representing the time. If the calculation can't be computed such as in the Arctic * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index c5ba473d..a952c077 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -80,7 +80,7 @@ public class ZmanimCalendar extends AstronomicalCalendar { /** * Is elevation above sea level calculated for times besides sunrise and sunset. According to Rabbi Dovid Yehuda * Bursztyn in his Zmanim Kehilchasam (second edition published - * in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and sunset should use elevation. However + * in 2007) chapter 2 (pages 186-187) no zmanim besides sunrise and sunset should use elevation. However, * Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages * 34 and 42 is of the opinion that elevation should be @@ -129,17 +129,17 @@ public void setUseElevation(boolean useElevation) { /** * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For - * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos + * example as the day lengthens, the second half of the day is longer than the first and astronomical chatzos * would be a drop earlier than half of the time between sunrise and sunset. * * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA() - * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos + * Sof zman Shma GRA} would be calculated as 3 shaos zmaniyos after sunrise, but the shaos * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical - * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag - * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75 - * shaaos zmaniyos after sunrise. Etc. + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag + * hamincha} would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 + * shaos zmaniyos after sunrise. Etc. * * @return if the use of astronomical chatzos is active. * @see #useAstronomicalChatzos @@ -183,16 +183,16 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced * accuracy. For example as the day is lengthening (as we approach spring season), the second half of the day is longer than * the first and astronomical chatzos would be a drop earlier than half of the time between sunrise and sunset. - * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter. + * Conversely, the second half of the day would be shorter in the 'fall' season as the days start getting shorter. * * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA() - * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos + * Sof zman Shma GRA} would be calculated as 3 shaos zmaniyos after sunrise, but the shaos * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the * time between sunrise and sunset. {@link #getMinchaGedola() mincha gedola} will be calculated as half a * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical - * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag - * hamincha} would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75 - * shaaos zmaniyos after sunrise. Etc. + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag + * hamincha} would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 + * shaos zmaniyos after sunrise. Etc. * * @return if the use of astronomical chatzos is active. * @see #useAstronomicalChatzosForOtherZmanim @@ -331,7 +331,7 @@ public Date getAlosHashachar() { /** * Method to return alos (dawn) calculated using 72 minutes before {@link #getSunrise() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time - * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but + * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72-minute time (but * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the * distance of 4 Mil. @@ -349,10 +349,10 @@ public Date getAlos72() { * This method returns {@link #getSunTransit() Astronomical chatzos} if the * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and * {@link #isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link #getChatzosAsHalfDay() - * halfway point between sunrise and sunset} if it does not support it or it is not configured to use it. There are currently + * halfway point between sunrise and sunset} if it does not support it, or it is not configured to use it. There are currently * two {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the default {@link * com.kosherjava.zmanim.util.NOAACalculator NOAA calculator} and the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO - * calculator}. The USNO calculator calculates chatzos as halfway between sunrise and sunset (identical to six shaaos + * calculator}. The USNO calculator calculates chatzos as halfway between sunrise and sunset (identical to six shaos * zmaniyos after sunrise), while the NOAACalculator calculates it more accurately as {@link #getSunTransit() astronomical * chatzos}. See The Definition of Chatzos * for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can be null in @@ -383,18 +383,18 @@ public Date getChatzos() { } /** - * Returns chatzos calculated as halfway between sunrise and sunset. Many are of the opinion opinion that - * chatzos is calculated as the the midpoint between {@link #getSeaLevelSunrise sea level sunrise} and + * Returns chatzos calculated as halfway between sunrise and sunset. Many are of the opinion that + * chatzos is calculated as the midpoint between {@link #getSeaLevelSunrise sea level sunrise} and * {@link #getSeaLevelSunset sea level sunset}, despite it not being the most accurate way to calculate it. A day * starting at alos and ending at tzais using the same time or degree offset will also return * the same time. In reality due to lengthening or shortening of day, this is not necessarily the exact midpoint of * the day, but it is very close. This method allows you to use the NOAACalculator and still calculate chatzos - * as six shaaos zmaniyos after sunrise. There are currently two {@link + * as six shaos zmaniyos after sunrise. There are currently two {@link * com.kosherjava.zmanim.util.AstronomicalCalculator calculators} available in the API, the {@link * com.kosherjava.zmanim.util.NOAACalculator} and the {@link com.kosherjava.zmanim.util.SunTimesCalculator}. - * The SunTimesCalculator calculates chatzos as halfway between sunrise and sunset (and of six shaaos + * The SunTimesCalculator calculates chatzos as halfway between sunrise and sunset (and of six shaos * zmaniyos), while the NOAACalculator calculates it as astronomical chatzos that is slightly more - * accurate. This method allows you to use the NOAACalculator and still calculate chatzos as six shaaos + * accurate. This method allows you to use the NOAACalculator and still calculate chatzos as six shaos * zmaniyos after sunrise. See The Definition * of Chatzos for a detailed explanation of the ways to calculate Chatzos. * @@ -456,7 +456,7 @@ public Date getSofZmanShma(Date startOfDay, Date endOfDay, boolean synchronous) /** * A generic method for calculating the latest zman krias shema that calls {@link #getSofZmanShma(Date, Date, boolean)} - * passing false to the synchronous parameter since there is now way to know if the start and end of the day are + * passing false to the synchronous parameter since there is no way to know if the start and end of the day are * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating zman krias shema. This can be sunrise or any alos passed @@ -479,8 +479,8 @@ public Date getSofZmanShma(Date startOfDay, Date endOfDay) { * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according * to the GRA. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level - * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level + * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * setting). * * @see #getSofZmanShma(Date, Date) @@ -501,7 +501,7 @@ public Date getSofZmanShmaGRA() { * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the * Magen Avraham (MGA). The day is calculated * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link - * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() + * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() * sunset} (depending on the {@link #isUseElevation()} setting). * * @return the Date of the latest zman shema. If the calculation can't be computed such as in @@ -523,8 +523,8 @@ public Date getSofZmanShmaMGA() { * a Mil. According to the Machtzis Hashekel in * Orach Chaim 235:3, the Pri Megadim in Orach * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard - * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting) a 72 - * minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used. + * clock minutes any time of the year in any location. Depending on the {@link #isUseElevation()} setting, a + * 72-minute offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used. * * @see ComplexZmanimCalendar#getTzais16Point1Degrees() * @return the Date representing 72 minutes after sunset. If the calculation can't be @@ -567,7 +567,7 @@ public Date getCandleLighting() { * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA. This method's synchronous parameter indicates if the start * and end of day for the calculation are synchronous, having the same offset. This is typically the case, but some * zmanim calculations are based on a start and end at different offsets from the real start and end of the day, - * such as starting the day at alos and an ending it at tzais genoim or some other variant. If the day + * such as starting the day at alos and an ending it at tzais geonim or some other variant. If the day * is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based calculations} will be bypassed. * It would be illogical to use a half-day based calculation that start/end at chatzos when the two "halves" of * the day are not equal, and the halfway point between them is not at chatzos. @@ -597,7 +597,7 @@ public Date getSofZmanTfila(Date startOfDay, Date endOfDay, boolean synchronous) /** * A generic method for calculating the latest zman tfila that calls {@link #getSofZmanTfila(Date, Date, boolean)} - * passing false to the synchronous parameter since there is now way to know if the start and end of the day are + * passing false to the synchronous parameter since there is no way to know if the start and end of the day are * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating zman tfilah. This can be sunrise or any alos passed @@ -620,8 +620,8 @@ public Date getSofZmanTfila(Date startOfDay, Date endOfDay) { * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according * to the GRA. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level - * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level + * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * setting). * * @see #getSofZmanTfila(Date, Date) @@ -641,12 +641,12 @@ public Date getSofZmanTfilaGRA() { * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the * Magen Avraham (MGA). The day is calculated * from 72 minutes before {@link #getSeaLevelSunrise() sea level sunrise} to 72 minutes after {@link - * #getSeaLevelSunrise sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() + * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() * sunset} (depending on the {@link #isUseElevation()} setting). * * @return the Date of the latest zman tfila. If the calculation can't be computed such as in * the Arctic Circle where there is at least one day a year where the sun does not rise, and one where it - * does not set), a null will be returned. See detailed explanation on top of the + * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * @see #getSofZmanTfila(Date, Date) * @see #getShaahZmanisMGA() @@ -657,7 +657,7 @@ public Date getSofZmanTfilaMGA() { } /** - * A generic method for calculating mincha gedola (the earliest time to recite the mincha1 prayers) that + * A generic method for calculating mincha gedola (the earliest time to recite the mincha prayers) that * is 6.5 * shaos zmaniyos (temporal hours) after the start of the day, calculated using the start and end of the * day passed to this method. The time from the start of day to the end of day are divided into 12 shaos zmaniyos * (temporal hours), and mincha gedola is calculated as 6.5 of those shaos zmaniyos after the beginning @@ -665,13 +665,13 @@ public Date getSofZmanTfilaMGA() { * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link * #isUseElevation()} elevation setting) to this method will return mincha gedola according to the opinion of the * GRA. Alternatively, this method uses {@link - * #isUseAstronomicalChatzosForOtherZmanim()} to control if the time is based on 6.5 sha'os zmaniyos into the day + * #isUseAstronomicalChatzosForOtherZmanim()} to control if the time is based on 6.5 shaos zmaniyos into the day * mentioned above, or as half an hour zmaniyos based on the second half of the day after chatzos ({@link * #getSunTransit() astronomical chatzos} if supported by the {@link AstronomicalCalculator calculator} and {@link * #isUseAstronomicalChatzos() configured} or {@link #getChatzosAsHalfDay() chatzos as half a day} if not. This * method's synchronous parameter indicates if the start and end of day for the calculation are synchronous, having the same * offset. This is typically the case, but some zmanim calculations are based on a start and end at different offsets - * from the real start and end of the day, such as starting the day at alos and an ending it at tzais genoim + * from the real start and end of the day, such as starting the day at alos and an ending it at tzais geonim * or some other variant. If the day is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based * calculations} will be bypassed. It would be illogical to use a half-day based calculation that start/end at chatzos * when the two "halves" of the day are not equal, and the halfway point between them is not at chatzos. @@ -706,7 +706,7 @@ public Date getMinchaGedola(Date startOfDay, Date endOfDay, boolean synchronous) /** * A generic method for calculating mincha gedola that calls {@link #getMinchaGedola(Date, Date, boolean)} passing - * false to the synchronous parameter since there is now way to know if the start and end of the day are + * false to the synchronous parameter since there is no way to know if the start and end of the day are * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more * details. * @param startOfDay @@ -733,7 +733,7 @@ public Date getMinchaGedola(Date startOfDay, Date endOfDay) { * time one can pray mincha. The Ramba"m is of the opinion that it is better to delay mincha until * {@link #getMinchaKetana() mincha ketana} while the Ra"sh, Tur, GRA and others are of the * opinion that mincha can be prayed lechatchila starting at mincha gedola. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level + * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * setting). * @todo Consider adjusting this to calculate the time as half an hour zmaniyos after either {@link @@ -766,7 +766,7 @@ public Date getMinchaGedola() { * * @param startOfDay * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos - * passed to to this method. + * passed to this method. * @param endOfDay * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais * passed to this method. @@ -793,11 +793,11 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay, boolean sync /** * A generic method for calculating samuch lemincha ketana that calls {@link #getSamuchLeMinchaKetana(Date, Date, boolean)} - * passing false to the synchronous parameter since there is now way to know if the start and end of the day are + * passing false to the synchronous parameter since there is no way to know if the start and end of the day are * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos - * passed to to this method. + * passed to this method. * @param endOfDay * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais * passed to this method. @@ -821,10 +821,10 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay) { * example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link #getSeaLevelSunrise() sea * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} * elevation setting) to this method will return mincha ketana according to the opinion of the - * GRA. This method's synchronous parameter indicates ifthe start + * GRA. This method's synchronous parameter indicates if the start * and end of day for the calculation are synchronous, having the same offset. This is typically the case, but some * zmanim calculations are based on a start and end at different offsets from the real start and end of the day, - * such as starting the day at alos and an ending it at tzais genoim or some other variant. If the day + * such as starting the day at alos and an ending it at tzais geonim or some other variant. If the day * is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based calculations} will be bypassed. * It would be illogical to use a half-day based calculation that start/end at chatzos when the two "halves" of * the day are not equal, and the halfway point between them is not at chatzos. @@ -854,7 +854,7 @@ public Date getMinchaKetana(Date startOfDay, Date endOfDay, boolean synchronous) /** * A generic method for calculating mincha ketana that calls {@link #getMinchaKetana(Date, Date, boolean)} passing - * false to the synchronous parameter since there is now way to know if the start and end of the day are synchronous. + * false to the synchronous parameter since there is no way to know if the start and end of the day are synchronous. * Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating Mincha ketana. This can be sunrise or any alos passed @@ -879,8 +879,8 @@ public Date getMinchaKetana(Date startOfDay, Date endOfDay) { * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according * to the GRA. For more information on this see the * documentation on {@link #getMinchaGedola() mincha gedola}. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level - * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level + * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * setting. * * @see #getMinchaKetana(Date, Date) @@ -908,7 +908,7 @@ public Date getMinchaKetana() { * GRA. This method's synchronous parameter indicates if * the start and end of day for the calculation are synchronous, having the same offset. This is typically the case, but * some zmanim calculations are based on a start and end at different offsets from the real start and end of the - * day, such as starting the day at alos and an ending it at tzais genoim or some other variant. If the + * day, such as starting the day at alos and an ending it at tzais geonim or some other variant. If the * day is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based calculations} will be bypassed. * It would be illogical to use a half-day based calculation that start/end at chatzos when the two "halves" of * the day are not equal, and the halfway point between them is not at chatzos. @@ -936,7 +936,7 @@ public Date getPlagHamincha(Date startOfDay, Date endOfDay, boolean synchronous) /** * A generic method for calculating plag hamincha that calls {@link #getPlagHamincha(Date, Date, boolean)} passing - * false to the synchronous parameter since there is now way to know if the start and end of the day are synchronous. + * false to the synchronous parameter since there is no way to know if the start and end of the day are synchronous. * Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating plag. This can be sunrise or any alos passed to this method. @@ -957,7 +957,7 @@ public Date getPlagHamincha(Date startOfDay, Date endOfDay) { * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on * the {@link #isUseElevation()} setting), according to the GRA. Plag hamincha is the earliest time that Shabbos can be started. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunrise sea level + * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * * @see #getPlagHamincha(Date, Date, boolean) @@ -975,7 +975,7 @@ public Date getPlagHamincha() { /** * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to * the opinion of the GRA. This calculation divides - * the day based on the opinion of the GRA that the day runs from from {@link #getSeaLevelSunrise() sea + * the day based on the opinion of the GRA that the day runs from {@link #getSeaLevelSunrise() sea * level sunrise} to {@link #getSeaLevelSunrise sea level sunset} or {@link #getSunrise() sunrise} to * {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The day is split into 12 equal * parts with each one being a shaah zmanis. This method is similar to {@link #getTemporalHour}, but can @@ -996,7 +996,7 @@ public long getShaahZmanisGra() { /** * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos + * "https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA) based on 72 minutes alos * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and * tfila). Dawn for this calculation is 72 minutes before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() * sea level sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link @@ -1036,7 +1036,7 @@ public ZmanimCalendar(GeoLocation location) { /** * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some - * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom + * calendars use 15 minutes, while the custom in Jerusalem is to use a 40-minute offset. Please check the local custom * for candle lighting time. * * @return Returns the currently set candle lighting offset in minutes. @@ -1050,7 +1050,7 @@ public double getCandleLightingOffset() { /** * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15 - * minutes, while the custom in Jerusalem is to use a 40 minute offset. + * minutes, while the custom in Jerusalem is to use a 40-minute offset. * * @param candleLightingOffset * The candle lighting offset to set in minutes. @@ -1096,7 +1096,7 @@ public boolean isAssurBemlacha(Date currentTime, Date tzais, boolean inIsrael) { /** * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the - * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the + * day defined as the start and end of day (or night) and the number of shaos zmaniyos passed to the * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset sunset} or {@link * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the @@ -1110,8 +1110,8 @@ public boolean isAssurBemlacha(Date currentTime, Date tzais, boolean inIsrael) { * the end of day for calculating the zman. This can be sunset or any tzais passed to * this method. * @param hours - * the number of shaahos zmaniyos (temporal hours) to offset from the start of day - * @return the Date of the time of zman with the shaahos zmaniyos (temporal hours) + * the number of shaos zmaniyos (temporal hours) to offset from the start of day + * @return the Date of the time of zman with the shaos zmaniyos (temporal hours) * in the day offset from the start of day passed to this method. If the calculation can't be computed such * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one * where it does not set, a null will be returned. See detailed explanation on top of the @@ -1170,7 +1170,7 @@ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) * second half of the day, from chatzos to sunset / tzais. Morning based times are calculated. based on the first * 6 hours of the day, and afternoon times based on the second half of the day. As an example, passing 0.5, a start of * chatzos and an end of day as sunset will return the time of mincha gedola GRA as half an hour zmanis - * based on the second half of the day. Some zmanim calculations can be based on subtracting sha'os zmaniyos + * based on the second half of the day. Some zmanim calculations can be based on subtracting shaos zmaniyos * from the end of the day, and that is supported by passing a negative hour to this method. * * @param startOfHalfDay @@ -1180,9 +1180,9 @@ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) * The end of the half day. This would be chatzos for morning based times such as sof zman krias shema * and sunset or tzais for afternoon based times such as mincha gedola. * @param hours - * The number of sha'os zmaniyos (hours) to offset the beginning of the first or second half of the day. For example, + * The number of shaos zmaniyos (hours) to offset the beginning of the first or second half of the day. For example, * 3 for sof zman Shma, 0.5 for mincha gedola (half an hour after chatzos) and 4.75 for plag - * hamincha. If the number of hours is negative, it will subtract the number of sha'os zmaniyos from the end + * hamincha. If the number of hours is negative, it will subtract the number of shaos zmaniyos from the end * of the day. * * @return the Date of zman based on calculation of the first or second half of the day. If the @@ -1208,7 +1208,7 @@ public Date getHalfDayBasedZman(Date startOfHalfDay, Date endOfHalfDay, double h } /** - * A utility method to calculate the length of a sha'ah zmanis based on 1/6 of a 6 hour day. + * A utility method to calculate the length of a sha'ah zmanis based on 1/6 of a 6-hour day. * @param startOfHalfDay The start of the half-day. This would be alos or sunrise for the first half of the day, * or chatzos for the second half of the day. * @param endOfHalfDay The end of the half-day. This would be chatzos for the first half of the day, or sunset or diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/Daf.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/Daf.java index d01e5d39..7a208036 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/Daf.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/Daf.java @@ -23,7 +23,7 @@ */ public class Daf { /** - * {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}. + * See {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}. */ private int masechtaNumber; @@ -159,7 +159,7 @@ public String getMasechtaTransliterated() { } /** - * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars. + * Setter method to allow overriding of the default list of masechtos transliterated into Latin chars. * The default values use Ashkenazi American English transliteration. * * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set. @@ -220,7 +220,7 @@ public String getYerushlmiMasechtaTransliterated() { } /** - * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars. + * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into Latin chars. * The default uses Ashkenazi American English transliteration. * * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set. @@ -240,7 +240,7 @@ public void setYerushlmiMasechtaTransliterated(String[] masechtosYerushalmiTrans } /** - * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars. + * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into Latin chars. * The default uses Ashkenazi American English transliteration. * * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi. diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 2a121e4f..62f6df10 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -20,7 +20,7 @@ /** * The HebrewDateFormatter class formats a {@link JewishDate}. - * + *

    * The class formats Jewish dates, numbers, Daf Yomi (Bavli and Yerushalmi), the Omer, * Parshas Hashavua (including the special parshiyos of Shekalim, Zachor, Parah * and Hachodesh), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings. @@ -333,7 +333,7 @@ public void setLongWeekFormat(boolean longWeekFormat) { * @see #getTransliteratedShabbosDayOfWeek() * @see #setTransliteratedShabbosDayOfWeek(String) */ - private String transliteratedShabbosDayOfweek = "Shabbos"; + private String transliteratedShabbosDayOfWeek = "Shabbos"; /** * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation "Shabbos". @@ -344,7 +344,7 @@ public void setLongWeekFormat(boolean longWeekFormat) { * @see #formatDayOfWeek(JewishDate) */ public String getTransliteratedShabbosDayOfWeek() { - return transliteratedShabbosDayOfweek; + return transliteratedShabbosDayOfWeek; } /** @@ -358,7 +358,7 @@ public String getTransliteratedShabbosDayOfWeek() { * @see #formatDayOfWeek(JewishDate) */ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { - this.transliteratedShabbosDayOfweek = transliteratedShabbos; + this.transliteratedShabbosDayOfWeek = transliteratedShabbos; } /** @@ -377,7 +377,7 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses * Ashkenazi pronunciation in typical American English spelling. * - * @return the list of transliterated holidays. The default list is currently ["Erev Pesach", "Pesach", + * @return the array of transliterated holidays. The default list is currently ["Erev Pesach", "Pesach", * "Chol Hamoed Pesach", "Pesach Sheni", "Erev Shavuos", "Shavuos", "Seventeenth of Tammuz", "Tishah B'Av", * "Tu B'Av", "Erev Rosh Hashana", "Rosh Hashana", "Fast of Gedalyah", "Erev Yom Kippur", "Yom Kippur", * "Erev Succos", "Succos", "Chol Hamoed Succos", "Hoshana Rabbah", "Shemini Atzeres", "Simchas Torah", @@ -580,7 +580,7 @@ public void setHebrewOmerPrefix(String hebrewOmerPrefix) { * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar - * "Adar", "Adar II", "Adar I" * - * @return the list of months beginning in Nissan and ending in in "Adar", "Adar II", "Adar I". The default list is + * @return the array of months beginning in Nissan and ending in "Adar", "Adar II", "Adar I". The default list is * currently ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves", * "Shevat", "Adar", "Adar II", "Adar I"]. * @see #setTransliteratedMonthList(String[]) @@ -590,7 +590,7 @@ public String[] getTransliteratedMonthList() { } /** - * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default + * Setter method to allow overriding of the default list of months transliterated into Latin chars. The default * uses Ashkenazi American English transliteration. * * @param transliteratedMonths @@ -680,7 +680,7 @@ public boolean isUseGershGershayim() { * שבט ו׳ אלפים show the use of the Geresh. * * @param useGershGershayim - * set to false to omit the Geresh ׳ and Gershayim ״ in formatting + * set this to false to omit the Geresh ׳ and Gershayim ״ in formatting */ public void setUseGershGershayim(boolean useGershGershayim) { this.useGershGershayim = useGershGershayim; @@ -689,7 +689,7 @@ public void setUseGershGershayim(boolean useGershGershayim) { /** * Returns whether the class is set to use the מנצפ״ך letters when * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or - * or תש״ף if true. Traditionally non-final form letters are used, so the year + * תש״ף if true. Traditionally non-final form letters are used, so the year * 5780 would be formatted as תש״פ if the default false is used here. If this returns * true, the format תש״ף would be used. * @@ -859,17 +859,17 @@ private static String formatMolad(long moladChalakim) { public String getFormattedKviah(int jewishYear) { JewishDate jewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana int kviah = jewishDate.getCheshvanKislevKviah(); - int roshHashanaDayOfweek = jewishDate.getDayOfWeek(); - String returnValue = formatHebrewNumber(roshHashanaDayOfweek); + int roshHashanaDayOfWeek = jewishDate.getDayOfWeek(); + String returnValue = formatHebrewNumber(roshHashanaDayOfWeek); returnValue += (kviah == JewishDate.CHASERIM ? "\u05D7" : kviah == JewishDate.SHELAIMIM ? "\u05E9" : "\u05DB"); jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year - int pesachDayOfweek = jewishDate.getDayOfWeek(); - returnValue += formatHebrewNumber(pesachDayOfweek); + int pesachDayOfWeek = jewishDate.getDayOfWeek(); + returnValue += formatHebrewNumber(pesachDayOfWeek); returnValue = returnValue.replaceAll(GERESH, "");// geresh is never used in the kviah format // boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear); // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh - // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for - // a 385 day year + // Hashana for a 353-day year, 2 for a 354-day year, 3 for a 355 or 383 day year, 4 for a 384-day year and 5 for + // a 385-day year return returnValue; } @@ -912,7 +912,7 @@ public String formatDafYomiYerushalmi(Daf daf) { } /** - * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999. + * Returns a Hebrew formatted string of a number. The method can calculate from 0 to 9999. *