From 4e278052781d8e98017fb53dee352fb70024e3ac Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:38:41 -0400 Subject: [PATCH 001/121] Start using java.time classes Breaking changes --- .../java/com/kosherjava/zmanim/util/Zman.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/Zman.java b/src/main/java/com/kosherjava/zmanim/util/Zman.java index ff7e622e..8e486f78 100644 --- a/src/main/java/com/kosherjava/zmanim/util/Zman.java +++ b/src/main/java/com/kosherjava/zmanim/util/Zman.java @@ -15,9 +15,9 @@ */ package com.kosherjava.zmanim.util; -import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.format.DateTimeFormatter; import java.util.Comparator; -import java.util.Date; /** * A wrapper class for astronomical times / zmanim that is mostly intended to allow sorting collections of astronomical times. @@ -36,7 +36,7 @@ * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); * ComprehensiveZmanimCalendar czc = new ComprehensiveZmanimCalendar(location); - * Zman sunset = new Zman(czc.getSunset(), "Sunset"); + * Zman sunset = new Zman(czc.getSunset(), "Sunset"); * Zman shaah16 = new Zman(czc.getShaahZmanis16Point1Degrees(), "Shaah zmanis 16.1"); * Zman sunrise = new Zman(czc.getSunrise(), "Sunrise"); * Zman shaah = new Zman(czc.getShaahZmanisGra(), "Shaah zmanis GRA"); @@ -67,9 +67,9 @@ public class Zman { private String label; /** - * The {@link Date} of the zman + * The {@link Instant} of the zman */ - private Date zman; + private Instant zman; /** * The duration if the zman is a {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} (or the various @@ -87,27 +87,27 @@ public class Zman { * The location information of the zman. */ private GeoLocation geoLocation; - + /** - * The constructor setting a {@link Date} based zman and a label. In most cases you will likely want to call - * {@link #Zman(Date, GeoLocation, String)} that also sets the location. - * @param date the Date of the zman. - * @param label the label of the zman such as "Sof Zman Krias Shema GRA". - * @see #Zman(Date, GeoLocation, String) + * The constructor setting a {@link Instant} based zman and a label. In most cases you will likely want to call + * {@link #Zman(Instant, GeoLocation, String)} that also sets the location. + * @param instant the Instant of the zman. + * @param label the label of the zman such as "Sof Zman Krias Shema GRA". + * @see #Zman(Instant, GeoLocation, String) */ - public Zman(Date date, String label) { - this(date, null, label); + public Zman(Instant instant, String label) { + this(instant, null, label); } /** - * The constructor setting a {@link Date} based zman and a label. In most cases you will likely want to call - * {@link #Zman(Date, GeoLocation, String)} that also sets the geo location. - * @param date the Date of the zman. + * The constructor setting a {@link Instant} based zman and a label. In most cases you will likely want to call + * {@link #Zman(Instant, GeoLocation, String)} that also sets the geo location. + * @param instant the Instant of the zman. * @param geoLocation the {@link GeoLocation} of the zman. * @param label the label of the zman such as "Sof Zman Krias Shema GRA". */ - public Zman(Date date, GeoLocation geoLocation, String label) { - this.zman = date; + public Zman(Instant instant, GeoLocation geoLocation, String label) { + this.zman = instant; this.geoLocation = geoLocation; this.label = label; } @@ -119,7 +119,7 @@ public Zman(Date date, GeoLocation geoLocation, String label) { * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label. * @param duration a duration based zman such as ({@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour()} * @param label the label of the zman such as "Shaah Zmanis GRA". - * @see #Zman(Date, String) + * @see #Zman(Instant, String) */ public Zman(long duration, String label) { this.label = label; @@ -127,21 +127,21 @@ public Zman(long duration, String label) { } /** - * Returns the {@code Date} based zman. - * @return the zman. - * @see #setZman(Date) + * Returns the {@code Instant} based zman. + * @return the Instant of the zman. + * @see #setZman(Instant) */ - public Date getZman() { + public Instant getZman() { return this.zman; } /** - * Sets a {@code Date} based zman. - * @param date a {@code Date} based zman + * Sets a {@code Instant} based zman. + * @param instant an {@code Instant} based zman * @see #getZman() */ - public void setZman(Date date) { - this.zman = date; + public void setZman(Instant instant) { + this.zman = instant; } /** @@ -229,8 +229,8 @@ public void setDescription(String description) { */ public static final Comparator DATE_ORDER = new Comparator() { public int compare(Zman zman1, Zman zman2) { - long firstTime = (zman1 == null || zman1.getZman() == null) ? Long.MAX_VALUE : zman1.getZman().getTime(); - long secondTime = (zman2 == null || zman2.getZman() == null) ? Long.MAX_VALUE : zman2.getZman().getTime(); + long firstTime = (zman1 == null || zman1.getZman() == null) ? Long.MAX_VALUE : zman1.getZman().toEpochMilli(); + long secondTime = (zman2 == null || zman2.getZman() == null) ? Long.MAX_VALUE : zman2.getZman().toEpochMilli(); return Long.valueOf(firstTime).compareTo(Long.valueOf(secondTime)); } }; @@ -288,7 +288,7 @@ public int compare(Zman zman1, Zman zman2) { * @return The XML formatted String. */ public String toXML() { - SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS"); StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append("\t\n"); From 63113fc396c58f3d76646c3bb5927907556614ad Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:40:20 -0400 Subject: [PATCH 002/121] Start using java.time classes Breaking changes --- .../zmanim/util/ZmanimFormatter.java | 197 ++++++++---------- 1 file changed, 89 insertions(+), 108 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index 644f0c15..e93e7a45 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -16,15 +16,16 @@ package com.kosherjava.zmanim.util; import java.lang.reflect.Method; -import java.text.DateFormat; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; -import java.util.Calendar; import java.util.List; -import java.util.TimeZone; -import java.text.SimpleDateFormat; +import java.util.Locale; +import java.time.Instant; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.TextStyle; import com.kosherjava.zmanim.AstronomicalCalendar; /** @@ -70,32 +71,32 @@ public class ZmanimFormatter { /** * The SimpleDateFormat class. - * @see #setDateFormat(SimpleDateFormat) + * @see #setDateTimeFormatter(DateTimeFormatter) */ - private SimpleDateFormat dateFormat; - + private DateTimeFormatter dateTimeFormatter; + /** * The TimeZone class. - * @see #setTimeZone(TimeZone) + * @see #setZoneId(ZoneId) */ - private TimeZone timeZone = null; + private ZoneId zoneId = null; /** - * Method to return the TimeZone. - * @return the timeZone + * Method to return the ZoneId. + * @return the ZoneId */ - public TimeZone getTimeZone() { - return timeZone; + public ZoneId getZoneId() { + return zoneId; } /** * Method to set the TimeZone. - * @param timeZone - * the timeZone to set + * @param zoneId + * the ZoneId to set */ - public void setTimeZone(TimeZone timeZone) { - this.timeZone = timeZone; + public void setZoneId(ZoneId zoneId) { + this.zoneId = zoneId; } /** @@ -138,10 +139,10 @@ public void setTimeZone(TimeZone timeZone) { /** * Constructor that defaults to this will use the format "h:mm:ss" for dates and 00.00.00.0 for {@link Time}. - * @param timeZone the TimeZone Object + * @param zoneId the ZoneId Object */ - public ZmanimFormatter(TimeZone timeZone) { - this(0, new SimpleDateFormat("h:mm:ss"), timeZone); + public ZmanimFormatter(ZoneId zoneId) { + this(0, DateTimeFormatter.ofPattern("h:mm:ss"), zoneId); } /** @@ -150,19 +151,18 @@ public ZmanimFormatter(TimeZone timeZone) { * @param format * int The formatting style to use. Using ZmanimFormatter.SEXAGESIMAL_SECONDS_FORMAT will format the * time of 90*60*1000 + 1 as 1:30:00 - * @param dateFormat the SimpleDateFormat Object - * @param timeZone the TimeZone Object + * @param dateTimeFormatter the DateTimeFormatter Object + * @param zoneId the ZoneId Object */ - public ZmanimFormatter(int format, SimpleDateFormat dateFormat, TimeZone timeZone) { - setTimeZone(timeZone); + public ZmanimFormatter(int format, DateTimeFormatter dateTimeFormatter, ZoneId zoneId) { + setZoneId(zoneId); String hourFormat = "0"; if (prependZeroHours) { hourFormat = "00"; } this.hourNF = new DecimalFormat(hourFormat); setTimeFormat(format); - dateFormat.setTimeZone(timeZone); - setDateFormat(dateFormat); + setDateTimeFormatter(dateTimeFormatter.withZone(zoneId)); } /** @@ -193,18 +193,18 @@ public void setTimeFormat(int format) { /** * Sets the SimpleDateFormat Object - * @param simpleDateFormat the SimpleDateFormat Object to set + * @param dateTimeFormatter the DateTimeFormatter Object to set */ - public void setDateFormat(SimpleDateFormat simpleDateFormat) { - this.dateFormat = simpleDateFormat; + public void setDateTimeFormatter(DateTimeFormatter dateTimeFormatter) { + this.dateTimeFormatter = dateTimeFormatter; } /** - * returns the SimpleDateFormat Object - * @return the SimpleDateFormat Object + * returns the DateTimeFormatter Object. + * @return the DateTimeFormatter Object. */ - public SimpleDateFormat getDateFormat() { - return this.dateFormat; + public DateTimeFormatter getDateTimeFormatter() { + return this.dateTimeFormatter; } /** @@ -268,54 +268,36 @@ public String format(Time time) { } /** - * Formats a date using this class's {@link #getDateFormat() date format}. + * Formats an Instant using this class's {@link #getDateTimeFormatter()}. * - * @param dateTime - * the date to format - * @param calendar - * the {@link java.util.Calendar Calendar} used to help format based on the Calendar's DST and other + * @param instant + * the Instant to format + * @param zonedDateTime + * the {@link java.time.ZonedDateTime ZonedDateTime} used to help format based on the ZonedDateTime DST and other * settings. * @return the formatted String */ - public String formatDateTime(Date dateTime, Calendar calendar) { - this.dateFormat.setCalendar(calendar); - if (this.dateFormat.toPattern().equals("yyyy-MM-dd'T'HH:mm:ss")) { - return getXSDateTime(dateTime); - } else { - return this.dateFormat.format(dateTime); - } - - } - - /** - * The date:date-time function returns the current date and time as a date/time string. The date/time string that's - * returned must be a string in the format defined as the lexical representation of xs:dateTime in [3.3.8 dateTime] of [XML Schema 1.1 Part 2: Datatypes]. The date/time format is - * basically CCYY-MM-DDThh:mm:ss, although implementers should consult [XML Schema 1.1 Part 2: Datatypes] and [ISO 8601] for details. The date/time string format must include a - * time zone, either a Z to indicate Coordinated Universal Time or a + or - followed by the difference between the - * difference from UTC represented as hh:mm. - * @param date Date Object - * @param calendar Calendar Object that is now ignored. - * @return the XSD dateTime - * @deprecated This method will be removed in v3.0 - */ - @Deprecated // (since="2.5", forRemoval=true)// add back once Java 9 is the minimum supported version - public String getXSDateTime(Date date, Calendar calendar) { - return getXSDateTime(date); + public String formatDateTime(Instant instant, ZonedDateTime zonedDateTime) { + ZonedDateTime dateTime = instant.atZone(zonedDateTime.getZone()); + + if (this.dateTimeFormatter.toString().equals("yyyy-MM-dd'T'HH:mm:ss")) { + return getXSDateTime(instant); + } else { + return this.dateTimeFormatter.format(dateTime); + } } /** - * Format the Date using the format "yyyy-MM-dd'T'HH:mm:ssXXX" - * @param date the Date to format. - * @return the Date formatted using the format "yyyy-MM-dd'T'HH:mm:ssXXX + * Format the Instant using the format "yyyy-MM-dd'T'HH:mm:ssXXX". + * @param instant the Instant to format. + * @return the Instant formatted using the format "yyyy-MM-dd'T'HH:mm:ssXXX */ - public String getXSDateTime(Date date) { - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); - dateFormat.setTimeZone(getTimeZone()); - return new StringBuilder(dateFormat.format(date)).toString(); + public String getXSDateTime(Instant instant) { + DateTimeFormatter formatter = + DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") + .withZone(getZoneId()); + + return formatter.format(instant); } /** @@ -393,14 +375,13 @@ public String formatXSDDurationTime(Time time) { * @todo Add proper schema, and support for nulls. XSD duration (for solar hours), should probably return nil and not P. */ public static String toXML(AstronomicalCalendar astronomicalCalendar) { - ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, new SimpleDateFormat( - "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getTimeZone()); - DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - df.setTimeZone(astronomicalCalendar.getGeoLocation().getTimeZone()); + ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, DateTimeFormatter.ofPattern( + "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getZoneId()); + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + df = df.withZone(astronomicalCalendar.getGeoLocation().getZoneId()); - Date date = astronomicalCalendar.getCalendar().getTime(); - TimeZone tz = astronomicalCalendar.getGeoLocation().getTimeZone(); - boolean daylight = tz.useDaylightTime() && tz.inDaylightTime(date); + Instant instant = astronomicalCalendar.getZonedDateTime().toInstant(); + ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); StringBuilder sb = new StringBuilder("<"); if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar")) { @@ -419,19 +400,18 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { // output += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; // output += xsi:schemaLocation="http://www.kosherjava.com/zmanim basicZmanim.xsd" } - sb.append(" date=\"").append(df.format(date)).append("\""); + sb.append(" date=\"").append(df.format(instant)).append("\""); sb.append(" type=\"").append(astronomicalCalendar.getClass().getName()).append("\""); sb.append(" algorithm=\"").append(astronomicalCalendar.getAstronomicalCalculator().getCalculatorName()).append("\""); sb.append(" location=\"").append(astronomicalCalendar.getGeoLocation().getLocationName()).append("\""); sb.append(" latitude=\"").append(astronomicalCalendar.getGeoLocation().getLatitude()).append("\""); sb.append(" longitude=\"").append(astronomicalCalendar.getGeoLocation().getLongitude()).append("\""); sb.append(" elevation=\"").append(astronomicalCalendar.getGeoLocation().getElevation()).append("\""); - sb.append(" timeZoneName=\"").append(tz.getDisplayName(daylight, TimeZone.LONG)).append("\""); - sb.append(" timeZoneID=\"").append(tz.getID()).append("\""); - sb.append(" timeZoneOffset=\"") - .append((tz.getOffset(astronomicalCalendar.getCalendar().getTimeInMillis()) / ((double) HOUR_MILLIS))) - .append("\""); - // sb.append(" useElevationAllZmanim=\"").append(astronomicalCalendar.useElevationAllZmanim).append("\""); //TODO likely using reflection + sb.append(" timeZoneName=\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\""); + sb.append(" timeZoneID=\"").append(zi.getId()).append("\""); + double offsetHours = astronomicalCalendar.getZonedDateTime().getOffset().getTotalSeconds() / 3600.0; + sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); + //sb.append(" useElevationAllZmanim=\"").append(astronomicalCalendar.useElevationAllZmanim()).append("\""); //TODO likely using reflection sb.append(">\n"); @@ -451,8 +431,8 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { otherList.add("<" + tagName + ">N/A"); // TODO: instead of N/A, consider return proper xs:nil. // otherList.add("<" + tagName + " xs:nil=\"true\" />"); - } else if (value instanceof Date) { - dateList.add(new Zman((Date) value, tagName)); + } else if (value instanceof Instant) { + dateList.add(new Zman((Instant) value, tagName)); } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis if (((Long) value).longValue() == Long.MIN_VALUE) { otherList.add("<" + tagName + ">N/A"); @@ -475,7 +455,7 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = (Zman) dateList.get(i); sb.append("\t<").append(zman.getLabel()).append(">"); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getCalendar())); + sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getZonedDateTime())); sb.append("\n"); } Collections.sort(durationList, Zman.DURATION_ORDER); @@ -554,29 +534,30 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { * */ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { - ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, new SimpleDateFormat( - "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getTimeZone()); - DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - df.setTimeZone(astronomicalCalendar.getGeoLocation().getTimeZone()); + ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, DateTimeFormatter.ofPattern( + "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getZoneId()); + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd") + .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); - Date date = astronomicalCalendar.getCalendar().getTime(); - TimeZone tz = astronomicalCalendar.getGeoLocation().getTimeZone(); - boolean daylight = tz.useDaylightTime() && tz.inDaylightTime(date); + Instant instant = astronomicalCalendar.getZonedDateTime().toInstant(); + ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); StringBuilder sb = new StringBuilder("{\n\"metadata\":{\n"); - sb.append("\t\"date\":\"").append(df.format(date)).append("\",\n"); + sb.append("\t\"date\":\"").append(df.format(instant)).append("\",\n"); sb.append("\t\"type\":\"").append(astronomicalCalendar.getClass().getName()).append("\",\n"); sb.append("\t\"algorithm\":\"").append(astronomicalCalendar.getAstronomicalCalculator().getCalculatorName()).append("\",\n"); sb.append("\t\"location\":\"").append(astronomicalCalendar.getGeoLocation().getLocationName()).append("\",\n"); sb.append("\t\"latitude\":\"").append(astronomicalCalendar.getGeoLocation().getLatitude()).append("\",\n"); sb.append("\t\"longitude\":\"").append(astronomicalCalendar.getGeoLocation().getLongitude()).append("\",\n"); sb.append("\t\"elevation\":\"").append(astronomicalCalendar.getGeoLocation().getElevation()).append("\",\n"); - sb.append("\t\"timeZoneName\":\"").append(tz.getDisplayName(daylight, TimeZone.LONG)).append("\",\n"); - sb.append("\t\"timeZoneID\":\"").append(tz.getID()).append("\",\n"); - sb.append("\t\"timeZoneOffset\":\"") - .append((tz.getOffset(astronomicalCalendar.getCalendar().getTimeInMillis()) / ((double) HOUR_MILLIS))) - .append("\""); - + + + sb.append("\t\"timeZoneName\":\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\",\n"); + sb.append("\t\"timeZoneID\":\"").append(zi.getId()).append("\",\n"); //FIXME + + + double offsetHours = astronomicalCalendar.getZonedDateTime().getOffset().getTotalSeconds() / 3600.0; + sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); sb.append("},\n\""); if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar")) { @@ -601,8 +582,8 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { value = theMethods[i].invoke(astronomicalCalendar, (Object[]) null); if (value == null) {// TODO: Consider using reflection to determine the return type, not the value otherList.add("\"" + tagName + "\":\"N/A\","); - } else if (value instanceof Date) { - dateList.add(new Zman((Date) value, tagName)); + } else if (value instanceof Instant) { + dateList.add(new Zman((Instant) value, tagName)); } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis if (((Long) value).longValue() == Long.MIN_VALUE) { otherList.add("\"" + tagName + "\":\"N/A\""); @@ -622,7 +603,7 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = (Zman) dateList.get(i); sb.append("\t\"").append(zman.getLabel()).append("\":\""); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getCalendar())); + sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getZonedDateTime())); sb.append("\",\n"); } Collections.sort(durationList, Zman.DURATION_ORDER); From c65673567803ba50f3103a57c7d44b50bd6cfaac Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:41:57 -0400 Subject: [PATCH 003/121] Remove references to a removed class --- .../java/com/kosherjava/zmanim/util/package-info.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/package-info.java b/src/main/java/com/kosherjava/zmanim/util/package-info.java index e3fd6c4d..42159bee 100644 --- a/src/main/java/com/kosherjava/zmanim/util/package-info.java +++ b/src/main/java/com/kosherjava/zmanim/util/package-info.java @@ -1,8 +1,8 @@ /** - * Utility classes for the Zmanim API including classes to calculate sun based times, {@link com.kosherjava.zmanim.util.GeoLocation location information}, - * some {@link com.kosherjava.zmanim.util.ZmanimFormatter formatting} and {@link com.kosherjava.zmanim.util.GeoLocationUtils geographic location utilities}. Included in this package - * are implementations for both the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO} and {@link com.kosherjava.zmanim.util.NOAACalculator NOAA / Jean Meeus} algorithms. + * Utility classes for the Zmanim API including classes to calculate sun based times, {@link GeoLocation location information}, + * some {@link ZmanimFormatter formatting}. Included in this package + * are implementations for both the {@link SunTimesCalculator USNO} and {@link NOAACalculator NOAA / Jean Meeus} algorithms. * - * @author © Eliyahu Hershfeld 2004 - 2022 + * @author © Eliyahu Hershfeld 2004 - 2026 */ package com.kosherjava.zmanim.util; From 4bef262bc595589c5f75b4d6bc5cba9b2b28eb12 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:43:12 -0400 Subject: [PATCH 004/121] Start using java.time classes Breaking changes --- .../zmanim/util/AstronomicalCalculator.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index b4d5fdf4..9bcda8d8 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -15,7 +15,7 @@ */ package com.kosherjava.zmanim.util; -import java.util.Calendar; +import java.time.ZonedDateTime; /** * An abstract class that all sun time calculating classes extend. This allows the algorithm used to be changed at @@ -23,7 +23,7 @@ * @todo Consider methods that would allow atmospheric modeling. This can currently be adjusted by {@link * #setRefraction(double) setting the refraction}. * - * @author © Eliyahu Hershfeld 2004 - 2025 + * @author © Eliyahu Hershfeld 2004 - 2026 */ public abstract class AstronomicalCalculator implements Cloneable { /** @@ -104,7 +104,7 @@ public static AstronomicalCalculator getDefault() { * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract * method is implemented by the classes that extend this class. * - * @param calendar + * @param zonedDateTime * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. @@ -121,14 +121,14 @@ public static AstronomicalCalculator getDefault() { * {@link java.lang.Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ - public abstract double getUTCSunrise(Calendar calendar, GeoLocation geoLocation, double zenith, + public abstract double getUTCSunrise(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, boolean adjustForElevation); /** * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract * method is implemented by the classes that extend this class. * - * @param calendar + * @param zonedDateTime * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. @@ -145,7 +145,7 @@ public abstract double getUTCSunrise(Calendar calendar, GeoLocation geoLocation, * {@link java.lang.Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ - public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, double zenith, + public abstract double getUTCSunset(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, boolean adjustForElevation); @@ -155,14 +155,14 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating * the time as halfway between sunrise and sunset. * - * @param calendar + * @param zonedDateTime * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. * * @return the time in minutes from zero UTC */ - public abstract double getUTCNoon(Calendar calendar, GeoLocation geoLocation); + public abstract double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation); /** @@ -171,21 +171,21 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, * true solar midnight, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating * the time as 12 hours after halfway between sunrise and sunset. * - * @param calendar + * @param zonedDateTime * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. * * @return the time in minutes from zero UTC */ - public abstract double getUTCMidnight(Calendar calendar, GeoLocation geoLocation); + public abstract double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation); /** * Return the Solar Elevation for the * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the * horizon. Not corrected for altitude. * - * @param calendar + * @param zonedDateTime * time of calculation * @param geoLocation * The location information @@ -193,14 +193,14 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, * is 090°, civil twilight is -690° etc. This means that sunrise and sunset that do use * refraction and are calculated from the upper limb of the sun will return about 0.83390°. */ - public abstract double getSolarElevation(Calendar calendar, GeoLocation geoLocation); + public abstract double getSolarElevation(ZonedDateTime zonedDateTime, GeoLocation geoLocation); /** * Return the Solar Azimuth for the * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 180 * degrees. * - * @param calendar + * @param zonedDateTime * time of calculation * @param geoLocation * The location information @@ -208,7 +208,7 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, * southern hemosphere. Depending on the location and time of year, sunrise will have an azimuth of about * 90° and sunset about 270°. */ - public abstract double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation); + public abstract double getSolarAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation); /** * Method to return the adjustment to the zenith required to account for the elevation. Since a person at a higher @@ -258,7 +258,7 @@ public abstract double getUTCSunset(Calendar calendar, GeoLocation geoLocation, * below the zenith}. This is traditionally calculated with none of the above mentioned adjustments. The same goes * for various tzais and alos times such as the * {@link com.kosherjava.zmanim.ZmanimCalendar#ZENITH_16_POINT_1 16.1°} dip used in - * {@link com.kosherjava.zmanim.ComplexZmanimCalendar#getAlos16Point1Degrees()}. + * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getAlos16Point1Degrees()}. * * @param zenith * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith From f18e6b39172159f9dcae79d03dc6b3345128e6e5 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:44:34 -0400 Subject: [PATCH 005/121] Start using java.time classes Breaking changes --- .../kosherjava/zmanim/util/GeoLocation.java | 164 ++++++++++++------ 1 file changed, 111 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java index b2888a33..976dac76 100644 --- a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java +++ b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -15,8 +15,12 @@ */ package com.kosherjava.zmanim.util; +import java.util.Locale; import java.util.Objects; -import java.util.TimeZone; +import java.time.Instant; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.TextStyle; /** * A class that contains location information such as latitude and longitude required for astronomical calculations. The @@ -24,7 +28,7 @@ * specific implementations of the {@link AstronomicalCalculator} to see if elevation is calculated as part of the * algorithm. * - * @author © Eliyahu Hershfeld 2004 - 2025 + * @author © Eliyahu Hershfeld 2004 - 2026 */ public class GeoLocation implements Cloneable { /** @@ -51,11 +55,11 @@ public class GeoLocation implements Cloneable { private String locationName; /** - * The location's time zone. - * @see #getTimeZone() - * @see #setTimeZone(TimeZone) + * The location's zoneId + * @see #getZoneId() + * @see #setZoneId(ZoneId) */ - private TimeZone timeZone; + private ZoneId zoneId; /** * The elevation in Meters above sea level. @@ -127,11 +131,11 @@ public void setElevation(double elevation) { * the longitude as a double, for example -74.222 for Lakewood, NJ. Note: For longitudes * east of the Prime Meridian (Greenwich), * a negative value should be used. - * @param timeZone - * the TimeZone for the location. + * @param zoneId + * the ZoneId for the location. */ - public GeoLocation(String name, double latitude, double longitude, TimeZone timeZone) { - this(name, latitude, longitude, 0, timeZone); + public GeoLocation(String name, double latitude, double longitude, ZoneId zoneId) { + this(name, latitude, longitude, 0, zoneId); } /** @@ -148,27 +152,27 @@ public GeoLocation(String name, double latitude, double longitude, TimeZone time * Meridian (Greenwich), a negative value should be used. * @param elevation * the elevation above sea level in Meters. - * @param timeZone - * the TimeZone for the location. + * @param zoneId + * the ZoneId for the location. */ - public GeoLocation(String name, double latitude, double longitude, double elevation, TimeZone timeZone) { + public GeoLocation(String name, double latitude, double longitude, double elevation, ZoneId zoneId) { setLocationName(name); setLatitude(latitude); setLongitude(longitude); setElevation(elevation); - setTimeZone(timeZone); + this.setZoneId(zoneId); } /** - * Default GeoLocation constructor will set location to the Prime Meridian at Greenwich, England and a TimeZone of - * GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the ZoneId + * of GMT. The longitude will be set to 0 and the latitude will be 51.4772 to match the location of the Royal Observatory, Greenwich. No daylight savings time will be used. */ public GeoLocation() { setLocationName("Greenwich, England"); setLongitude(0); // added for clarity setLatitude(51.4772); - setTimeZone(TimeZone.getTimeZone("GMT")); + setZoneId(ZoneId.of("GMT")); } /** @@ -296,28 +300,27 @@ public String getLocationName() { public void setLocationName(String name) { this.locationName = name; } - + /** - * Method to return the time zone. - * @return Returns the timeZone. + * Method to return the ZoneId. + * @return Returns the zoneId. */ - public TimeZone getTimeZone() { - return timeZone; + public ZoneId getZoneId() { + return zoneId; } - + /** - * Method to set the TimeZone. If this is ever set after the GeoLocation is set in the + * Method to set the zoneId. If this is ever set after the GeoLocation is set in the * {@link com.kosherjava.zmanim.AstronomicalCalendar}, it is critical that - * {@link com.kosherjava.zmanim.AstronomicalCalendar#getCalendar()}. - * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the + * {@link java.time.ZonedDateTime #setZoneId(ZoneId) setZoneId(ZoneId)} be called in order for the * AstronomicalCalendar to output times in the expected offset. This situation will arise if the * AstronomicalCalendar is ever {@link com.kosherjava.zmanim.AstronomicalCalendar#clone() cloned}. * - * @param timeZone - * The timeZone to set. + * @param zoneId + * The zoneId to set. */ - public void setTimeZone(TimeZone timeZone) { - this.timeZone = timeZone; + public void setZoneId(ZoneId zoneId) { + this.zoneId = zoneId; } /** @@ -332,12 +335,15 @@ public void setTimeZone(TimeZone timeZone) { * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is * unaware of dates. - * + * @param instant + * the Instant used to claculate the local mean offset for the date in question. * @return the offset in milliseconds not accounting for Daylight saving time. A positive value will be returned * East of the 15° timezone line, and a negative value West of it. */ - public long getLocalMeanTimeOffset() { - return (long) (getLongitude() * 4 * MINUTE_MILLIS - getTimeZone().getRawOffset()); + public long getLocalMeanTimeOffset(Instant instant) { + ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId); + long timezoneOffsetMillis = zonedDateTime.getOffset().getTotalSeconds() * 1000; + return (long) (getLongitude() * 4 * MINUTE_MILLIS - timezoneOffsetMillis); } /** @@ -354,11 +360,13 @@ public long getLocalMeanTimeOffset() { * 2018-02-03, the calculator should operate using 2018-02-02 since the expected zone is -11. After determining the * UTC time, the local DST offset of UTC+14:00 should be applied * to bring the date back to 2018-02-03. + * @param instant + * the Instant required for the local mean time offset calculation * * @return the number of days to adjust the date This will typically be 0 unless the date crosses the antimeridian */ - public int getAntimeridianAdjustment() { - double localHoursOffset = getLocalMeanTimeOffset() / (double)HOUR_MILLIS; + public int getAntimeridianAdjustment(Instant instant) { + double localHoursOffset = getLocalMeanTimeOffset(instant) / (double)HOUR_MILLIS; if (localHoursOffset >= 20){// if the offset is 20 hours or more in the future (never expected anywhere other // than a location using a timezone across the antimeridian to the east such as Samoa) @@ -415,6 +423,61 @@ public double getGeodesicFinalBearing(GeoLocation location) { public double getGeodesicDistance(GeoLocation location) { return vincentyInverseFormula(location, DISTANCE); } + + /** + * Calculate the destination point based on an initial bearing and distance in meters from the current location using + * Thaddeus Vincenty's direct formula. See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid + * with application of nested equations", Survey Review, vol XXII no 176, 1975. + * + * @param initialBearing the initialBearing + * @param distance the distance in meters. + * @return the GeoLocation containing the destination point. The ZoneId is set to the origin point (current object). + */ + private GeoLocation vincentyDirectFormulaDestination(double initialBearing, double distance) { + double major_semi_axis = 6378137; + double minor_semi_axis = 6356752.3142; + double flattening = 1 / 298.257223563; // WGS-84 ellipsoid + double initial_bearing_radians = Math.toRadians(initialBearing); + double sinAzimuth1 = Math.sin(initial_bearing_radians); + double cosAzimuth1 = Math.cos(initial_bearing_radians); + double tanU1 = (1 - flattening) * Math.tan(Math.toRadians(getLatitude())); + double cosU1 = 1 / Math.sqrt((1 + tanU1*tanU1)); + double sinU1 = tanU1 * cosU1; + double eq_p1_ang_dist = Math.atan2(tanU1, cosAzimuth1); // eq_p1_ang_dist = angular distance on the sphere from the equator to P1 + double sinAzimuth = cosU1 * sinAzimuth1; //azimuth of the geodesic at the equator + double cosSqAzimuth = 1 - sinAzimuth*sinAzimuth; + double uSq = cosSqAzimuth * (Math.pow(major_semi_axis, 2) - Math.pow(minor_semi_axis, 2) / Math.pow(minor_semi_axis, 2)); + double a = 1 + uSq/16384*(4096 + uSq *(-768 + uSq *(320 - 175 * uSq))); + double b = uSq / 1024 * (256 + uSq *(-128 + uSq * (74-47 * uSq))); + double p1_p2_ang_dist = distance / (minor_semi_axis * a); //p1_p2_ang_dist = angular distance P1 P2 on the sphere + double sinSigma = Double.NaN; + double cosSigma = Double.NaN; + double cos2_eq_mid_ang_distance = Double.NaN; // # eq_mid_ang_distance = angular distance on the sphere from the equator to the midpoint of the line + double a_prime = Double.NaN; + int iterations = 0; + + do { + cos2_eq_mid_ang_distance = Math.cos(2*eq_p1_ang_dist + p1_p2_ang_dist); + sinSigma = Math.sin(p1_p2_ang_dist); + cosSigma = Math.cos(p1_p2_ang_dist); + double delta_ang_distance = b * sinSigma * (cos2_eq_mid_ang_distance + b / 4 * + (cosSigma * (-1 + 2 * cos2_eq_mid_ang_distance * cos2_eq_mid_ang_distance) - b / 6 * cos2_eq_mid_ang_distance * + (-3+4*sinSigma*sinSigma)*(-3+4*cos2_eq_mid_ang_distance*cos2_eq_mid_ang_distance))); + a_prime = p1_p2_ang_dist; + p1_p2_ang_dist = distance / (minor_semi_axis * a) + delta_ang_distance; + } while (Math.abs(p1_p2_ang_dist-a_prime) > 1e-12 && ++iterations < 100); // iterate until negligible change in lambda (about 0.006mm) + + double x = sinU1 * sinSigma - cosU1 * cosSigma * cosAzimuth1; + double other_latitude = Math.toDegrees(Math.atan2(sinU1 * cosSigma + cosU1 * sinSigma * cosAzimuth1, (1 - flattening) * Math.sqrt(sinAzimuth*sinAzimuth + x * x))); + double lambda = Math.atan2(sinSigma*sinAzimuth1, cosU1*cosSigma - sinU1*sinSigma*cosAzimuth1); + double c = flattening/16*cosSqAzimuth*(4+flattening*(4-3*cosSqAzimuth)); + double l = lambda - (1-c) * flattening * sinAzimuth * + (p1_p2_ang_dist + c * sinSigma * (cos2_eq_mid_ang_distance + c * cosSigma * (-1 + 2 * cos2_eq_mid_ang_distance * cos2_eq_mid_ang_distance))); + double other_longitude = longitude + Math.toDegrees(l); + + return new GeoLocation("Destination", other_latitude, other_longitude, getZoneId()); //ToDo - we can easily return final_bearing, it just needs some minor refactoring + } /** * Calculate geodesic distance in Meters between @@ -570,12 +633,11 @@ public String toXML() { "\t" + getLatitude() + "\n" + "\t" + getLongitude() + "\n" + "\t" + getElevation() + " Meters" + "\n" + - "\t" + getTimeZone().getID() + "\n" + - "\t" + getTimeZone().getDisplayName() + "\n" + - "\t" + getTimeZone().getRawOffset() / HOUR_MILLIS + - "\n" + + "\t" + getZoneId().getId() + "\n" + + "\t" + getZoneId().getDisplayName(TextStyle.FULL, Locale.ENGLISH) + "\n" + + /*"\n" + "\t" + getTimeZone().getDSTSavings() / HOUR_MILLIS + - "\n" + + "\n" +*/ // FIXME ""; } @@ -592,7 +654,7 @@ public boolean equals(Object object) { && Double.doubleToLongBits(this.longitude) == Double.doubleToLongBits(geo.longitude) && this.elevation == geo.elevation && (Objects.equals(this.locationName, geo.locationName)) - && (Objects.equals(this.timeZone, geo.timeZone)); + && (Objects.equals(this.zoneId, geo.zoneId)); } /** @@ -612,7 +674,7 @@ public int hashCode() { result += 37 * result + lonInt; result += 37 * result + elevInt; result += 37 * result + (this.locationName == null ? 0 : this.locationName.hashCode()); - result += 37 * result + (this.timeZone == null ? 0 : this.timeZone.hashCode()); + result += 37 * result + (this.zoneId == null ? 0 : this.zoneId.hashCode()); return result; } @@ -624,20 +686,16 @@ public String toString() { "\nLatitude:\t\t\t" + getLatitude() + "\u00B0" + "\nLongitude:\t\t\t" + getLongitude() + "\u00B0" + "\nElevation:\t\t\t" + getElevation() + " Meters" + - "\nTimezone ID:\t\t\t" + getTimeZone().getID() + - "\nTimezone Display Name:\t\t" + getTimeZone().getDisplayName() + - " (" + getTimeZone().getDisplayName(false, TimeZone.SHORT) + ")" + - "\nTimezone GMT Offset:\t\t" + getTimeZone().getRawOffset() / HOUR_MILLIS + - "\nTimezone DST Offset:\t\t" + getTimeZone().getDSTSavings() / HOUR_MILLIS; + "\nTimezone ID:\t\t\t" + getZoneId().getId() + + "\nTimezone Display Name:\t\t" + getZoneId().getDisplayName(TextStyle.FULL, Locale.ENGLISH);// + + //"\nTimezone DST Offset:\t\t" + getZoneId().getDSTSavings() / HOUR_MILLIS; // FIXME } /** * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object. - * Note: If the {@link java.util.TimeZone} in the clone will be changed from the original, it is critical - * that {@link com.kosherjava.zmanim.AstronomicalCalendar#getCalendar()}. - * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} is called after cloning in order for the - * AstronomicalCalendar to output times in the expected offset. + * Note: If the {@link java.time.ZoneId} in the clone will be changed from the original, it is critical + * that {@link com.kosherjava.zmanim.AstronomicalCalendar#getZonedDateTime()}. * * @see java.lang.Object#clone() */ @@ -649,7 +707,7 @@ public Object clone() { //Required by the compiler. Should never be reached since we implement clone() } if (clone != null) { - clone.timeZone = (TimeZone) getTimeZone().clone(); + clone.zoneId = (ZoneId) getZoneId(); clone.locationName = getLocationName(); } return clone; From bceb48a091240da05bf6a93ec56e41d669c7d7c6 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:47:04 -0400 Subject: [PATCH 006/121] Start using java.time classes Breaking changes --- .../zmanim/util/NOAACalculator.java | 171 +++++++++--------- 1 file changed, 83 insertions(+), 88 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index ec9a0453..ebb3be97 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -15,7 +15,8 @@ */ package com.kosherjava.zmanim.util; -import java.util.Calendar; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; /** * Implementation of sunrise and sunset methods to calculate astronomical times based on the Wikipedia Sunrise Equation article. * - * @author © Eliyahu Hershfeld 2011 - 2025 + * @author © Eliyahu Hershfeld 2011 - 2026 */ public class NOAACalculator extends AstronomicalCalculator { @@ -70,10 +71,10 @@ public String getCalculatorName() { /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) */ - public double getUTCSunrise(Calendar calendar, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunrise(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - double sunrise = getSunRiseSetUTC(calendar, geoLocation.getLatitude(), -geoLocation.getLongitude(), + double sunrise = getSunRiseSetUTC(zdt, geoLocation.getLatitude(), -geoLocation.getLongitude(), adjustedZenith, SolarEvent.SUNRISE); sunrise = sunrise / 60; return sunrise > 0 ? sunrise % 24 : sunrise % 24 + 24; // ensure that the time is >= 0 and < 24 @@ -82,10 +83,10 @@ public double getUTCSunrise(Calendar calendar, GeoLocation geoLocation, double z /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) */ - public double getUTCSunset(Calendar calendar, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunset(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - double sunset = getSunRiseSetUTC(calendar, geoLocation.getLatitude(), -geoLocation.getLongitude(), + double sunset = getSunRiseSetUTC(zdt, geoLocation.getLatitude(), -geoLocation.getLongitude(), adjustedZenith, SolarEvent.SUNSET); sunset = sunset / 60; return sunset > 0 ? sunset % 24 : sunset % 24 + 24; // ensure that the time is >= 0 and < 24 @@ -94,22 +95,25 @@ public double getUTCSunset(Calendar calendar, GeoLocation geoLocation, double ze /** * Return the Julian day from a Java Calendar. * - * @param calendar - * The Java Calendar + * @param zonedDateTime + * The ZonedDateTime * @return the Julian day corresponding to the date Note: Number is returned for the start of the Julian * day. Fractional days / time should be added later. */ - private static double getJulianDay(Calendar calendar) { - int year = calendar.get(Calendar.YEAR); - int month = calendar.get(Calendar.MONTH) + 1; - int day = calendar.get(Calendar.DAY_OF_MONTH); - if (month <= 2) { - year -= 1; - month += 12; - } - int a = year / 100; - int b = 2 - a + a / 4; - return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5; + private static double getJulianDay(ZonedDateTime zonedDateTime) { + int year = zonedDateTime.getYear(); + int month = zonedDateTime.getMonthValue(); + int day = zonedDateTime.getDayOfMonth(); + + if (month <= 2) { + year -= 1; + month += 12; + } + + int a = year / 100; + int b = 2 - a + a / 4; + + return Math.floor(365.25 * (year + 4716)) + Math.floor(30.6001 * (month + 1)) + day + b - 1524.5; } /** @@ -309,16 +313,16 @@ private static double getSunHourAngle(double latitude, double solarDeclination, /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) */ - public double getSolarElevation(Calendar calendar, GeoLocation geoLocation) { - return getSolarElevationAzimuth(calendar, geoLocation, false); + public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) { + return getSolarElevationAzimuth(zdt, geoLocation, false); } /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(Calendar, GeoLocation) */ - public double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation) { - return getSolarElevationAzimuth(calendar, geoLocation, true); + public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { + return getSolarElevationAzimuth(zdt, geoLocation, true); } /** @@ -327,7 +331,7 @@ public double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation) { * and time. Can be negative if the sun is below the horizon. Elevation is based on sea-level and is not * adjusted for altitude. * - * @param calendar + * @param zonedDateTime * time of calculation * @param geoLocation * The location for calculating the elevation or azimuth. @@ -338,59 +342,50 @@ public double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation) { * @see #getSolarElevation(Calendar, GeoLocation) * @see #getSolarAzimuth(Calendar, GeoLocation) */ - private double getSolarElevationAzimuth(Calendar calendar, GeoLocation geoLocation, boolean isAzimuth) { - double latitude = geoLocation.getLatitude(); - double longitude = geoLocation.getLongitude(); - - Calendar cloned = (Calendar) calendar.clone(); - int offset = - adjustHourForTimeZone(cloned); - cloned.add(Calendar.MILLISECOND, offset); - int minute = cloned.get(Calendar.MINUTE); - int second = cloned.get(Calendar.SECOND); - int hour = cloned.get(Calendar.HOUR_OF_DAY); - int milli = cloned.get(Calendar.MILLISECOND); - - double time = (hour + (minute + (second + (milli / 1000.0)) / 60.0) / 60.0 ) / 24.0; - double julianDay = getJulianDay(cloned) + time; - double julianCenturies = getJulianCenturiesFromJulianDay(julianDay); - double eot = getEquationOfTime(julianCenturies); - double theta = getSunDeclination(julianCenturies); - - double adjustment = time + eot / 1440; - double trueSolarTime = ((adjustment + longitude / 360) + 2) % 1; // adding 2 to ensure that it never ends up negative - double hourAngelRad = trueSolarTime * Math.PI * 2 - Math.PI; - double cosZenith = Math.sin(Math.toRadians(latitude)) * Math.sin(Math.toRadians(theta)) - + Math.cos(Math.toRadians(latitude)) * Math.cos(Math.toRadians(theta)) * Math.cos(hourAngelRad); - double zenith = Math.toDegrees(Math.acos(cosZenith > 1 ? 1 : cosZenith < -1 ? -1 : cosZenith)); - double azDenom = Math.cos(Math.toRadians(latitude)) * Math.sin(Math.toRadians(zenith)); - double refractionAdjustment = 0; - double elevation = 90.0 - (zenith - refractionAdjustment); - double azimuth = 0; - double azRad = (Math.sin(Math.toRadians(latitude)) * Math.cos(Math.toRadians(zenith)) - - Math.sin(Math.toRadians(theta))) / azDenom; - if(Math.abs(azDenom) > 0.001) { - azimuth = 180 - Math.toDegrees(Math.acos(azRad > 1 ? 1 : azRad < -1? -1 : azRad)) * (hourAngelRad > 0 ? -1 : 1) ; - } else { - azimuth = latitude > 0 ? 180 : 0; - } - return isAzimuth ? azimuth % 360 : elevation; + private double getSolarElevationAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation, boolean isAzimuth) { + + double lat = Math.toRadians(geoLocation.getLatitude()); + double lon = geoLocation.getLongitude(); + + ZonedDateTime utc = zonedDateTime.withZoneSameInstant(ZoneOffset.UTC); + + double fractionalDay = + (utc.getHour() + + (utc.getMinute() + + (utc.getSecond() + utc.getNano() / 1_000_000_000.0) / 60.0) / 60.0) / 24.0; + + double jd = getJulianDay(utc) + fractionalDay; + double jc = getJulianCenturiesFromJulianDay(jd); + + double decl = Math.toRadians(getSunDeclination(jc)); + double eot = getEquationOfTime(jc); + + double trueSolarTime = ((fractionalDay + eot / 1440.0 + lon / 360.0) + 2) % 1; + double hourAngle = trueSolarTime * 2 * Math.PI - Math.PI; + + double cosZenith = + Math.sin(lat) * Math.sin(decl) + + Math.cos(lat) * Math.cos(decl) * Math.cos(hourAngle); + + double zenith = Math.acos(Math.max(-1, Math.min(1, cosZenith))); + double elevation = 90 - Math.toDegrees(zenith); + + double azimuth; + double azDenom = Math.cos(lat) * Math.sin(zenith); + + if (Math.abs(azDenom) > 0.001) { + double az = + (Math.sin(lat) * Math.cos(zenith) - Math.sin(decl)) / azDenom; + + azimuth = 180 - Math.toDegrees(Math.acos(Math.max(-1, Math.min(1, az)))) + * (hourAngle > 0 ? -1 : 1); + } else { + azimuth = geoLocation.getLatitude() > 0 ? 180 : 0; + } + + return isAzimuth ? (azimuth + 360) % 360 : elevation; } - /** - * Returns the hour of day adjusted for the timezone and DST. This is needed for the azimuth and elevation - * calculations. - * @param calendar the Calendar to extract the hour from. This must have the timezone set to the proper timezone. - * @return the adjusted hour corrected for timezone and DST offset. - */ - private int adjustHourForTimeZone(Calendar calendar) { - int offset = calendar.getTimeZone().getRawOffset(); - int dstOffset = calendar.getTimeZone().getDSTSavings(); - if(calendar.getTimeZone().inDaylightTime(calendar.getTime())) { - offset = offset + dstOffset; - } - return offset; - } - /** * Return the Universal Coordinated Time (UTC) * of solar noon for the given day at the given location @@ -401,15 +396,15 @@ private int adjustHourForTimeZone(Calendar calendar) { * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) * - * @param calendar - * The Calendar representing the date to calculate solar noon for + * @param zonedDateTime + * The zonedDateTime representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. This class uses only requires * the longitude for calculating noon since it is the same time anywhere along the longitude line. * @return the time in minutes from zero UTC */ - public double getUTCNoon(Calendar calendar, GeoLocation geoLocation) { - double noon = getSolarNoonMidnightUTC(getJulianDay(calendar), -geoLocation.getLongitude(), SolarEvent.NOON); + public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + double noon = getSolarNoonMidnightUTC(getJulianDay(zonedDateTime), -geoLocation.getLongitude(), SolarEvent.NOON); noon = noon / 60; return noon > 0 ? noon % 24 : noon % 24 + 24; // ensure that the time is >= 0 and < 24 } @@ -425,15 +420,15 @@ public double getUTCNoon(Calendar calendar, GeoLocation geoLocation) { * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) * - * @param calendar - * The Calendar representing the date to calculate solar noon for + * @param zonedDateTime + * The ZonedDateTime representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. This class uses only requires * the longitude for calculating noon since it is the same time anywhere along the longitude line. * @return the time in minutes from zero UTC */ - public double getUTCMidnight(Calendar calendar, GeoLocation geoLocation) { - double midnight = getSolarNoonMidnightUTC(getJulianDay(calendar), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); + public double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + double midnight = getSolarNoonMidnightUTC(getJulianDay(zonedDateTime), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); midnight = midnight / 60; return midnight > 0 ? midnight % 24 : midnight % 24 + 24; // ensure that the time is >= 0 and < 24 } @@ -474,8 +469,8 @@ private static double getSolarNoonMidnightUTC(double julianDay, double longitude * of sunrise or sunset in minutes for the given day at the given location on earth. * @todo Possibly increase the number of passes for improved accuracy, especially in the Arctic areas. * - * @param calendar - * The calendar + * @param zonedDateTime + * The ZonedDateTime. * @param latitude * The latitude of observer in degrees * @param longitude @@ -486,9 +481,9 @@ private static double getSolarNoonMidnightUTC(double julianDay, double longitude * If the calculation is for {@link SolarEvent#SUNRISE SUNRISE} or {@link SolarEvent#SUNSET SUNSET} * @return the time in minutes from zero Universal Coordinated Time (UTC) */ - private static double getSunRiseSetUTC(Calendar calendar, double latitude, double longitude, double zenith, + private static double getSunRiseSetUTC(ZonedDateTime zonedDateTime, double latitude, double longitude, double zenith, SolarEvent solarEvent) { - double julianDay = getJulianDay(calendar); + double julianDay = getJulianDay(zonedDateTime); // Find the time of solar noon at the location, and use that declination. // This is better than start of the Julian day From ca56570c5801d18ff654259b42c7517012ac6789 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:48:34 -0400 Subject: [PATCH 007/121] Start using java.time classes Breaking changes --- .../zmanim/util/SunTimesCalculator.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java index 9e3fee26..904d67f2 100644 --- a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -15,7 +15,7 @@ */ package com.kosherjava.zmanim.util; -import java.util.Calendar; +import java.time.ZonedDateTime; /** * Implementation of sunrise and sunset methods to calculate astronomical times. This calculator uses the Java algorithm @@ -26,7 +26,7 @@ * account for leap years. It is not as accurate as the Jean Meeus based {@link NOAACalculator} that is the default calculator * use by the KosherJava zmanim library. * - * @author © Eliyahu Hershfeld 2004 - 2025 + * @author © Eliyahu Hershfeld 2004 - 2026 * @author © Kevin Boone 2000 */ public class SunTimesCalculator extends AstronomicalCalculator { @@ -48,19 +48,19 @@ public String getCalculatorName() { /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) */ - public double getUTCSunrise(Calendar calendar, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunrise(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(calendar, geoLocation, adjustedZenith, true); + return getTimeUTC(zdt, geoLocation, adjustedZenith, true); } /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) */ - public double getUTCSunset(Calendar calendar, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunset(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(calendar, geoLocation, adjustedZenith, false); + return getTimeUTC(zdt, geoLocation, adjustedZenith, false); } /** @@ -222,8 +222,8 @@ private static double getLocalMeanTime(double localHour, double sunRightAscensio * Get sunrise or sunset time in UTC, according to flag. This time is returned as * a double and is not adjusted for time-zone. * - * @param calendar - * the Calendar object to extract the day of year for calculation + * @param zonedDateTime + * the ZonedDateTime object to extract the day of year for calculation * @param geoLocation * the GeoLocation object that contains the latitude and longitude * @param zenith @@ -234,8 +234,8 @@ private static double getLocalMeanTime(double localHour, double sunRightAscensio * (expected behavior for some locations such as near the poles, * {@link Double#NaN} will be returned. */ - private static double getTimeUTC(Calendar calendar, GeoLocation geoLocation, double zenith, boolean isSunrise) { - int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); + private static double getTimeUTC(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, boolean isSunrise) { + int dayOfYear = zonedDateTime.getDayOfYear(); double sunMeanAnomaly = getMeanAnomaly(dayOfYear, geoLocation.getLongitude(), isSunrise); double sunTrueLong = getSunTrueLongitude(sunMeanAnomaly); double sunRightAscensionHours = getSunRightAscensionHours(sunTrueLong); @@ -265,16 +265,16 @@ private static double getTimeUTC(Calendar calendar, GeoLocation geoLocation, dou * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) * @see NOAACalculator * - * @param calendar - * The Calendar representing the date to calculate solar noon for + * @param zonedDateTime + * The ZonedDateTime representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for * some locations such as near the poles, {@link Double#NaN} will be returned. */ - public double getUTCNoon(Calendar calendar, GeoLocation geoLocation) { - double sunrise = getUTCSunrise(calendar, geoLocation, 90, false); - double sunset = getUTCSunset(calendar, geoLocation, 90, false); + public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + double sunrise = getUTCSunrise(zonedDateTime, geoLocation, 90, false); + double sunset = getUTCSunset(zonedDateTime, geoLocation, 90, false); double noon = sunrise + ((sunset - sunrise) / 2); if (noon < 0) { noon += 12; @@ -295,28 +295,28 @@ public double getUTCNoon(Calendar calendar, GeoLocation geoLocation) { * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) * @see NOAACalculator * - * @param calendar - * The Calendar representing the date to calculate solar noon for + * @param zonedDateTime + * The ZonedDateTime representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for * some locations such as near the poles, {@link Double#NaN} will be returned. */ - public double getUTCMidnight(Calendar calendar, GeoLocation geoLocation) { - return (getUTCNoon(calendar, geoLocation) + 12); + public double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + return (getUTCNoon(zonedDateTime, geoLocation) + 12); } /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(Calendar, GeoLocation) */ - public double getSolarAzimuth(Calendar calendar, GeoLocation geoLocation) { + public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarAzimuth method. Use the NOAACalculator instead."); } /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) */ - public double getSolarElevation(Calendar calendar, GeoLocation geoLocation) { + public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) { throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarElevation method. Use the NOAACalculator instead."); } } From 6f66f3f91d69114b1c95cc24bd577dc3c2f2dd46 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:49:37 -0400 Subject: [PATCH 008/121] Start using java.time classes Breaking changes --- src/main/java/com/kosherjava/zmanim/util/Time.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/Time.java b/src/main/java/com/kosherjava/zmanim/util/Time.java index 1b190893..a79acb95 100644 --- a/src/main/java/com/kosherjava/zmanim/util/Time.java +++ b/src/main/java/com/kosherjava/zmanim/util/Time.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -15,14 +15,14 @@ */ package com.kosherjava.zmanim.util; -import java.util.TimeZone; +import java.time.ZoneId; /** * A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in * this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and * milliseconds of a {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour}. * - * @author © Eliyahu Hershfeld 2004 - 2025 + * @author © Eliyahu Hershfeld 2004 - 2026 */ public class Time { /** milliseconds in a second. */ @@ -209,6 +209,6 @@ public double getTime() { * @see java.lang.Object#toString() */ public String toString() { - return new ZmanimFormatter(TimeZone.getTimeZone("UTC")).format(this); + return new ZmanimFormatter(ZoneId.of("UTC")).format(this); } } From 8f5a8b4c2aeec1d7045ea0c7ed9058837b093aa8 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:51:12 -0400 Subject: [PATCH 009/121] Start using java.time classes Breaking changes --- .../zmanim/AstronomicalCalendar.java | 400 ++++++++---------- 1 file changed, 187 insertions(+), 213 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 04f829d6..dd6606c4 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2004-2025 Eliyahu Hershfeld + * Copyright (C) 2004-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -16,17 +16,19 @@ package com.kosherjava.zmanim; import java.math.BigDecimal; -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - +import java.time.Duration; +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import com.kosherjava.zmanim.util.ZmanimFormatter; /** * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise}, {@link #getSunset() - * sunset} and twilight times. This class contains a {@link #getCalendar() Calendar} and can therefore use the standard + * sunset} and twilight times. This class contains a {@link #getZonedDateTime() zonedDateTime} and can therefore use the standard * Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be * changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with * the {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine @@ -36,7 +38,7 @@ * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the * year. When the calculations encounter this condition a null will be returned when a - * {@link java.util.Date} is expected and {@link Long#MIN_VALUE} when a long is expected. The + * {@link java.time.Instant} 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. *

@@ -48,22 +50,21 @@ * double latitude = 40.0828; // Lakewood, NJ * double longitude = -74.2094; // Lakewood, NJ * double elevation = 20; // optional elevation correction in Meters - * // the String parameter in getTimeZone() has to be a valid timezone listed in - * // {@link java.util.TimeZone#getAvailableIDs()} - * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); - * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); + * // the String parameter in getZoneId() has to be a valid ZoneId listed in {@link java.time.ZoneId#getAvailableZoneIds()} + * ZoneId zoneId = ZoneId.of("America/New_York"); + * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, zoneId); * AstronomicalCalendar ac = new AstronomicalCalendar(location); * * * To get the time of sunrise, first set the date you want (if not set, the date will default to today): * *

- * ac.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY);
- * ac.getCalendar().set(Calendar.DAY_OF_MONTH, 8);
- * Date sunrise = ac.getSunrise();
+ * ZonedDateTime dateTime = ZonedDateTime.of(1969, Month.FEBRUARY.getValue(), 8, 0, 0, 0, 0, location.getZoneId());
+ * ac.setZonedDateTime(dateTime);
+ * Instant sunrise = ac.getSunrise();
  * 
* - * @author © Eliyahu Hershfeld 2004 - 2025 + * @author © Eliyahu Hershfeld 2004 - 2026 */ public class AstronomicalCalendar implements Cloneable { @@ -90,11 +91,11 @@ public class AstronomicalCalendar implements Cloneable { /** constant for milliseconds in an hour (3,600,000) */ public static final long HOUR_MILLIS = MINUTE_MILLIS * 60; - + /** - * The Java Calendar encapsulated by this class to track the current date used by the class + * The ZonedDateTime encapsulated by this class to track the current date used by the class */ - private Calendar calendar; + private ZonedDateTime zonedDateTime; /** * the {@link GeoLocation} used for calculations. @@ -107,7 +108,7 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The getSunrise method returns a Date representing the + * The getSunrise method returns a Instant 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 @@ -115,19 +116,19 @@ public class AstronomicalCalendar implements Cloneable { * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. * - * @return the Date representing the exact sunrise time. If the calculation can't be computed such as + * @return the Instant representing the exact sunrise 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, a null will be returned. See detailed explanation on top of the page. * @see AstronomicalCalculator#adjustZenith * @see #getSeaLevelSunrise() * @see AstronomicalCalendar#getUTCSunrise */ - public Date getSunrise() { + public Instant getSunrise() { double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); if (Double.isNaN(sunrise)) { return null; } else { - return getDateFromTime(sunrise, SolarEvent.SUNRISE); + return getInstantFromTime(sunrise, SolarEvent.SUNRISE); } } @@ -137,19 +138,19 @@ public Date getSunrise() { * something that is not affected by elevation. This method returns sunrise calculated at sea level. This forms the * base for dawn calculations that are calculated as a dip below the horizon before sunrise. * - * @return the Date representing the exact sea-level sunrise time. If the calculation can't be computed + * @return the Instant representing the exact sea-level sunrise 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, a null will be returned. See detailed explanation on top of the page. * @see AstronomicalCalendar#getSunrise * @see AstronomicalCalendar#getUTCSeaLevelSunrise * @see #getSeaLevelSunset() */ - public Date getSeaLevelSunrise() { + public Instant getSeaLevelSunrise() { double sunrise = getUTCSeaLevelSunrise(GEOMETRIC_ZENITH); if (Double.isNaN(sunrise)) { return null; } else { - return getDateFromTime(sunrise, SolarEvent.SUNRISE); + return getInstantFromTime(sunrise, SolarEvent.SUNRISE); } } @@ -157,11 +158,11 @@ public Date getSeaLevelSunrise() { * A method that returns the beginning of civil twilight * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}. * - * @return The Date of the beginning of civil twilight using a zenith of 96°. If the calculation + * @return The Instant of the beginning of civil twilight using a zenith of 96°. If the calculation * can't be computed, null will be returned. See detailed explanation on top of the page. * @see #CIVIL_ZENITH */ - public Date getBeginCivilTwilight() { + public Instant getBeginCivilTwilight() { return getSunriseOffsetByDegrees(CIVIL_ZENITH); } @@ -170,11 +171,11 @@ public Date getBeginCivilTwilight() { * "https://en.wikipedia.org/wiki/Twilight#Nautical_twilight">nautical twilight using a zenith of {@link * #NAUTICAL_ZENITH 102°}. * - * @return The Date of the beginning of nautical twilight using a zenith of 102°. If the calculation + * @return The Instant of the beginning of nautical twilight using a zenith of 102°. If the calculation * can't be computed null will be returned. See detailed explanation on top of the page. * @see #NAUTICAL_ZENITH */ - public Date getBeginNauticalTwilight() { + public Instant getBeginNauticalTwilight() { return getSunriseOffsetByDegrees(NAUTICAL_ZENITH); } @@ -183,16 +184,16 @@ public Date getBeginNauticalTwilight() { * "https://en.wikipedia.org/wiki/Twilight#Astronomical_twilight">astronomical twilight using a zenith of * {@link #ASTRONOMICAL_ZENITH 108°}. * - * @return The Date of the beginning of astronomical twilight using a zenith of 108°. If the calculation + * @return The Instant of the beginning of astronomical twilight using a zenith of 108°. If the calculation * can't be computed, null will be returned. See detailed explanation on top of the page. * @see #ASTRONOMICAL_ZENITH */ - public Date getBeginAstronomicalTwilight() { + public Instant getBeginAstronomicalTwilight() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } /** - * The getSunset method returns a Date representing the + * The getSunset method returns a Instant 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 @@ -203,19 +204,19 @@ public Date getBeginAstronomicalTwilight() { * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this * case the sunset date will be incremented to the following date. * - * @return the Date representing the exact sunset time. If the calculation can't be computed such as in + * @return the Instant representing the exact sunset 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, a null will be returned. See detailed explanation on top of the page. * @see AstronomicalCalculator#adjustZenith * @see #getSeaLevelSunset() * @see AstronomicalCalendar#getUTCSunset */ - public Date getSunset() { + public Instant getSunset() { double sunset = getUTCSunset(GEOMETRIC_ZENITH); if (Double.isNaN(sunset)) { return null; } else { - return getDateFromTime(sunset, SolarEvent.SUNSET); + return getInstantFromTime(sunset, SolarEvent.SUNSET); } } @@ -225,19 +226,19 @@ public Date getSunset() { * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the * base for dusk calculations that are calculated as a dip below the horizon after sunset. * - * @return the Date representing the exact sea-level sunset time. If the calculation can't be computed + * @return the Instant representing the exact sea-level sunset 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, a null will be returned. See detailed explanation on top of the page. * @see AstronomicalCalendar#getSunset * @see AstronomicalCalendar#getUTCSeaLevelSunset * @see #getSunset() */ - public Date getSeaLevelSunset() { + public Instant getSeaLevelSunset() { double sunset = getUTCSeaLevelSunset(GEOMETRIC_ZENITH); if (Double.isNaN(sunset)) { return null; } else { - return getDateFromTime(sunset, SolarEvent.SUNSET); + return getInstantFromTime(sunset, SolarEvent.SUNSET); } } @@ -245,71 +246,71 @@ public Date getSeaLevelSunset() { * A method that returns the end of civil twilight * using a zenith of {@link #CIVIL_ZENITH 96°}. * - * @return The Date of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If the + * @return The Instant of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If the * calculation can't be computed, null will be returned. See detailed explanation on top of the page. * @see #CIVIL_ZENITH */ - public Date getEndCivilTwilight() { + public Instant getEndCivilTwilight() { return getSunsetOffsetByDegrees(CIVIL_ZENITH); } /** * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}. * - * @return The Date of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}. If + * @return The Instant of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}. If * the calculation can't be computed, null will be returned. See detailed explanation on top of the * page. * @see #NAUTICAL_ZENITH */ - public Date getEndNauticalTwilight() { + public Instant getEndNauticalTwilight() { return getSunsetOffsetByDegrees(NAUTICAL_ZENITH); } /** * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}. * - * @return the Date of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH + * @return the Instant of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH * 108°}. If the calculation can't be computed, null will be returned. See detailed * explanation on top of the page. * @see #ASTRONOMICAL_ZENITH */ - public Date getEndAstronomicalTwilight() { + public Instant getEndAstronomicalTwilight() { return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); } /** * A utility method that returns a date offset by the offset time passed in as a parameter. This method casts the - * offset as a long and calls {@link #getTimeOffset(Date, long)}. + * offset as a long and calls {@link #getTimeOffset(Instant, long)}. * * @param time * the start time * @param offset * the offset in milliseconds to add to the time - * @return the {@link java.util.Date}with the offset added to it + * @return the {@link java.time.Instant} with the offset added to it */ - public static Date getTimeOffset(Date time, double offset) { + public static Instant getTimeOffset(Instant time, double offset) { return getTimeOffset(time, (long) offset); } - + /** - * A utility method that returns a date offset by the offset time passed in. Please note that the level of light - * during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or - * after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed - * to this method should be sea level sunrise and sunset. + * A utility method that returns an Instant offset by the offset time passed in. Please note that the + * level of light during twilight is not affected by elevation, so if this is being used to calculate an offset before + * sunrise or after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time + * passed to this method should be sea level sunrise and sunset. * * @param time * the start time - * @param offset + * @param offsetMillis * the offset in milliseconds to add to the time. - * @return the {@link java.util.Date} with the offset in milliseconds added to it + * @return the {@link java.time.Instant} with the offset in milliseconds added to it */ - public static Date getTimeOffset(Date time, long offset) { - if (time == null || offset == Long.MIN_VALUE) { - return null; - } - return new Date(time.getTime() + offset); + public static Instant getTimeOffset(Instant time, long offsetMillis) { + if (time == null || offsetMillis == Long.MIN_VALUE) { + return null; + } + return time.plusMillis(offsetMillis); } - + /** * A utility method that returns the time of an offset by degrees below or above the horizon of * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° @@ -320,18 +321,15 @@ public static Date getTimeOffset(Date time, long offset) { * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14° * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a * parameter. - * @return The {@link java.util.Date} of the offset after (or before) {@link #getSunrise()}. If the calculation + * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunrise()}. 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 page. */ - public Date getSunriseOffsetByDegrees(double offsetZenith) { - double dawn = getUTCSunrise(offsetZenith); - if (Double.isNaN(dawn)) { - return null; - } else { - return getDateFromTime(dawn, SolarEvent.SUNRISE); - } + public Instant getSunriseOffsetByDegrees(double offsetZenith) { + double dawn = getUTCSunrise(offsetZenith); + return Double.isNaN(dawn) ? null + : getInstantFromTime(dawn, SolarEvent.SUNSET); } /** @@ -343,23 +341,20 @@ public Date getSunriseOffsetByDegrees(double offsetZenith) { * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. - * @return The {@link java.util.Date}of the offset after (or before) {@link #getSunset()}. If the calculation can't + * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunset()}. 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 page. */ - public Date getSunsetOffsetByDegrees(double offsetZenith) { - double sunset = getUTCSunset(offsetZenith); - if (Double.isNaN(sunset)) { - return null; - } else { - return getDateFromTime(sunset, SolarEvent.SUNSET); - } + public Instant getSunsetOffsetByDegrees(double offsetZenith) { + double sunset = getUTCSunset(offsetZenith); + return Double.isNaN(sunset) ? null + : getInstantFromTime(sunset, SolarEvent.SUNSET); } /** * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default - * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date. + * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the ZonedDateTime to the current date. */ public AstronomicalCalendar() { this(new GeoLocation()); @@ -376,7 +371,7 @@ public AstronomicalCalendar() { * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class. */ public AstronomicalCalendar(GeoLocation geoLocation) { - setCalendar(Calendar.getInstance(geoLocation.getTimeZone())); + setZonedDateTime(ZonedDateTime.now(geoLocation.getZoneId())); setGeoLocation(geoLocation);// duplicate call setAstronomicalCalculator(AstronomicalCalculator.getDefault()); } @@ -454,12 +449,11 @@ public double getUTCSeaLevelSunset(double zenith) { * * @see #getSeaLevelSunrise() * @see #getSeaLevelSunset() - * @see #getTemporalHour(Date, Date) + * @see #getTemporalHour(Instant, Instant) * * @return the long millisecond length of a temporal hour. If the calculation can't be computed, * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page. * - * @see #getTemporalHour(Date, Date) */ public long getTemporalHour() { return getTemporalHour(getSeaLevelSunrise(), getSeaLevelSunset()); @@ -481,11 +475,12 @@ public long getTemporalHour() { * * @see #getTemporalHour() */ - public long getTemporalHour(Date startOfDay, Date endOfDay) { - if (startOfDay == null || endOfDay == null) { - return Long.MIN_VALUE; - } - return (endOfDay.getTime() - startOfDay.getTime()) / 12; + public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new code + if (startOfDay == null || endOfDay == null) { + return Long.MIN_VALUE; + } + + return Duration.between(startOfDay, endOfDay).toMillis() / 12; } /** @@ -501,51 +496,18 @@ public long getTemporalHour(Date startOfDay, Date endOfDay) { * "https://kosherjava.com/2020/07/02/definition-of-chatzos/">The Definition of Chatzos for details on the proper * definition of solar noon / midday. * - * @return the Date representing Sun's transit. If the calculation can't be computed such as when using + * @return the Instant representing Sun's transit. If the calculation can't be computed such as when using * the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not support getting solar * noon for 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 page. - * @see #getSunTransit(Date, Date) + * @see #getSunTransit(Instant, Instant) * @see #getTemporalHour() * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ - public Date getSunTransit() { + public Instant getSunTransit() { double noon = getAstronomicalCalculator().getUTCNoon(getAdjustedCalendar(), getGeoLocation()); - return getDateFromTime(noon, SolarEvent.NOON); - } - - /** - * A method that returns solar midnight. It occurs when the Sun is transiting the lower celestial meridian, or when the sun is at it's - * nadir. The calculations used by this class depend on the {@link - * AstronomicalCalculator} used. If this calendar instance is {@link #setAstronomicalCalculator(AstronomicalCalculator) - * set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator} (the default) it will calculate astronomical - * midnight. If the calendar instance is to use the {@link com.kosherjava.zmanim.util.SunTimesCalculator}, that does not - * have code to calculate astronomical noon, midnight is calculated as halfway between sea level sunrise and sea level - * sunset on the other side of the world (180° away), which can be slightly off the real transit time due to changes - * in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper - * definition of solar noon / midday. - * - * @deprecated This method was replaced by {@link #getSolarMidnight()} and will be removed in v3.0. - * - * @return the Date representing Sun's lower transit at the end of the current day. If the calculation can't - * be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that - * does not support getting solar noon or midnight for 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. This is not - * relevant when using the {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected - * to return null. See the detailed explanation on top of the page. - * - * @see #getSunTransit() - * @see #getSolarMidnight() - * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) - * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) - */ - @Deprecated // (since="2.6", forRemoval=true)// add back once Java 9 is the minimum supported version - public Date getSunLowerTransit() { - return getSolarMidnight(); + return getInstantFromTime(noon, SolarEvent.NOON); //FIXME NEW CODE } /** @@ -562,7 +524,7 @@ public Date getSunLowerTransit() { * "https://kosherjava.com/2020/07/02/definition-of-chatzos/">The Definition of Chatzos for details on the proper * definition of solar noon / midday. * - * @return the Date representing Sun's lower transit at the end of the current day. If the calculation can't + * @return the Instant representing Sun's lower transit at the end of the current day. If the calculation can't * be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that * does not support getting solar noon or midnight for 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. This is not @@ -573,9 +535,9 @@ public Date getSunLowerTransit() { * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ - public Date getSolarMidnight() { + public Instant getSolarMidnight() { double noon = getAstronomicalCalculator().getUTCMidnight(getAdjustedCalendar(), getGeoLocation()); - return getDateFromTime(noon, SolarEvent.MIDNIGHT); + return getInstantFromTime(noon, SolarEvent.MIDNIGHT); } /** @@ -592,11 +554,11 @@ public Date getSolarMidnight() { * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any * arbitrary end of day) passed to this method. * - * @return the Date representing Sun's transit. If the calculation can't be computed such as in the + * @return the Instant representing Sun's transit. 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, null will be returned. See detailed explanation on top of the page. */ - public Date getSunTransit(Date startOfDay, Date endOfDay) { + public Instant getSunTransit(Instant startOfDay, Instant endOfDay) { long temporalHour = getTemporalHour(startOfDay, endOfDay); if (temporalHour == Long.MIN_VALUE) { return null; @@ -611,54 +573,51 @@ protected enum SolarEvent { /**SUNRISE A solar event related to sunrise*/SUNRISE, /**SUNSET A solar event related to sunset*/SUNSET, /**NOON A solar event related to noon*/NOON, /**MIDNIGHT A solar event related to midnight*/MIDNIGHT } - + /** - * A method that returns a Date from the time passed in as a parameter. + * A method that returns an Instant from the time passed in as a parameter. * * @param time - * The time to be set as the time for the Date. The time expected is in the format: 18.75 + * The time to be set as the time for the Instant. The time expected is in the format: 18.75 * for 6:45:00 PM.time is sunrise and false if it is sunset * @param solarEvent the type of {@link SolarEvent} - * @return The Date object representation of the time double + * @return The Instant object representation of the time double */ - protected Date getDateFromTime(double time, SolarEvent solarEvent) { - if (Double.isNaN(time)) { - return null; - } - double calculatedTime = time; - - Calendar adjustedCalendar = getAdjustedCalendar(); - Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC")); - cal.clear();// clear all fields - cal.set(Calendar.YEAR, adjustedCalendar.get(Calendar.YEAR)); - cal.set(Calendar.MONTH, adjustedCalendar.get(Calendar.MONTH)); - cal.set(Calendar.DAY_OF_MONTH, adjustedCalendar.get(Calendar.DAY_OF_MONTH)); - - int hours = (int) calculatedTime; // retain only the hours - calculatedTime -= hours; - int minutes = (int) (calculatedTime *= 60); // retain only the minutes - calculatedTime -= minutes; - int seconds = (int) (calculatedTime *= 60); // retain only the seconds - calculatedTime -= seconds; // remaining milliseconds - - // Check if a date transition has occurred, or is about to occur - this indicates the date of the event is - // actually not the target date, but the day prior or after - int localTimeHours = (int)getGeoLocation().getLongitude() / 15; - if (solarEvent == SolarEvent.SUNRISE && localTimeHours + hours > 18) { - cal.add(Calendar.DAY_OF_MONTH, -1); - } else if (solarEvent == SolarEvent.SUNSET && localTimeHours + hours < 6) { - cal.add(Calendar.DAY_OF_MONTH, 1); - } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours + hours < 12) { - cal.add(Calendar.DAY_OF_MONTH, 1); - } else if (solarEvent == SolarEvent.NOON && localTimeHours + hours > 24) { - cal.add(Calendar.DAY_OF_MONTH, -1); - } - - cal.set(Calendar.HOUR_OF_DAY, hours); - cal.set(Calendar.MINUTE, minutes); - cal.set(Calendar.SECOND, seconds); - cal.set(Calendar.MILLISECOND, (int) (calculatedTime * 1000)); - return cal.getTime(); + + protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { + if (Double.isNaN(time)) { + return null; + } + + ZonedDateTime adjustedZonedDateTime = getAdjustedZonedDateTime(); + + LocalDate date = adjustedZonedDateTime + .withZoneSameInstant(ZoneOffset.UTC) + .toLocalDate(); + + // Convert fractional hour to total seconds + int totalSeconds = (int) Math.floor(time * 3600); + int hours = totalSeconds / 3600; + int minutes = (totalSeconds % 3600) / 60; + int seconds = totalSeconds % 60; + int localTimeHours = (int) getGeoLocation().getLongitude() / 15; + + if (solarEvent == SolarEvent.SUNRISE && localTimeHours + hours > 18) { + date = date.minusDays(1); + } else if (solarEvent == SolarEvent.SUNSET && localTimeHours + hours < 6) { + date = date.plusDays(1); + } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours + hours < 12) { + date = date.plusDays(1); + } else if (solarEvent == SolarEvent.NOON) { + if (localTimeHours + hours < 0) { + date = date.plusDays(1); + } else if (localTimeHours + hours > 24) { + date = date.minusDays(1); + } + } + + LocalTime localTime = LocalTime.of(hours, minutes, seconds); + return ZonedDateTime.of(date, localTime, ZoneOffset.UTC).toInstant(); } /** @@ -677,19 +636,19 @@ protected Date getDateFromTime(double time, SolarEvent solarEvent) { * @see AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) * @see #getSunsetSolarDipFromOffset(double) */ - @Deprecated // (forRemoval=false) // add back once Java 9 is the minimum supported version + @Deprecated(forRemoval=false) public double getSunriseSolarDipFromOffset(double minutes) { - Date offsetByDegrees = getSeaLevelSunrise(); + Instant offsetByDegrees = getSeaLevelSunrise(); if(offsetByDegrees == null) { return Double.NaN; } - Date offsetByTime = getTimeOffset(getSeaLevelSunrise(), -(minutes * MINUTE_MILLIS)); + Instant offsetByTime = getTimeOffset(getSeaLevelSunrise(), -(minutes * MINUTE_MILLIS)); BigDecimal degrees = new BigDecimal(0); BigDecimal incrementor = new BigDecimal("0.0001"); - while (offsetByDegrees == null || ((minutes < 0.0 && offsetByDegrees.getTime() < offsetByTime.getTime()) || - (minutes > 0.0 && offsetByDegrees.getTime() > offsetByTime.getTime()))) { + while (offsetByDegrees == null || ((minutes < 0.0 && offsetByDegrees.toEpochMilli() < offsetByTime.toEpochMilli()) || + (minutes > 0.0 && offsetByDegrees.toEpochMilli() > offsetByTime.toEpochMilli()))) { if (minutes > 0.0) { degrees = degrees.add(incrementor); } else { @@ -716,17 +675,17 @@ public double getSunriseSolarDipFromOffset(double minutes) { * @see AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) * @see #getSunriseSolarDipFromOffset(double) */ - @Deprecated // (forRemoval=false) // add back once Java 9 is the minimum supported version + @Deprecated(forRemoval=false) public double getSunsetSolarDipFromOffset(double minutes) { - Date offsetByDegrees = getSeaLevelSunset(); + Instant offsetByDegrees = getSeaLevelSunset(); if(offsetByDegrees == null) { return Double.NaN; } - Date offsetByTime = getTimeOffset(getSeaLevelSunset(), minutes * MINUTE_MILLIS); + Instant offsetByTime = getTimeOffset(getSeaLevelSunset(), minutes * MINUTE_MILLIS); BigDecimal degrees = new BigDecimal(0); BigDecimal incrementor = new BigDecimal("0.001"); - while (offsetByDegrees == null || ((minutes > 0.0 && offsetByDegrees.getTime() < offsetByTime.getTime()) || - (minutes < 0.0 && offsetByDegrees.getTime() > offsetByTime.getTime()))) { + while (offsetByDegrees == null || ((minutes > 0.0 && offsetByDegrees.toEpochMilli() < offsetByTime.toEpochMilli()) || + (minutes < 0.0 && offsetByDegrees.toEpochMilli() > offsetByTime.toEpochMilli()))) { if (minutes > 0.0) { degrees = degrees.add(incrementor); } else { @@ -750,32 +709,47 @@ public double getSunsetSolarDipFromOffset(double minutes) { * @param hours * the hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of * 0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range. - * @return the Date representing the local mean time (LMT) for the number of hours passed in. In Lakewood, NJ, passing 12 - * (noon) will return 11:56:50am. - * @see GeoLocation#getLocalMeanTimeOffset() + * @return the Instant representing the local mean time (LMT) for the number of hours passed in. In Lakewood, + * NJ, passing 12 (noon) will return 11:56:50am. + * @see GeoLocation#getLocalMeanTimeOffset(Instant) */ - public Date getLocalMeanTime(double hours) { - if (hours < 0 || hours >= 24) { - throw new IllegalArgumentException("Hours must between 0 and 23.9999..."); - } - return getTimeOffset(getDateFromTime(hours - getGeoLocation().getTimeZone().getRawOffset() - / (double) HOUR_MILLIS, SolarEvent.SUNRISE), -getGeoLocation().getLocalMeanTimeOffset()); + public Instant getLocalMeanTime(double hours) { + if (hours < 0 || hours >= 24) { + throw new IllegalArgumentException("Hours must be between 0 and 23.9999..."); + } + + double rawOffset = getGeoLocation().getZoneId().getRules().getStandardOffset(getZonedDateTime().toInstant()).getTotalSeconds() * 1000; + double utcTime = hours - rawOffset / (double) HOUR_MILLIS; + Instant instant = getInstantFromTime(utcTime, SolarEvent.SUNRISE); + + return getTimeOffset(instant, -getGeoLocation().getLocalMeanTimeOffset(getZonedDateTime().toInstant())); } /** - * Adjusts the Calendar to deal with edge cases where the location crosses the antimeridian. + * Adjusts the ZonedDateTime to deal with edge cases where the location crosses the antimeridian. * - * @see GeoLocation#getAntimeridianAdjustment() + * @see GeoLocation#getAntimeridianAdjustment(Instant) * @return the adjusted Calendar */ - private Calendar getAdjustedCalendar(){ - int offset = getGeoLocation().getAntimeridianAdjustment(); + private ZonedDateTime getAdjustedCalendar(){ + int offset = getGeoLocation().getAntimeridianAdjustment(getZonedDateTime().toInstant()); if (offset == 0) { - return getCalendar(); + return getZonedDateTime(); } - Calendar adjustedCalendar = (Calendar) getCalendar().clone(); - adjustedCalendar.add(Calendar.DAY_OF_MONTH, offset); - return adjustedCalendar; + ZonedDateTime adjustedZonedDateTime = getZonedDateTime(); + return adjustedZonedDateTime.plusDays(1); + } + + /** + * Adjusts the ZonedDateTime to deal with edge cases where the location crosses the antimeridian. + * + * @see GeoLocation#getAntimeridianAdjustment(Instant) + * @return the adjusted Calendar + */ + private ZonedDateTime getAdjustedZonedDateTime(){ + ZonedDateTime adjustedZonedDateTime = getZonedDateTime(); + int offset = getGeoLocation().getAntimeridianAdjustment(getZonedDateTime().toInstant()); + return offset == 0 ? adjustedZonedDateTime : adjustedZonedDateTime.plusDays(offset); } /** @@ -813,7 +787,7 @@ public boolean equals(Object object) { return false; } AstronomicalCalendar aCal = (AstronomicalCalendar) object; - return getCalendar().equals(aCal.getCalendar()) && getGeoLocation().equals(aCal.getGeoLocation()) + return getZonedDateTime().equals(aCal.getZonedDateTime()) && getGeoLocation().equals(aCal.getGeoLocation()) && getAstronomicalCalculator().equals(aCal.getAstronomicalCalculator()); } @@ -823,7 +797,7 @@ public boolean equals(Object object) { public int hashCode() { int result = 17; result = 37 * result + getClass().hashCode(); // needed or this and subclasses will return identical hash - result += 37 * result + getCalendar().hashCode(); + result += 37 * result + getZonedDateTime().hashCode(); result += 37 * result + getGeoLocation().hashCode(); result += 37 * result + getAstronomicalCalculator().hashCode(); return result; @@ -849,7 +823,7 @@ public GeoLocation getGeoLocation() { */ public void setGeoLocation(GeoLocation geoLocation) { this.geoLocation = geoLocation; - getCalendar().setTimeZone(geoLocation.getTimeZone()); + getZonedDateTime().withZoneSameInstant(getGeoLocation().getZoneId()); } /** @@ -876,25 +850,25 @@ public AstronomicalCalculator getAstronomicalCalculator() { public void setAstronomicalCalculator(AstronomicalCalculator astronomicalCalculator) { this.astronomicalCalculator = astronomicalCalculator; } - + /** - * returns the Calendar object encapsulated in this class. + * returns the ZonedDateTime object encapsulated in this class. * - * @return Returns the calendar. + * @return Returns the ZonedDateTime. */ - public Calendar getCalendar() { - return this.calendar; + public ZonedDateTime getZonedDateTime() { + return this.zonedDateTime; } - + /** - * Sets the Calendar object for us in this class. - * @param calendar - * The calendar to set. + * Sets the ZonedDateTime object for us in this class. + * @param zonedDateTime + * The ZonedDateTime to set. */ - public void setCalendar(Calendar calendar) { - this.calendar = calendar; + public void setZonedDateTime(ZonedDateTime zonedDateTime) { + this.zonedDateTime = zonedDateTime; if (getGeoLocation() != null) {// if available set the Calendar's timezone to the GeoLocation TimeZone - getCalendar().setTimeZone(getGeoLocation().getTimeZone()); + getZonedDateTime().withZoneSameInstant(getGeoLocation().getZoneId()); } } @@ -902,7 +876,7 @@ public void setCalendar(Calendar calendar) { * A method that creates a deep copy of the object. * Note: If the {@link java.util.TimeZone} in the cloned {@link com.kosherjava.zmanim.util.GeoLocation} will * be changed from the original, it is critical that - * {@link com.kosherjava.zmanim.AstronomicalCalendar#getCalendar()}. + * {@link com.kosherjava.zmanim.AstronomicalCalendar#getZonedDateTime()}. * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the * AstronomicalCalendar to output times in the expected offset after being cloned. * @@ -917,7 +891,7 @@ public Object clone() { } if (clone != null) { clone.setGeoLocation((GeoLocation) getGeoLocation().clone()); - clone.setCalendar((Calendar) getCalendar().clone()); + //clone.setZonedDateTime(getZonedDateTime().clone()); clone.setAstronomicalCalculator((AstronomicalCalculator) getAstronomicalCalculator().clone()); } return clone; From 9bc4b40b6231fa4acc04d2800fa5b2f6347267d5 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:52:35 -0400 Subject: [PATCH 010/121] Start using java.time classes Breaking changes --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 213 +++++++++--------- 1 file changed, 106 insertions(+), 107 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index be75d52e..4edff603 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -15,9 +15,7 @@ */ package com.kosherjava.zmanim; -import java.util.Calendar; -import java.util.Date; - +import java.time.Instant; import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; @@ -266,7 +264,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz * {@link AstronomicalCalendar#getSunrise()} if it is true. * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunrise() */ - protected Date getElevationAdjustedSunrise() { + protected Instant getElevationAdjustedSunrise() { if (isUseElevation()) { return super.getSunrise(); } @@ -282,7 +280,7 @@ protected Date getElevationAdjustedSunrise() { * {@link AstronomicalCalendar#getSunset()} if it is true. * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunset() */ - protected Date getElevationAdjustedSunset() { + protected Instant getElevationAdjustedSunset() { if (isUseElevation()) { return super.getSunset(); } @@ -297,14 +295,14 @@ protected Date getElevationAdjustedSunset() { * * @see #ZENITH_8_POINT_5 * - * @return The Date of nightfall. If the calculation can't be computed such as northern and southern + * @return The Instant of nightfall. 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. * @see #ZENITH_8_POINT_5 * ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais */ - public Date getTzais() { + public Instant getTzais() { return getSunsetOffsetByDegrees(ZENITH_8_POINT_5); } @@ -321,12 +319,12 @@ public Date getTzais() { * @see #ZENITH_16_POINT_1 * @see ComprehensiveZmanimCalendar#getAlos16Point1Degrees() * - * @return The Date of dawn. If the calculation can't be computed such as northern and southern + * @return The Instant of dawn. 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. */ - public Date getAlosHashachar() { + public Instant getAlosHashachar() { return getSunriseOffsetByDegrees(ZENITH_16_POINT_1); } @@ -339,12 +337,12 @@ public Date getAlosHashachar() { * (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. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Date getAlos72() { + public Instant getAlos72() { return getTimeOffset(getElevationAdjustedSunrise(), -72 * MINUTE_MILLIS); } @@ -367,16 +365,16 @@ public Date getAlos72() { * @see #getChatzosAsHalfDay() * @see #isUseAstronomicalChatzos() * @see #setUseAstronomicalChatzos(boolean) - * @return the Date of chatzos. If the calculation can't be computed such as in the Arctic Circle + * @return the Instant of chatzos. If the calculation can't be computed such as in the Arctic Circle * where there is at least one day where the sun does not rise, and one where it does not set, and the calculator does not * support astronomical calculations (that will never report a null) a null will be returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Date getChatzos() { + public Instant getChatzos() { if (useAstronomicalChatzos) { return getSunTransit(); // can be null of the calculator does not support astronomical chatzos } else { - Date halfDayChatzos = getChatzosAsHalfDay(); + Instant halfDayChatzos = getChatzosAsHalfDay(); if (halfDayChatzos == null) { return getSunTransit(); // can be null if the calculator does not support astronomical chatzos } else { @@ -401,20 +399,20 @@ public Date getChatzos() { * zmaniyos after sunrise. See The Definition * of Chatzos for a detailed explanation of the ways to calculate Chatzos. * - * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) - * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) - * @see AstronomicalCalendar#getSunTransit(Date, Date) + * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(ZonedDateTime, GeoLocation) + * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(ZonedDateTime, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(ZonedDateTime, GeoLocation) + * @see AstronomicalCalendar#getSunTransit(Instant, Instant) * @see #getChatzos() * @see #getSunTransit() * @see #isUseAstronomicalChatzos() * - * @return the Date of the latest chatzos. If the calculation can't be computed such + * @return the Instant of the latest chatzos. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getChatzosAsHalfDay() { + public Instant getChatzosAsHalfDay() { return getSunTransit(getSeaLevelSunrise(), getSeaLevelSunset()); } @@ -444,12 +442,12 @@ public Date getChatzosAsHalfDay() { * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @see #isUseAstronomicalChatzosForOtherZmanim() - * @return the Date of the latest zman shema based on the start and end of day times passed to this + * @return the Instant of the latest zman shema based on the start and end of day times 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 {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanShma(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(startOfDay, getChatzos(), 3); } else { @@ -458,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)} + * A generic method for calculating the latest zman krias shema that calls {@link #getSofZmanShma(Instant, Instant, boolean)} * 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 @@ -467,13 +465,13 @@ public Date getSofZmanShma(Date startOfDay, Date endOfDay, boolean synchronous) * @param endOfDay * the end of day for calculating zman krias shema. This can be sunset or any tzais passed to * this method. - * @return the Date of the latest zman shema based on the start and end of day times passed to this + * @return the Instant of the latest zman shema based on the start and end of day times 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 {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Date, Date, boolean) + * @see #getSofZmanShma(Instant, Instant, boolean) */ - public Date getSofZmanShma(Date startOfDay, Date endOfDay) { + public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { return getSofZmanShma(startOfDay, endOfDay, false); } @@ -486,16 +484,16 @@ public Date getSofZmanShma(Date startOfDay, Date endOfDay) { * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the * {@link #isUseElevation()} setting). * - * @see #getSofZmanShma(Date, Date) + * @see #getSofZmanShma(Instant, Instant) * @see #getShaahZmanisGra() * @see #isUseElevation() * @see ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya() - * @return the Date of the latest zman shema according to the GRA. If the calculation can't be + * @return the Instant of the latest zman shema according to the GRA. 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 the detailed explanation on top * of the {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanShmaGRA() { + public Instant getSofZmanShmaGRA() { return getSofZmanShma(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } @@ -507,16 +505,16 @@ public Date getSofZmanShmaGRA() { * #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 + * @return the Instant of the latest zman shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Date, Date) + * @see #getSofZmanShma(Instant, Instant) * @see ComprehensiveZmanimCalendar#getShaahZmanis72Minutes() * @see ComprehensiveZmanimCalendar#getAlos72() * @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA72Minutes() that */ - public Date getSofZmanShmaMGA() { + public Instant getSofZmanShmaMGA() { return getSofZmanShma(getAlos72(), getTzais72(), true); } @@ -531,12 +529,12 @@ public Date getSofZmanShmaMGA() { * offset from either {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used. * * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() - * @return the Date representing 72 minutes after sunset. If the calculation can't be + * @return the Instant representing 72 minutes after 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, * and one where it does not set, a null will be returned See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Date getTzais72() { + public Instant getTzais72() { return getTimeOffset(getElevationAdjustedSunset(), 72 * MINUTE_MILLIS); } @@ -545,7 +543,7 @@ public Date getTzais72() { * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset - * to {@link #getTimeOffset(Date, long)}. + * to {@link #getTimeOffset(Instant, long)}. * * @return candle lighting 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, a null will @@ -555,7 +553,7 @@ public Date getTzais72() { * @see #getCandleLightingOffset() * @see #setCandleLightingOffset(double) */ - public Date getCandleLighting() { + public Instant getCandleLighting() { return getTimeOffset(getSeaLevelSunset(), -getCandleLightingOffset() * MINUTE_MILLIS); } @@ -572,7 +570,7 @@ public Date getCandleLighting() { * 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. * @@ -586,12 +584,12 @@ public Date getCandleLighting() { * If the zman has a synchronous start and end of the day. If this is false, using a {@link * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @return the Date of the latest zman tfilah based on the start and end of day times passed + * @return the Instant of the latest zman tfilah based on the start and end of day times 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 {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanTfila(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(startOfDay, getChatzos(), 4); } else { @@ -600,7 +598,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)} + * A generic method for calculating the latest zman tfila that calls {@link #getSofZmanTfila(Instant, Instant, boolean)} * 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 @@ -609,13 +607,13 @@ public Date getSofZmanTfila(Date startOfDay, Date endOfDay, boolean synchronous) * @param endOfDay * the end of day for calculating zman tfilah. This can be sunset or any tzais passed to * this method. - * @return the Date of the latest zman tfilah based on the start and end of day times passed to this + * @return the Instant of the latest zman tfilah based on the start and end of day times 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 {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Date, Date, boolean) + * @see #getSofZmanShma(Instant, Instant, boolean) */ - public Date getSofZmanTfila(Date startOfDay, Date endOfDay) { + public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { return getSofZmanTfila(startOfDay, endOfDay, false); } @@ -628,15 +626,15 @@ public Date getSofZmanTfila(Date startOfDay, Date endOfDay) { * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the * {@link #isUseElevation()} setting). * - * @see #getSofZmanTfila(Date, Date) + * @see #getSofZmanTfila(Instant, Instant) * @see #getShaahZmanisGra() * @see ComprehensiveZmanimCalendar#getSofZmanTfilaBaalHatanya() - * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in + * @return the Instant of the latest zman tfilah. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanTfilaGRA() { + public Instant getSofZmanTfilaGRA() { return getSofZmanTfila(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } @@ -648,15 +646,15 @@ public Date getSofZmanTfilaGRA() { * #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 + * @return the Instant 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 * {@link AstronomicalCalendar} documentation. - * @see #getSofZmanTfila(Date, Date) + * @see #getSofZmanTfila(Instant, Instant) * @see #getShaahZmanisMGA() * @see #getAlos72() */ - public Date getSofZmanTfilaMGA() { + public Instant getSofZmanTfilaMGA() { return getSofZmanTfila(getAlos72(), getTzais72(), true); } @@ -676,7 +674,7 @@ public Date getSofZmanTfilaMGA() { * 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 Geonim - * or some other variant. If the day is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based + * or some other variant. If the day is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. * @@ -690,7 +688,7 @@ public Date getSofZmanTfilaMGA() { * If the zman has a synchronous start and end of the day. If this is false, using a {@link * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @return the Date of the time of Mincha gedola based on the start and end of day times + * @return the Instant of the time of Mincha gedola based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. @@ -700,7 +698,7 @@ public Date getSofZmanTfilaMGA() { * @see #isUseAstronomicalChatzos() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getMinchaGedola(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(getChatzos(), endOfDay, 0.5); } else { @@ -709,7 +707,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 + * A generic method for calculating mincha gedola that calls {@link #getMinchaGedola(Instant, Instant, boolean)} 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. @@ -719,13 +717,13 @@ public Date getMinchaGedola(Date startOfDay, Date endOfDay, boolean synchronous) * @param endOfDay * the end of day for calculating Mincha gedola. This can be sunset or any tzais passed to * this method. - * @return the Date of the latest Mincha gedola based on the start and end of day times passed to this + * @return the Instant of the latest Mincha gedola based on the start and end of day times 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedola(Date, Date, boolean) + * @see #getMinchaGedola(Instant, Instant, boolean) */ - public Date getMinchaGedola(Date startOfDay, Date endOfDay) { + public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { return getMinchaGedola(startOfDay, endOfDay, false); } @@ -744,22 +742,22 @@ public Date getMinchaGedola(Date startOfDay, Date endOfDay) { * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. * - * @see #getMinchaGedola(Date, Date) + * @see #getMinchaGedola(Instant, Instant) * @see #getShaahZmanisGra() * @see #getMinchaKetana() * @see ComprehensiveZmanimCalendar#getMinchaGedolaBaalHatanya() - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as in the + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaGedola() { + public Instant getMinchaGedola() { return getMinchaGedola(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } /** * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half - * an hour before {@link #getMinchaKetana(Date, Date)} or 9 * shaos zmaniyos (temporal hours) after the + * an hour before {@link #getMinchaKetana(Instant, Instant)} or 9 * 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 * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day. @@ -780,7 +778,7 @@ public Date getMinchaGedola() { * If the zman has a synchronous start and end of the day. If this is false, using a {@link * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @return the Date of the time of Mincha ketana based on the start and end of day times + * @return the Instant of the time of Mincha ketana based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. @@ -789,7 +787,7 @@ public Date getMinchaGedola() { * @see ComprehensiveZmanimCalendar#getSamuchLeMinchaKetana16Point1Degrees() * @see ComprehensiveZmanimCalendar#getSamuchLeMinchaKetana72Minutes() */ - public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(getChatzos(), endOfDay, 3); } else { @@ -798,7 +796,7 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay, boolean sync } /** - * A generic method for calculating samuch lemincha ketana that calls {@link #getSamuchLeMinchaKetana(Date, Date, boolean)} + * A generic method for calculating samuch lemincha ketana that calls {@link #getSamuchLeMinchaKetana(Instant, Instant, boolean)} * 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 @@ -807,13 +805,13 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay, boolean sync * @param endOfDay * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais * passed to this method. - * @return the Date of the time of samuch lemincha ketana based on the start and end of day times + * @return the Instant of the time of samuch lemincha ketana based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. - * @see #getSamuchLeMinchaKetana(Date, Date, boolean) + * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) */ - public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay) { + public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay) { return getSamuchLeMinchaKetana(startOfDay, endOfDay, false); } @@ -831,7 +829,7 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay) { * 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Date, Date, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. * @@ -845,12 +843,12 @@ public Date getSamuchLeMinchaKetana(Date startOfDay, Date endOfDay) { * If the zman has a synchronous start and end of the day. If this is false, using a {@link * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @return the Date of the time of Mincha ketana based on the start and end of day times + * @return the Instant of the time of Mincha ketana based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. */ - public Date getMinchaKetana(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(getChatzos(), endOfDay, 3.5); } else { @@ -859,7 +857,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 + * A generic method for calculating mincha ketana that calls {@link #getMinchaKetana(Instant, Instant, boolean)} 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 @@ -868,13 +866,13 @@ public Date getMinchaKetana(Date startOfDay, Date endOfDay, boolean synchronous) * @param endOfDay * the end of day for calculating Mincha ketana. This can be sunset or any tzais passed to * this method. - * @return the Date of the time of Mincha ketana based on the start and end of day times + * @return the Instant of the time of Mincha ketana based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaKetana(Date, Date, boolean) + * @see #getMinchaKetana(Instant, Instant, boolean) */ - public Date getMinchaKetana(Date startOfDay, Date endOfDay) { + public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { return getMinchaKetana(startOfDay, endOfDay, false); } @@ -889,16 +887,16 @@ public Date getMinchaKetana(Date startOfDay, Date endOfDay) { * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} * setting. * - * @see #getMinchaKetana(Date, Date) + * @see #getMinchaKetana(Instant, Instant) * @see #getShaahZmanisGra() * @see #getMinchaGedola() * @see ComprehensiveZmanimCalendar#getMinchaKetanaBaalHatanya() - * @return the Date of the time of mincha ketana. If the calculation can't be computed such as in the + * @return the Instant of the time of mincha ketana. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaKetana() { + public Instant getMinchaKetana() { return getMinchaKetana(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } @@ -915,7 +913,7 @@ public Date getMinchaKetana() { * 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 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 + * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. * @@ -929,12 +927,12 @@ public Date getMinchaKetana() { * If the zman has a synchronous start and end of the day. If this is false, using a {@link * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @return the Date of the time of plag hamincha based on the start and end of day times + * @return the Instant of the time of plag hamincha based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. */ - public Date getPlagHamincha(Date startOfDay, Date endOfDay, boolean synchronous) { + public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { return getHalfDayBasedZman(getChatzos(), endOfDay, 4.75); } else { @@ -943,20 +941,20 @@ public Date getPlagHamincha(Date startOfDay, Date endOfDay, boolean synchronous) } /** - * A generic method for calculating plag hamincha that calls {@link #getPlagHamincha(Date, Date, boolean)} passing + * A generic method for calculating plag hamincha that calls {@link #getPlagHamincha(Instant, Instant, boolean)} 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 plag hamincha. This can be sunrise or any alos passed to this method. * @param endOfDay * the end of day for calculating plag hamincha. This can be sunset or any tzais passed to this method. - * @return the Date of the time of plag hamincha based on the start and end of day times + * @return the Instant of the time of plag hamincha based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. - * @see #getPlagHamincha(Date, Date, boolean) + * @see #getPlagHamincha(Instant, Instant, boolean) */ - public Date getPlagHamincha(Date startOfDay, Date endOfDay) { + public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { return getPlagHamincha(startOfDay, endOfDay, false); } @@ -968,20 +966,20 @@ public Date getPlagHamincha(Date startOfDay, Date endOfDay) { * 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) - * @see #getPlagHamincha(Date, Date) + * @see #getPlagHamincha(Instant, Instant, boolean) + * @see #getPlagHamincha(Instant, Instant) * @see ComprehensiveZmanimCalendar#getPlagHaminchaBaalHatanya() - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getPlagHamincha() { + public Instant getPlagHamincha() { return getPlagHamincha(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } /** - * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) according to + * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) 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 level * sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() @@ -992,7 +990,7 @@ public Date getPlagHamincha() { * 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, {@link Long#MIN_VALUE} will be returned. See * detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getTemporalHour(Date, Date) + * @see #getTemporalHour(Instant, Instant) * @see #getSeaLevelSunrise() * @see #getSeaLevelSunset() * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() @@ -1069,7 +1067,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { } /** - * This is a utility method to determine if the current Date (date-time) passed in has a melacha (work) prohibition. + * This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition. * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. @@ -1084,10 +1082,11 @@ public void setCandleLightingOffset(double candleLightingOffset) { * @see JewishCalendar#hasCandleLighting() * @see JewishCalendar#setInIsrael(boolean) */ - public boolean isAssurBemlacha(Date currentTime, Date tzais, boolean inIsrael) { + public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsrael) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + jewishCalendar.setGregorianDate(getZonedDateTime().getYear(),getZonedDateTime().getMonthValue(), + getZonedDateTime().getDayOfMonth()); + jewishCalendar.setInIsrael(inIsrael); if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getElevationAdjustedSunset()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah @@ -1101,7 +1100,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 shaos zmaniyos passed to the - * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Date, Date)} and cuts down on + * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Instant, Instant)} 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 * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha @@ -1115,13 +1114,13 @@ public boolean isAssurBemlacha(Date currentTime, Date tzais, boolean inIsrael) { * this method. * @param 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) + * @return the Instant 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 * {@link AstronomicalCalendar} documentation. */ - public Date getShaahZmanisBasedZman(Date startOfDay, Date endOfDay, double hours) { + public Instant getShaahZmanisBasedZman(Instant startOfDay, Instant endOfDay, double hours) { long shaahZmanis = getTemporalHour(startOfDay, endOfDay); return getTimeOffset(startOfDay, shaahZmanis * hours); } @@ -1145,9 +1144,9 @@ public Date getShaahZmanisBasedZman(Date startOfDay, Date endOfDay, double hours * explanation on top of the page. */ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) { - Date seaLevelSunrise = getSeaLevelSunrise(); - Date seaLevelSunset = getSeaLevelSunset(); - Date twilight = null; + Instant seaLevelSunrise = getSeaLevelSunrise(); + Instant seaLevelSunset = getSeaLevelSunset(); + Instant twilight = null; if (sunset) { twilight = getSunsetOffsetByDegrees(GEOMETRIC_ZENITH + degrees); } else { @@ -1156,12 +1155,12 @@ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) if (seaLevelSunrise == null || seaLevelSunset == null || twilight == null) { return Double.MIN_VALUE; } - double shaahZmanis = (seaLevelSunset.getTime() - seaLevelSunrise.getTime()) / 12.0; + double shaahZmanis = (seaLevelSunset.toEpochMilli() - seaLevelSunrise.toEpochMilli()) / 12.0; long riseSetToTwilight; if (sunset) { - riseSetToTwilight = twilight.getTime() - seaLevelSunset.getTime(); + riseSetToTwilight = twilight.toEpochMilli() - seaLevelSunset.toEpochMilli(); } else { - riseSetToTwilight = seaLevelSunrise.getTime() - twilight.getTime(); + riseSetToTwilight = seaLevelSunrise.toEpochMilli() - twilight.toEpochMilli(); } return riseSetToTwilight / shaahZmanis; } @@ -1189,14 +1188,14 @@ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) * 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 + * @return the Instant of zman based on calculation of the first or second half of the day. 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 {@link AstronomicalCalendar} documentation. * * @see ComprehensiveZmanimCalendar#getFixedLocalChatzos() */ - public Date getHalfDayBasedZman(Date startOfHalfDay, Date endOfHalfDay, double hours) { + public Instant getHalfDayBasedZman(Instant startOfHalfDay, Instant endOfHalfDay, double hours) { if (startOfHalfDay == null || endOfHalfDay == null) { return null; } @@ -1221,14 +1220,14 @@ public Date getHalfDayBasedZman(Date startOfHalfDay, Date endOfHalfDay, double h * 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, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) * @see #isUseAstronomicalChatzosForOtherZmanim() * @todo Consider adjusting various shaah zmanis times to use this. */ - public long getHalfDayBasedShaahZmanis(Date startOfHalfDay, Date endOfHalfDay) { + public long getHalfDayBasedShaahZmanis(Instant startOfHalfDay, Instant endOfHalfDay) { if (startOfHalfDay == null || endOfHalfDay == null) { return Long.MIN_VALUE; } - return (endOfHalfDay.getTime() - startOfHalfDay.getTime()) / 6; + return (endOfHalfDay.toEpochMilli() - startOfHalfDay.toEpochMilli()) / 6; } } From 5ac3d2a2bff863a63e908f2a92b9f74f053e8f31 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:54:45 -0400 Subject: [PATCH 011/121] Start using java.time classes Breaking changes --- .../zmanim/ComprehensiveZmanimCalendar.java | 850 +++++++++--------- 1 file changed, 433 insertions(+), 417 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 99d96397..f10f4aec 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -15,8 +15,10 @@ */ package com.kosherjava.zmanim; -import java.util.Calendar; -import java.util.Date; +import java.util.Calendar; // FIXME remove once FORWARD can be refactored. +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.time.Instant; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; @@ -39,14 +41,13 @@ * double latitude = 40.0828; // Lakewood, NJ * double longitude = -74.222; // Lakewood, NJ * double elevation = 20; // optional elevation correction in Meters - * // the String parameter in getTimeZone() has to be a valid time zone listed in - * // {@link java.util.TimeZone#getAvailableIDs()} - * TimeZone timeZone = TimeZone.getTimeZone("America/New_York"); - * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, timeZone); + * // the String parameter in getZoneId() has to be a valid ZoneId listed in {@link java.time.ZoneId#getAvailableZoneIds()} + * ZoneId zoneId = ZoneId.of("America/New_York"); + * GeoLocation location = new GeoLocation(locationName, latitude, longitude, elevation, zoneId); * ComprehensiveZmanimCalendar czc = new ComprehensiveZmanimCalendar(location); * // Optionally set the date or it will default to today's date - * czc.getCalendar().set(Calendar.MONTH, Calendar.FEBRUARY); - * czc.getCalendar().set(Calendar.DAY_OF_MONTH, 8); + * ZonedDateTime dateTime = ZonedDateTime.of(1969, Month.FEBRUARY.getValue(), 8, 0, 0, 0, 0, location.getZoneId()); + * czc.setZonedDateTime(dateTime); *

* Note: For locations such as Israel where the beginning and end of daylight savings time can fluctuate from * year to year, if your version of Java does not have an
*

- *  Date alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);
+ * Instant alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14); *

* To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting * 16.1° below the horizon (and ending 16.1° after sunset) the following calculation can be used: * *

- * Date minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5);
+ * Instant minchaGedola = czc.getTimeOffset(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees() * 6.5); *

* or even simpler using the included convenience methods *

- * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees());
+ * Instant minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees()); *

* A little more complex example would be calculating zmanim that rely on a shaah zmanis that is * not present in this library. While a drop more complex, it is still rather easy. An example would be to calculate @@ -80,7 +81,7 @@ * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes. *
*

- * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
+ * Instant plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
  * 				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" @@ -95,13 +96,13 @@ *

  * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
  * 						czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
- * Date sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
+ * Instant sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
  * 					shaahZmanis * 9);
*

* Calculating this sof zman achila according to the GRA * is simplicity itself. *

- * Date sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);
+ * Instant sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9); * *

See documentation from the {@link ZmanimCalendar} parent class

* @@ -776,7 +777,7 @@ public long getShaahZmanis120MinutesZmanis() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. @@ -788,7 +789,7 @@ public long getShaahZmanis120MinutesZmanis() { * @see #getPlagHamincha120Minutes() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha120MinutesZmanis() { + public Instant getPlagHamincha120MinutesZmanis() { return getPlagHamincha(getAlos120Zmanis(), getTzais120Zmanis(), true); } @@ -804,7 +805,7 @@ public Date getPlagHamincha120MinutesZmanis() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. @@ -813,7 +814,7 @@ public Date getPlagHamincha120MinutesZmanis() { * @see #getPlagHamincha26Degrees() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha120Minutes() { + public Instant getPlagHamincha120Minutes() { return getPlagHamincha(getAlos120(), getTzais120(), true); } @@ -840,7 +841,7 @@ public Date getPlagHamincha120Minutes() { * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a * degree-based calculation based on 60 minutes. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. * documentation. @@ -849,7 +850,7 @@ public Date getPlagHamincha120Minutes() { * @see #getPlagHamincha60Minutes() * @see #getShaahZmanis60Minutes() */ - public Date getAlos60() { + public Instant getAlos60() { return getTimeOffset(getElevationAdjustedSunrise(), -60 * MINUTE_MILLIS); } @@ -864,13 +865,13 @@ public Date getAlos60() { * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getShaahZmanisGra() */ - public Date getAlos72Zmanis() { + public Instant getAlos72Zmanis() { return getZmanisBasedOffset(-1.2); } @@ -884,12 +885,12 @@ public Date getAlos72Zmanis() { * dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to walk the * distance of 4 mil. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Date getAlos96() { + public Instant getAlos96() { return getTimeOffset(getElevationAdjustedSunrise(), -96 * MINUTE_MILLIS); } @@ -903,13 +904,13 @@ public Date getAlos96() { * sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used * is {@link #getElevationAdjustedSunrise()} - ({@link #getShaahZmanisGra()} * 1.5). * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getShaahZmanisGra() */ - public Date getAlos90Zmanis() { + public Instant getAlos90Zmanis() { return getZmanisBasedOffset(-1.5); } @@ -923,13 +924,13 @@ public Date getAlos90Zmanis() { * sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link #getElevationAdjustedSunrise()} * - ({@link #getShaahZmanisGra()} * 1.6). * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getShaahZmanisGra() */ - public Date getAlos96Zmanis() { + public Instant getAlos96Zmanis() { return getZmanisBasedOffset(-1.6); } @@ -943,12 +944,12 @@ public Date getAlos96Zmanis() { * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it * takes to walk the distance of 4 mil. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Date getAlos90() { + public Instant getAlos90() { return getTimeOffset(getElevationAdjustedSunrise(), -90 * MINUTE_MILLIS); } @@ -969,7 +970,7 @@ public Date getAlos90() { * too early according to most opinions. There is no current plan to remove this method from the API, and this * deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. @@ -978,7 +979,7 @@ public Date getAlos90() { * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) - public Date getAlos120() { + public Instant getAlos120() { return getTimeOffset(getElevationAdjustedSunrise(), -120 * MINUTE_MILLIS); } @@ -1000,7 +1001,7 @@ public Date getAlos120() { * too early according to most opinions. There is no current plan to remove this method from the API, and this * deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. @@ -1008,7 +1009,7 @@ public Date getAlos120() { * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) - public Date getAlos120Zmanis() { + public Instant getAlos120Zmanis() { return getZmanisBasedOffset(-2.0); } @@ -1027,7 +1028,7 @@ public Date getAlos120Zmanis() { * too early according to most opinions. There is no current plan to remove this method from the API, and this * deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing alos. If the calculation can't be computed such as northern + * @return the Instant representing alos. 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. @@ -1037,7 +1038,7 @@ public Date getAlos120Zmanis() { * @see #getTzais26Degrees() */ @Deprecated (forRemoval=false) - public Date getAlos26Degrees() { + public Instant getAlos26Degrees() { return getSunriseOffsetByDegrees(ZENITH_26_DEGREES); } @@ -1045,13 +1046,13 @@ public Date getAlos26Degrees() { * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the * eastern geometric horizon before sunrise. * - * @return the Date representing alos. If the calculation can't be computed such as northern + * @return the Instant representing alos. 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. * @see #ASTRONOMICAL_ZENITH */ - public Date getAlos18Degrees() { + public Instant getAlos18Degrees() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } @@ -1064,13 +1065,13 @@ public Date getAlos18Degrees() { * "https://hebrewbooks.org/pdfpager.aspx?req=55960&pgnum=258">Yom Valayla Shel Torah, Ch. 34, p. 222 and * Rabbi Yaakov Shakow's Luach Ikvei Hayom. * - * @return the Date representing alos. If the calculation can't be computed such as northern + * @return the Instant representing alos. 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. * @see #ASTRONOMICAL_ZENITH */ - public Date getAlos19Degrees() { + public Instant getAlos19Degrees() { return getSunriseOffsetByDegrees(ZENITH_19_DEGREES); } @@ -1082,14 +1083,14 @@ public Date getAlos19Degrees() { * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux, which * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}. * - * @return the Date representing alos. If the calculation can't be computed such as northern + * @return the Instant representing alos. 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. * @see #ZENITH_19_POINT_8 * @see #getAlos90() */ - public Date getAlos19Point8Degrees() { + public Instant getAlos19Point8Degrees() { return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); } @@ -1101,14 +1102,14 @@ public Date getAlos19Point8Degrees() { * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux, which * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}. * - * @return the Date representing alos. If the calculation can't be computed such as northern + * @return the Instant representing alos. 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. * @see #ZENITH_16_POINT_1 * @see #getAlos72() */ - public Date getAlos16Point1Degrees() { + public Instant getAlos16Point1Degrees() { return getSunriseOffsetByDegrees(ZENITH_16_POINT_1); } @@ -1145,14 +1146,14 @@ public Date getAlos16Point1Degrees() { * this method from the API, and this deprecation is intended to notify developers to add an alert to users of * the risk of using it. * - * @return The Date of misheyakir. If the calculation can't be computed such as northern and + * @return The Instant of misheyakir. 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. * @see #ZENITH_12_POINT_85 */ @Deprecated (forRemoval=false) - public Date getMisheyakir12Point85Degrees() { + public Instant getMisheyakir12Point85Degrees() { return getSunriseOffsetByDegrees(ZENITH_12_POINT_85); } @@ -1165,13 +1166,13 @@ public Date getMisheyakir12Point85Degrees() { * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @todo recalculate. * - * @return the Date of misheyakir. If the calculation can't be computed such as northern and + * @return the Instant of misheyakir. 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. * @see #ZENITH_11_POINT_5 */ - public Date getMisheyakir11Point5Degrees() { + public Instant getMisheyakir11Point5Degrees() { return getSunriseOffsetByDegrees(ZENITH_11_POINT_5); } @@ -1189,7 +1190,7 @@ public Date getMisheyakir11Point5Degrees() { * {@link AstronomicalCalendar} documentation. * @see #ZENITH_11_DEGREES */ - public Date getMisheyakir11Degrees() { + public Instant getMisheyakir11Degrees() { return getSunriseOffsetByDegrees(ZENITH_11_DEGREES); } @@ -1201,13 +1202,13 @@ public Date getMisheyakir11Degrees() { * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox which calculates * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}. * - * @return the Date of misheyakir. If the calculation can't be computed such as + * @return the Instant of misheyakir. 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. * @see #ZENITH_10_POINT_2 */ - public Date getMisheyakir10Point2Degrees() { + public Instant getMisheyakir10Point2Degrees() { return getSunriseOffsetByDegrees(ZENITH_10_POINT_2); } @@ -1232,7 +1233,7 @@ public Date getMisheyakir10Point2Degrees() { * but did not provide a degree-based time. Since this zman depends on the level of light, Rabbi Yaakov Shakow * presented this degree-based calculations to Rabbi Shmuel Kamenetsky who agreed to them. * - * @return the Date of misheyakir. If the calculation can't be computed such as + * @return the Instant of misheyakir. 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. @@ -1240,7 +1241,7 @@ public Date getMisheyakir10Point2Degrees() { * @see #ZENITH_7_POINT_65 * @see #getMisheyakir9Point5Degrees() */ - public Date getMisheyakir7Point65Degrees() { + public Instant getMisheyakir7Point65Degrees() { return getSunriseOffsetByDegrees(ZENITH_7_POINT_65); } @@ -1260,7 +1261,7 @@ public Date getMisheyakir7Point65Degrees() { * this zman depends on the level of light, Rabbi Yaakov Shakow presented these degree-based times to Rabbi Shmuel * Kamenetsky who agreed to them. * - * @return the Date of misheyakir. If the calculation can't be computed such as + * @return the Instant of misheyakir. 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. @@ -1268,7 +1269,7 @@ public Date getMisheyakir7Point65Degrees() { * @see #ZENITH_9_POINT_5 * @see #getMisheyakir7Point65Degrees() */ - public Date getMisheyakir9Point5Degrees() { + public Instant getMisheyakir9Point5Degrees() { return getSunriseOffsetByDegrees(ZENITH_9_POINT_5); } @@ -1281,14 +1282,14 @@ public Date getMisheyakir9Point5Degrees() { * with both being 19.8° below sunrise or sunset. This returns the time of 3 * * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getShaahZmanis19Point8Degrees() * @see #getAlos19Point8Degrees() */ - public Date getSofZmanShmaMGA19Point8Degrees() { + public Instant getSofZmanShmaMGA19Point8Degrees() { return getSofZmanShma(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); } @@ -1301,14 +1302,14 @@ public Date getSofZmanShmaMGA19Point8Degrees() { * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getShaahZmanis16Point1Degrees() * @see #getAlos16Point1Degrees() */ - public Date getSofZmanShmaMGA16Point1Degrees() { + public Instant getSofZmanShmaMGA16Point1Degrees() { return getSofZmanShma(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -1321,14 +1322,14 @@ public Date getSofZmanShmaMGA16Point1Degrees() { * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after * {@link #getAlos18Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getShaahZmanis18Degrees() * @see #getAlos18Degrees() */ - public Date getSofZmanShmaMGA18Degrees() { + public Instant getSofZmanShmaMGA18Degrees() { return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees(), true); } @@ -1342,7 +1343,7 @@ public Date getSofZmanShmaMGA18Degrees() { * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link * #getSofZmanShmaMGA()} and is repeated here for clarity. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1351,7 +1352,7 @@ public Date getSofZmanShmaMGA18Degrees() { * @see #getAlos72() * @see #getSofZmanShmaMGA() */ - public Date getSofZmanShmaMGA72Minutes() { + public Instant getSofZmanShmaMGA72Minutes() { return getSofZmanShmaMGA(); } @@ -1366,7 +1367,7 @@ public Date getSofZmanShmaMGA72Minutes() { * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 * * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1374,7 +1375,7 @@ public Date getSofZmanShmaMGA72Minutes() { * @see #getAlos72Zmanis() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA72MinutesZmanis() { + public Instant getSofZmanShmaMGA72MinutesZmanis() { return getSofZmanShma(getAlos72Zmanis(), getTzais72Zmanis(), true); } @@ -1387,7 +1388,7 @@ public Date getSofZmanShmaMGA72MinutesZmanis() { * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 * * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1395,7 +1396,7 @@ public Date getSofZmanShmaMGA72MinutesZmanis() { * @see #getAlos90() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA90Minutes() { + public Instant getSofZmanShmaMGA90Minutes() { return getSofZmanShma(getAlos90(), getTzais90(), true); } @@ -1409,7 +1410,7 @@ public Date getSofZmanShmaMGA90Minutes() { * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()} * after {@link #getAlos90Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1417,7 +1418,7 @@ public Date getSofZmanShmaMGA90Minutes() { * @see #getAlos90Zmanis() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA90MinutesZmanis() { + public Instant getSofZmanShmaMGA90MinutesZmanis() { return getSofZmanShma(getAlos90Zmanis(), getTzais90Zmanis(), true); } @@ -1430,7 +1431,7 @@ public Date getSofZmanShmaMGA90MinutesZmanis() { * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1438,7 +1439,7 @@ public Date getSofZmanShmaMGA90MinutesZmanis() { * @see #getAlos96() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA96Minutes() { + public Instant getSofZmanShmaMGA96Minutes() { return getSofZmanShma(getAlos96(), getTzais96(), true); } @@ -1452,7 +1453,7 @@ public Date getSofZmanShmaMGA96Minutes() { * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()} * after {@link #getAlos96Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1460,7 +1461,7 @@ public Date getSofZmanShmaMGA96Minutes() { * @see #getAlos96Zmanis() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA96MinutesZmanis() { + public Instant getSofZmanShmaMGA96MinutesZmanis() { return getSofZmanShma(getAlos96Zmanis(), getTzais96Zmanis(), true); } @@ -1481,7 +1482,7 @@ public Date getSofZmanShmaMGA96MinutesZmanis() { * See Yisrael Vehazmanim vol. 1 7:3, page 55 - * 62. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1489,7 +1490,7 @@ public Date getSofZmanShmaMGA96MinutesZmanis() { * @see #getSofZmanTfila2HoursBeforeChatzos() * @see #isUseAstronomicalChatzos() */ - public Date getSofZmanShma3HoursBeforeChatzos() { + public Instant getSofZmanShma3HoursBeforeChatzos() { return getTimeOffset(getChatzos(), -180 * MINUTE_MILLIS); } @@ -1503,7 +1504,7 @@ public Date getSofZmanShma3HoursBeforeChatzos() { * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that * is very much a chumra. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. @@ -1511,7 +1512,7 @@ public Date getSofZmanShma3HoursBeforeChatzos() { * @see #getAlos120() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanShmaMGA120Minutes() { + public Instant getSofZmanShmaMGA120Minutes() { return getSofZmanShma(getAlos120(), getTzais120(), true); } @@ -1530,14 +1531,14 @@ public Date getSofZmanShmaMGA120Minutes() { * Note: Based on this calculation chatzos will not be at midday and {@link * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. * - * @return the Date of the latest zman krias shema based on this day. If the calculation can't + * @return the Instant of the latest zman krias shema based on this day. 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. * @see #getAlos16Point1Degrees() * @see #getSeaLevelSunset() */ - public Date getSofZmanShmaAlos16Point1ToSunset() { + public Instant getSofZmanShmaAlos16Point1ToSunset() { return getSofZmanShma(getAlos16Point1Degrees(), getElevationAdjustedSunset(), false); } @@ -1552,7 +1553,7 @@ public Date getSofZmanShmaAlos16Point1ToSunset() { * Note: Based on this calculation chatzos will not be at midday and {@link * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. * - * @return the Date of the latest zman krias shema based on this calculation. If the + * @return the Instant of the latest zman krias shema based on this calculation. 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 @@ -1560,7 +1561,7 @@ public Date getSofZmanShmaAlos16Point1ToSunset() { * @see #getAlos16Point1Degrees() * @see #getTzaisGeonim7Point083Degrees() */ - public Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { + public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { return getSofZmanShma(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); } @@ -1573,7 +1574,7 @@ public Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. @@ -1582,7 +1583,7 @@ public Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { * @see #getAlos19Point8Degrees() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getSofZmanTfilaMGA19Point8Degrees() { + public Instant getSofZmanTfilaMGA19Point8Degrees() { return getSofZmanTfila(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); } @@ -1595,7 +1596,7 @@ public Date getSofZmanTfilaMGA19Point8Degrees() { * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. @@ -1603,7 +1604,7 @@ public Date getSofZmanTfilaMGA19Point8Degrees() { * @see #getShaahZmanis16Point1Degrees() * @see #getAlos16Point1Degrees() */ - public Date getSofZmanTfilaMGA16Point1Degrees() { + public Instant getSofZmanTfilaMGA16Point1Degrees() { return getSofZmanTfila(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -1616,7 +1617,7 @@ public Date getSofZmanTfilaMGA16Point1Degrees() { * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after * {@link #getAlos18Degrees() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. @@ -1624,7 +1625,7 @@ public Date getSofZmanTfilaMGA16Point1Degrees() { * @see #getShaahZmanis18Degrees() * @see #getAlos18Degrees() */ - public Date getSofZmanTfilaMGA18Degrees() { + public Instant getSofZmanTfilaMGA18Degrees() { return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees(), true); } @@ -1638,7 +1639,7 @@ public Date getSofZmanTfilaMGA18Degrees() { * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity. * - * @return the Date of the latest zman tfila. If the calculation can't be computed such as in + * @return the Instant 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 * {@link AstronomicalCalendar} documentation. @@ -1646,7 +1647,7 @@ public Date getSofZmanTfilaMGA18Degrees() { * @see #getAlos72() * @see #getSofZmanShmaMGA() */ - public Date getSofZmanTfilaMGA72Minutes() { + public Instant getSofZmanTfilaMGA72Minutes() { return getSofZmanTfilaMGA(); } @@ -1659,14 +1660,14 @@ public Date getSofZmanTfilaMGA72Minutes() { * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis72MinutesZmanis() * @see #getAlos72Zmanis() */ - public Date getSofZmanTfilaMGA72MinutesZmanis() { + public Instant getSofZmanTfilaMGA72MinutesZmanis() { return getSofZmanTfila(getAlos72Zmanis(), getTzais72Zmanis(), true); } @@ -1679,14 +1680,14 @@ public Date getSofZmanTfilaMGA72MinutesZmanis() { * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 * * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. * - * @return the Date of the latest zman tfila. If the calculation can't be computed such as in + * @return the Instant 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis90Minutes() * @see #getAlos90() */ - public Date getSofZmanTfilaMGA90Minutes() { + public Instant getSofZmanTfilaMGA90Minutes() { return getSofZmanTfila(getAlos90(), getTzais90(), true); } @@ -1700,14 +1701,14 @@ public Date getSofZmanTfilaMGA90Minutes() { * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after * {@link #getAlos90Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis90MinutesZmanis() * @see #getAlos90Zmanis() */ - public Date getSofZmanTfilaMGA90MinutesZmanis() { + public Instant getSofZmanTfilaMGA90MinutesZmanis() { return getSofZmanTfila(getAlos90Zmanis(), getTzais90Zmanis(), true); } @@ -1720,14 +1721,14 @@ public Date getSofZmanTfilaMGA90MinutesZmanis() { * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 * * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. * - * @return the Date of the latest zman tfila. If the calculation can't be computed such as in + * @return the Instant 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis96Minutes() * @see #getAlos96() */ - public Date getSofZmanTfilaMGA96Minutes() { + public Instant getSofZmanTfilaMGA96Minutes() { return getSofZmanTfila(getAlos96(), getTzais96(), true); } @@ -1741,14 +1742,14 @@ public Date getSofZmanTfilaMGA96Minutes() { * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after * {@link #getAlos96Zmanis() dawn}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis90MinutesZmanis() * @see #getAlos90Zmanis() */ - public Date getSofZmanTfilaMGA96MinutesZmanis() { + public Instant getSofZmanTfilaMGA96MinutesZmanis() { return getSofZmanTfila(getAlos96Zmanis(), getTzais96Zmanis(), true); } @@ -1762,14 +1763,14 @@ public Date getSofZmanTfilaMGA96MinutesZmanis() { * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman * that is very much a chumra. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis120Minutes() * @see #getAlos120() */ - public Date getSofZmanTfilaMGA120Minutes() { + public Instant getSofZmanTfilaMGA120Minutes() { return getSofZmanTfila(getAlos120(), getTzais120(), true); } @@ -1779,14 +1780,14 @@ public Date getSofZmanTfilaMGA120Minutes() { * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours * before {@link ZmanimCalendar#getChatzos()}. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see ZmanimCalendar#getChatzos() * @see #getSofZmanShma3HoursBeforeChatzos() */ - public Date getSofZmanTfila2HoursBeforeChatzos() { + public Instant getSofZmanTfila2HoursBeforeChatzos() { return getTimeOffset(getChatzos(), -120 * MINUTE_MILLIS); } @@ -1803,7 +1804,7 @@ public Date getSofZmanTfila2HoursBeforeChatzos() { * gedola time will be affected by {@link #isUseAstronomicalChatzos()} and not by * {@link #isUseAstronomicalChatzosForOtherZmanim()}. * - * @return the Date of 30 minutes after chatzos. If the calculation can't be computed such as + * @return the Instant of 30 minutes after chatzos. 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 * {@link AstronomicalCalendar} documentation. @@ -1813,7 +1814,7 @@ public Date getSofZmanTfila2HoursBeforeChatzos() { * @see #isUseAstronomicalChatzos() * @see #isUseAstronomicalChatzosForOtherZmanim() */ - public Date getMinchaGedola30Minutes() { + public Instant getMinchaGedola30Minutes() { return getTimeOffset(getChatzos(), MINUTE_MILLIS * 30); } @@ -1824,7 +1825,7 @@ public Date getMinchaGedola30Minutes() { * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}. If {@link * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link #getHalfDayBasedShaahZmanis(Date, Date) half-day based sha'ah zmanis} between {@link #getChatzos()} + * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} * and {@link #getTzais72()} after {@link #getChatzos()}. * * @see #getAlos72() @@ -1833,12 +1834,12 @@ public Date getMinchaGedola30Minutes() { * @see ZmanimCalendar#getMinchaGedola() * @see #getChatzos() * @see #isUseAstronomicalChatzosForOtherZmanim() - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaGedola72Minutes() { + public Instant getMinchaGedola72Minutes() { if (isUseAstronomicalChatzosForOtherZmanim()) { return getHalfDayBasedZman(getChatzos(), getTzais72(), 0.5); } else { @@ -1853,17 +1854,17 @@ public Date getMinchaGedola72Minutes() { * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. If {@link * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link #getHalfDayBasedShaahZmanis(Date, Date) half-day based sha'ah zmanis} between {@link #getChatzos()} + * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} * and {@link #getAlos16Point1Degrees()} after {@link #getChatzos()}. * @see #getShaahZmanis16Point1Degrees() * @see #getMinchaGedola() * @see #getMinchaKetana() - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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. */ - public Date getMinchaGedola16Point1Degrees() { + public Instant getMinchaGedola16Point1Degrees() { if (isUseAstronomicalChatzosForOtherZmanim()) { return getHalfDayBasedZman(getChatzos(), getTzais16Point1Degrees(), 0.5); } else { @@ -1884,7 +1885,7 @@ public Date getMinchaGedola16Point1Degrees() { * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}. * Since calculation of this zman involves chatzos that is offset from the center of the astronomical day, * {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here. - * @return the Date of the mincha gedola. If the calculation can't be computed such as northern and + * @return the Instant of the mincha gedola. 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. @@ -1894,7 +1895,7 @@ public Date getMinchaGedola16Point1Degrees() { * @see #getShaahZmanisAlos16Point1ToTzais3Point7() * @see #getMinchaGedolaGreaterThan30() */ - public Date getMinchaGedolaAhavatShalom() { + public Instant getMinchaGedolaAhavatShalom() { if (getChatzos() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) { return null; } else { @@ -1912,7 +1913,7 @@ public Date getMinchaGedolaAhavatShalom() { * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha time * may be affected by {@link #isUseAstronomicalChatzos()}. * - * @return the Date of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}. + * @return the Instant of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}. * 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 {@link AstronomicalCalendar} documentation. @@ -1921,7 +1922,7 @@ public Date getMinchaGedolaAhavatShalom() { * @see #isUseAstronomicalChatzos() * */ - public Date getMinchaGedolaGreaterThan30() { + public Instant getMinchaGedolaGreaterThan30() { if (getMinchaGedola30Minutes() == null || getMinchaGedola() == null) { return null; } else { @@ -1941,12 +1942,12 @@ public Date getMinchaGedolaGreaterThan30() { * @see #getShaahZmanis16Point1Degrees() * @see #getMinchaGedola() * @see #getMinchaKetana() - * @return the Date of the time of mincha ketana. If the calculation can't be computed such + * @return the Instant 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. */ - public Date getMinchaKetana16Point1Degrees() { + public Instant getMinchaKetana16Point1Degrees() { return getMinchaKetana(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -1960,7 +1961,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 Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Instant 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. @@ -1969,7 +1970,7 @@ public Date getMinchaKetana16Point1Degrees() { * @see #getMinchaGedolaAhavatShalom() * @see #getPlagAhavatShalom() */ - public Date getMinchaKetanaAhavatShalom() { + public Instant getMinchaKetanaAhavatShalom() { return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 2.5); } @@ -1984,12 +1985,12 @@ public Date getMinchaKetanaAhavatShalom() { * @see #getShaahZmanis16Point1Degrees() * @see #getMinchaGedola() * @see #getMinchaKetana() - * @return the Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Instant of the time of mincha ketana. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaKetana72Minutes() { + public Instant getMinchaKetana72Minutes() { return getMinchaKetana(getAlos72(), getTzais72(), true); } @@ -1998,7 +1999,7 @@ public Date getMinchaKetana72Minutes() { * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. @@ -2007,7 +2008,7 @@ public Date getMinchaKetana72Minutes() { * @see #getAlos60() * @see #getTzais60() */ - public Date getPlagHamincha60Minutes() { + public Instant getPlagHamincha60Minutes() { return getPlagHamincha(getAlos60(), getTzais60(), true); } @@ -2023,7 +2024,7 @@ public Date getPlagHamincha60Minutes() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. @@ -2031,7 +2032,7 @@ public Date getPlagHamincha60Minutes() { * @see #getShaahZmanis72Minutes() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha72Minutes() { + public Instant getPlagHamincha72Minutes() { return getPlagHamincha(getAlos72(), getTzais72(), true); } @@ -2047,7 +2048,7 @@ public Date getPlagHamincha72Minutes() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. @@ -2055,7 +2056,7 @@ public Date getPlagHamincha72Minutes() { * @see #getShaahZmanis90Minutes() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha90Minutes() { + public Instant getPlagHamincha90Minutes() { return getPlagHamincha(getAlos90(), getTzais90(), true); } @@ -2071,14 +2072,14 @@ public Date getPlagHamincha90Minutes() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis96Minutes() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha96Minutes() { + public Instant getPlagHamincha96Minutes() { return getPlagHamincha(getAlos96(), getTzais96(), true); } @@ -2093,13 +2094,13 @@ public Date getPlagHamincha96Minutes() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. */ @Deprecated (forRemoval=false) - public Date getPlagHamincha96MinutesZmanis() { + public Instant getPlagHamincha96MinutesZmanis() { return getPlagHamincha(getAlos96Zmanis(), getTzais96Zmanis(), true); } @@ -2114,13 +2115,13 @@ public Date getPlagHamincha96MinutesZmanis() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. */ @Deprecated (forRemoval=false) - public Date getPlagHamincha90MinutesZmanis() { + public Instant getPlagHamincha90MinutesZmanis() { return getPlagHamincha(getAlos90Zmanis(), getTzais90Zmanis(), true); } @@ -2135,13 +2136,13 @@ public Date getPlagHamincha90MinutesZmanis() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. */ @Deprecated (forRemoval=false) - public Date getPlagHamincha72MinutesZmanis() { + public Instant getPlagHamincha72MinutesZmanis() { return getPlagHamincha(getAlos72Zmanis(), getTzais72Zmanis(), true); } @@ -2158,7 +2159,7 @@ public Date getPlagHamincha72MinutesZmanis() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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. @@ -2166,7 +2167,7 @@ public Date getPlagHamincha72MinutesZmanis() { * @see #getShaahZmanis16Point1Degrees() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha16Point1Degrees() { + public Instant getPlagHamincha16Point1Degrees() { return getPlagHamincha(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -2183,7 +2184,7 @@ public Date getPlagHamincha16Point1Degrees() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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. @@ -2191,7 +2192,7 @@ public Date getPlagHamincha16Point1Degrees() { * @see #getShaahZmanis19Point8Degrees() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha19Point8Degrees() { + public Instant getPlagHamincha19Point8Degrees() { return getPlagHamincha(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); } @@ -2208,7 +2209,7 @@ public Date getPlagHamincha19Point8Degrees() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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. @@ -2217,7 +2218,7 @@ public Date getPlagHamincha19Point8Degrees() { * @see #getPlagHamincha120Minutes() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha26Degrees() { + public Instant getPlagHamincha26Degrees() { return getPlagHamincha(getAlos26Degrees(), getTzais26Degrees(), true); } @@ -2234,7 +2235,7 @@ public Date getPlagHamincha26Degrees() { * current plan to remove this method from the API, and this deprecation is intended to alert developers * of the danger of using it. * - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @return the Instant of the time of plag hamincha. 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. @@ -2242,7 +2243,7 @@ public Date getPlagHamincha26Degrees() { * @see #getShaahZmanis18Degrees() */ @Deprecated (forRemoval=false) - public Date getPlagHamincha18Degrees() { + public Instant getPlagHamincha18Degrees() { return getPlagHamincha(getAlos18Degrees(), getTzais18Degrees(), true); } @@ -2256,8 +2257,12 @@ public Date getPlagHamincha18Degrees() { * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this * calculation can occur after sunset, it should only be used lechumra. * + * @deprecated This method should be used lechumra only since it returns a very late time (often after + * shkiah), and if used lekula can result in chillul Shabbos etc. There is no + * current plan to remove this method from the API, and this deprecation is intended to alert developers + * of the danger of using it. * - * @return the Date of the plag. If the calculation can't be computed such as northern and southern + * @return the Instant of the plag. 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. @@ -2266,7 +2271,7 @@ public Date getPlagHamincha18Degrees() { * @see #getSeaLevelSunset() */ @Deprecated (forRemoval=false) - public Date getPlagAlosToSunset() { + public Instant getPlagAlosToSunset() { return getPlagHamincha(getAlos16Point1Degrees(), getElevationAdjustedSunset(), false); } @@ -2280,7 +2285,7 @@ public Date getPlagAlosToSunset() { * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. * - * @return the Date of the plag. If the calculation can't be computed such as northern and + * @return the Instant of the plag. 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. @@ -2288,7 +2293,7 @@ public Date getPlagAlosToSunset() { * @see #getAlos16Point1Degrees() * @see #getTzaisGeonim7Point083Degrees() */ - public Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { + public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { return getPlagHamincha(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); } @@ -2300,7 +2305,7 @@ public Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and * ending at tzais 3.8°. * - * @return the Date of the plag. If the calculation can't be computed such as northern and + * @return the Instant of the plag. 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. @@ -2309,7 +2314,7 @@ public Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { * @see #getMinchaGedolaAhavatShalom() * @see #getMinchaKetanaAhavatShalom() */ - public Date getPlagAhavatShalom() { + public Instant getPlagAhavatShalom() { return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 1.25); } @@ -2328,7 +2333,7 @@ public Date getPlagAhavatShalom() { * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds. * @todo recalculate the above based on equilux/equinox calculations. * - * @return the Date of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} + * @return the Instant of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} * (90°). 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 @@ -2337,7 +2342,7 @@ public Date getPlagAhavatShalom() { * @see #ZENITH_13_POINT_24 * @see #getBainHashmashosRT58Point5Minutes() */ - public Date getBainHashmashosRT13Point24Degrees() { + public Instant getBainHashmashosRT13Point24Degrees() { return getSunsetOffsetByDegrees(ZENITH_13_POINT_24); } @@ -2347,13 +2352,13 @@ public Date getBainHashmashosRT13Point24Degrees() { * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil before tzais or 3 1/4 * mil after sunset. With a mil calculated as 18 minutes, 3.25 * 18 = 58.5 minutes. * - * @return the Date of 58.5 minutes after sunset. If the calculation can't be computed such as in the + * @return the Instant of 58.5 minutes after 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, and one where it does * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * */ - public Date getBainHashmashosRT58Point5Minutes() { + public Instant getBainHashmashosRT58Point5Minutes() { return getTimeOffset(getElevationAdjustedSunset(), 58.5 * MINUTE_MILLIS); } @@ -2362,14 +2367,14 @@ public Date getBainHashmashosRT58Point5Minutes() { * 18-minute mil) before * shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}. * - * @return the Date of the bain hashmashos of Rabbeinu Tam in this calculation. If the + * @return the Instant of the bain hashmashos of Rabbeinu Tam in this calculation. 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. * @see #getTzaisGeonim7Point083Degrees() */ - public Date getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { + public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS); } @@ -2379,19 +2384,19 @@ public Date getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { * alos (calculated as 19.8° before sunrise) and sunrise. This is added to sunset to arrive at the time * for bain hashmashos of Rabbeinu Tam. * - * @return the Date of bain hashmashos of Rabbeinu Tam for this calculation. If the + * @return the Instant of bain hashmashos of Rabbeinu Tam for this calculation. 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. */ - public Date getBainHashmashosRT2Stars() { - Date alos19Point8 = getAlos19Point8Degrees(); - Date sunrise = getElevationAdjustedSunrise(); + public Instant getBainHashmashosRT2Stars() { + Instant alos19Point8 = getAlos19Point8Degrees(); + Instant sunrise = getElevationAdjustedSunrise(); if (alos19Point8 == null || sunrise == null) { return null; } - return getTimeOffset(getElevationAdjustedSunset(), (sunrise.getTime() - alos19Point8.getTime()) * (5 / 18d)); + return getTimeOffset(getElevationAdjustedSunset(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); } /** @@ -2401,13 +2406,13 @@ public Date getBainHashmashosRT2Stars() { * >mil before sunset. According to the Yereim, bain hashmashos starts 3/4 of a mil before sunset and * tzais or nightfall starts at sunset. * - * @return the Date of 18 minutes before sunset. If the calculation can't be computed such as in the + * @return the Instant of 18 minutes before 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, and one where it does * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * @see #getBainHashmashosYereim3Point05Degrees() */ - public Date getBainHashmashosYereim18Minutes() { + public Instant getBainHashmashosYereim18Minutes() { return getTimeOffset(getElevationAdjustedSunset(), -18 * MINUTE_MILLIS); } @@ -2431,7 +2436,7 @@ public Date getBainHashmashosYereim18Minutes() { * "https://kosherjava.com/2020/12/07/the-yereims-bein-hashmashos/">The Yereim's Bein Hashmashos. * * @todo recalculate based on equinox/equilux - * @return the Date of the sun's position 3.05° minutes before sunset. If the calculation can't + * @return the Instant of the sun's position 3.05° minutes before 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, and one where it does not set, a null will be returned. See detailed explanation on * top of the {@link AstronomicalCalendar} documentation. @@ -2441,7 +2446,7 @@ public Date getBainHashmashosYereim18Minutes() { * @see #getBainHashmashosYereim2Point8Degrees() * @see #getBainHashmashosYereim2Point1Degrees() */ - public Date getBainHashmashosYereim3Point05Degrees() { + public Instant getBainHashmashosYereim3Point05Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_3_POINT_05); } @@ -2453,14 +2458,14 @@ public Date getBainHashmashosYereim3Point05Degrees() { * to the Yereim, bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts * at sunset. * - * @return the Date of 16.875 minutes before sunset. If the calculation can't be computed such as in the + * @return the Instant of 16.875 minutes before 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, and one where it does * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * * @see #getBainHashmashosYereim2Point8Degrees() */ - public Date getBainHashmashosYereim16Point875Minutes() { + public Instant getBainHashmashosYereim16Point875Minutes() { return getTimeOffset(getElevationAdjustedSunset(), -16.875 * MINUTE_MILLIS); } @@ -2475,7 +2480,7 @@ public Date getBainHashmashosYereim16Point875Minutes() { * starts at sunset. Details, including how the degrees were calculated can be seen in the documentation of * {@link #getBainHashmashosYereim3Point05Degrees()}. * - * @return the Date of the sun's position 2.8° minutes before sunset. If the calculation can't + * @return the Instant of the sun's position 2.8° minutes before 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, and one where it does not set, a null will be returned. See detailed explanation on * top of the {@link AstronomicalCalendar} documentation. @@ -2485,7 +2490,7 @@ public Date getBainHashmashosYereim16Point875Minutes() { * @see #getBainHashmashosYereim3Point05Degrees() * @see #getBainHashmashosYereim2Point1Degrees() */ - public Date getBainHashmashosYereim2Point8Degrees() { + public Instant getBainHashmashosYereim2Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_8); } @@ -2496,14 +2501,14 @@ public Date getBainHashmashosYereim2Point8Degrees() { * before sunset. According to the Yereim, bain hashmashos starts 3/4 of a mil before sunset and * tzais or nightfall starts at sunset. * - * @return the Date of 13.5 minutes before sunset. If the calculation can't be computed such as in the + * @return the Instant of 13.5 minutes before 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, and one where it does * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * * @see #getBainHashmashosYereim2Point1Degrees() */ - public Date getBainHashmashosYereim13Point5Minutes() { + public Instant getBainHashmashosYereim13Point5Minutes() { return getTimeOffset(getElevationAdjustedSunset(), -13.5 * MINUTE_MILLIS); } @@ -2518,7 +2523,7 @@ public Date getBainHashmashosYereim13Point5Minutes() { * at sunset. Details, including how the degrees were calculated can be seen in the documentation of * {@link #getBainHashmashosYereim3Point05Degrees()}. * - * @return the Date of the sun's position 2.1° minutes before sunset. If the calculation can't be + * @return the Instant of the sun's position 2.1° minutes before 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, and * one where it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. @@ -2528,7 +2533,7 @@ public Date getBainHashmashosYereim13Point5Minutes() { * @see #getBainHashmashosYereim2Point8Degrees() * @see #getBainHashmashosYereim3Point05Degrees() */ - public Date getBainHashmashosYereim2Point1Degrees() { + public Instant getBainHashmashosYereim2Point1Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_1); } @@ -2536,10 +2541,10 @@ public Date getBainHashmashosYereim2Point1Degrees() { * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon. * - * @return the Date representing the time when the sun is 3.7° below sea level. + * @return the Instant representing the time when the sun is 3.7° below sea level. * @see #ZENITH_3_POINT_7 */ - public Date getTzaisGeonim3Point7Degrees() { + public Instant getTzaisGeonim3Point7Degrees() { return getSunsetOffsetByDegrees(ZENITH_3_POINT_7); } @@ -2547,10 +2552,10 @@ public Date getTzaisGeonim3Point7Degrees() { * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon. * - * @return the Date representing the time when the sun is 3.8° below sea level. + * @return the Instant representing the time when the sun is 3.8° below sea level. * @see #ZENITH_3_POINT_8 */ - public Date getTzaisGeonim3Point8Degrees() { + public Instant getTzaisGeonim3Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_3_POINT_8); } @@ -2558,14 +2563,14 @@ public Date getTzaisGeonim3Point8Degrees() { * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon. * - * @return the Date representing the time when the sun is 5.95° below sea level. If the calculation + * @return the Instant representing the time when the sun is 5.95° below sea level. 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. * @see #ZENITH_5_POINT_95 */ - public Date getTzaisGeonim5Point95Degrees() { + public Instant getTzaisGeonim5Point95Degrees() { return getSunsetOffsetByDegrees(ZENITH_5_POINT_95); } @@ -2575,14 +2580,14 @@ public Date getTzaisGeonim5Point95Degrees() { * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} 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 4.61° below sea level. If the calculation + * @return the Instant representing the time when the sun is 4.61° below sea level. 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. * @see #ZENITH_4_POINT_61 */ - public Date getTzaisGeonim4Point61Degrees() { + public Instant getTzaisGeonim4Point61Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_61); } @@ -2592,14 +2597,14 @@ public Date getTzaisGeonim4Point61Degrees() { * 22.5-minute mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} 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 4.37° below sea level. If the calculation + * @return the Instant representing the time when the sun is 4.37° below sea level. 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. * @see #ZENITH_4_POINT_37 */ - public Date getTzaisGeonim4Point37Degrees() { + public Instant getTzaisGeonim4Point37Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_37); } @@ -2611,14 +2616,14 @@ public Date getTzaisGeonim4Point37Degrees() { * zman and should not be relied on without Rabbinical guidance. * * @todo Additional detailed documentation needed. - * @return the Date representing the time when the sun is 5.88° below sea level. If the calculation + * @return the Instant representing the time when the sun is 5.88° below sea level. 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. * @see #ZENITH_5_POINT_88 */ - public Date getTzaisGeonim5Point88Degrees() { + public Instant getTzaisGeonim5Point88Degrees() { return getSunsetOffsetByDegrees(ZENITH_5_POINT_88); } @@ -2629,14 +2634,14 @@ public Date getTzaisGeonim5Point88Degrees() { * 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 + * @return the Instant representing the time when the sun is 4.8° below sea level. 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. * @see #ZENITH_4_POINT_8 */ - public Date getTzaisGeonim4Point8Degrees() { + public Instant getTzaisGeonim4Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_8); } @@ -2650,14 +2655,14 @@ public Date getTzaisGeonim4Point8Degrees() { * computes to 6.45° below the western horizon. * @todo Additional documentation details needed. * - * @return the Date representing the time when the sun is 6.45° below sea level. If the + * @return the Instant representing the time when the sun is 6.45° below sea level. 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. * @see #ZENITH_6_POINT_45 */ - public Date getTzaisGeonim6Point45Degrees() { + public Instant getTzaisGeonim6Point45Degrees() { return getSunsetOffsetByDegrees(ZENITH_6_POINT_45); } @@ -2679,14 +2684,14 @@ public Date getTzaisGeonim6Point45Degrees() { * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and 7.199° * at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for more details. * - * @return the Date representing the time when the sun is 7.083° below sea level. If the + * @return the Instant representing the time when the sun is 7.083° below sea level. 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. * @see #ZENITH_7_POINT_083 */ - public Date getTzaisGeonim7Point083Degrees() { + public Instant getTzaisGeonim7Point083Degrees() { return getSunsetOffsetByDegrees(ZENITH_7_POINT_083); } @@ -2708,14 +2713,14 @@ public Date getTzaisGeonim7Point083Degrees() { * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed * to it. * @todo add hyperlinks to source of Divrei Shalom once it is located. - * @return the Date representing the time when the sun is 7.67° below sea level. If the + * @return the Instant representing the time when the sun is 7.67° below sea level. 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. * @see #ZENITH_7_POINT_67 */ - public Date getTzaisGeonim7Point67Degrees() { + public Instant getTzaisGeonim7Point67Degrees() { return getSunsetOffsetByDegrees(ZENITH_7_POINT_67); } @@ -2723,14 +2728,14 @@ public Date getTzaisGeonim7Point67Degrees() { * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon. * - * @return the Date representing the time when the sun is 8.5° below sea level. If the calculation + * @return the Instant representing the time when the sun is 8.5° below sea level. 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. * @see #ZENITH_8_POINT_5 */ - public Date getTzaisGeonim8Point5Degrees() { + public Instant getTzaisGeonim8Point5Degrees() { return getSunsetOffsetByDegrees(ZENITH_8_POINT_5); } @@ -2739,13 +2744,13 @@ public Date getTzaisGeonim8Point5Degrees() { * "https://www.worldcat.org/oclc/243303103">Luach Itim Lebinah as the stringent time for tzais. It is * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon. * - * @return the Date representing the time when the sun is 9.3° below sea level. If the calculation + * @return the Instant representing the time when the sun is 9.3° below sea level. 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. */ - public Date getTzaisGeonim9Point3Degrees() { + public Instant getTzaisGeonim9Point3Degrees() { return getSunsetOffsetByDegrees(ZENITH_9_POINT_3); } @@ -2760,7 +2765,7 @@ public Date getTzaisGeonim9Point3Degrees() { * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them. * * @todo recalculate based on equinox / equilux. - * @return the Date representing the time when the sun is 9.75° below sea level. If the calculation + * @return the Instant representing the time when the sun is 9.75° below sea level. 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} @@ -2768,7 +2773,7 @@ public Date getTzaisGeonim9Point3Degrees() { * * @see #getTzais60() */ - public Date getTzaisGeonim9Point75Degrees() { + public Instant getTzaisGeonim9Point75Degrees() { return getSunsetOffsetByDegrees(ZENITH_9_POINT_75); } @@ -2781,7 +2786,7 @@ public Date getTzaisGeonim9Point75Degrees() { * for 4 mil after {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link * #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60()}. * - * @return the Date representing 60 minutes after sea level sunset. If the calculation can't be + * @return the Instant 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, * and one where it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. @@ -2790,7 +2795,7 @@ public Date getTzaisGeonim9Point75Degrees() { * @see #getPlagHamincha60Minutes() * @see #getShaahZmanis60Minutes() */ - public Date getTzais60() { + public Instant getTzais60() { return getTimeOffset(getElevationAdjustedSunset(), 60 * MINUTE_MILLIS); } @@ -2803,14 +2808,14 @@ public Date getTzais60() { * 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}) + * @return the Instant representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset}) * 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, and one where it does not set, a null will * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getAteretTorahSunsetOffset() * @see #setAteretTorahSunsetOffset(double) */ - public Date getTzaisAteretTorah() { + public Instant getTzaisAteretTorah() { return getTimeOffset(getElevationAdjustedSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); } @@ -2851,7 +2856,7 @@ public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos * will not be at midday. * - * @return the Date of the latest zman krias shema based on this calculation. If the + * @return the Instant 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 * explanation on top of the {@link AstronomicalCalendar} documentation. @@ -2861,7 +2866,7 @@ public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { * @see #setAteretTorahSunsetOffset(double) * @see #getShaahZmanisAteretTorah() */ - public Date getSofZmanShmaAteretTorah() { + public Instant getSofZmanShmaAteretTorah() { return getSofZmanShma(getAlos72Zmanis(), getTzaisAteretTorah(), false); } @@ -2875,7 +2880,7 @@ public Date getSofZmanShmaAteretTorah() { * {@link #getAlos72Zmanis() alos 72 zmaniyos}. * Note: Based on this calculation chatzos will not be at midday. * - * @return the Date of the latest zman krias shema based on this calculation. If the + * @return the Instant 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 * explanation on top of the {@link AstronomicalCalendar} documentation. @@ -2884,7 +2889,7 @@ public Date getSofZmanShmaAteretTorah() { * @see #getShaahZmanisAteretTorah() * @see #setAteretTorahSunsetOffset(double) */ - public Date getSofZmanTfilaAteretTorah() { + public Instant getSofZmanTfilaAteretTorah() { return getSofZmanTfila(getAlos72Zmanis(), getTzaisAteretTorah(), false); } @@ -2907,12 +2912,12 @@ public Date getSofZmanTfilaAteretTorah() { * @see #getAteretTorahSunsetOffset() * @see #setAteretTorahSunsetOffset(double) * - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaGedolaAteretTorah() { + public Instant getMinchaGedolaAteretTorah() { return getMinchaGedola(getAlos72Zmanis(), getTzaisAteretTorah(), false); } @@ -2934,12 +2939,12 @@ public Date getMinchaGedolaAteretTorah() { * @see #setAteretTorahSunsetOffset(double) * @see #getMinchaGedola() * @see #getMinchaKetana() - * @return the Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Instant of the time of mincha ketana. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaKetanaAteretTorah() { + public Instant getMinchaKetanaAteretTorah() { return getMinchaKetana(getAlos72Zmanis(), getTzaisAteretTorah(), false); } @@ -2952,7 +2957,7 @@ public Date getMinchaKetanaAteretTorah() { * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis() * dawn}. * - * @return the Date of the plag. If the calculation can't be computed such as in the Arctic Circle + * @return the Instant of the plag. 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 {@link AstronomicalCalendar} documentation. * @see #getAlos72Zmanis() @@ -2961,7 +2966,7 @@ public Date getMinchaKetanaAteretTorah() { * @see #setAteretTorahSunsetOffset(double) * @see #getAteretTorahSunsetOffset() */ - public Date getPlagHaminchaAteretTorah() { + public Instant getPlagHaminchaAteretTorah() { return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah(), false); } @@ -2975,13 +2980,13 @@ public Date getPlagHaminchaAteretTorah() { * 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 + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getAlos72Zmanis() */ - public Date getTzais72Zmanis() { + public Instant getTzais72Zmanis() { return getZmanisBasedOffset(1.2); } @@ -2992,13 +2997,13 @@ public Date getTzais72Zmanis() { * 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 * is sunrise or sunset based). - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. A null will also be returned if 0 is passed in, since we can't * tell if it is sunrise or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - private Date getZmanisBasedOffset(double hours) { + private Instant getZmanisBasedOffset(double hours) { long shaahZmanis = getShaahZmanisGra(); if (shaahZmanis == Long.MIN_VALUE || hours == 0) { return null; @@ -3016,13 +3021,13 @@ private Date getZmanisBasedOffset(double hours) { * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth) * zman. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getAlos90Zmanis() */ - public Date getTzais90Zmanis() { + public Instant getTzais90Zmanis() { return getZmanisBasedOffset(1.5); } @@ -3030,13 +3035,13 @@ public Date getTzais90Zmanis() { * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after * {@link #getSeaLevelSunset() sea level sunset}. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getAlos96Zmanis() */ - public Date getTzais96Zmanis() { + public Instant getTzais96Zmanis() { return getZmanisBasedOffset(1.6); } @@ -3049,14 +3054,14 @@ public Date getTzais96Zmanis() { * opinion of Ula who calculated tzais as 5 mil after elevation adjusted shkiah (sunset). A similar * calculation {@link #getTzais19Point8Degrees()} uses solar position* calculations based on this time. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getTzais19Point8Degrees() * @see #getAlos90() */ - public Date getTzais90() { + public Instant getTzais90() { return getTimeOffset(getElevationAdjustedSunset(), 90 * MINUTE_MILLIS); } @@ -3075,7 +3080,7 @@ public Date getTzais90() { * lekula can result in chillul Shabbos etc. There is no current plan to remove this * method from the API, and this deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. * documentation. @@ -3083,7 +3088,7 @@ public Date getTzais90() { * @see #getAlos120() */ @Deprecated (forRemoval=false) - public Date getTzais120() { + public Instant getTzais120() { return getTimeOffset(getElevationAdjustedSunset(), 120 * MINUTE_MILLIS); } @@ -3098,7 +3103,7 @@ public Date getTzais120() { * lekula can result in chillul Shabbos etc. There is no current plan to remove this * method from the API, and this deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. @@ -3107,7 +3112,7 @@ public Date getTzais120() { * @see #getTzais26Degrees() */ @Deprecated (forRemoval=false) - public Date getTzais120Zmanis() { + public Instant getTzais120Zmanis() { return getZmanisBasedOffset(2.0); } @@ -3124,14 +3129,14 @@ public Date getTzais120Zmanis() { * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}. * - * @return the Date representing the time. If the calculation can't be computed such as northern and + * @return the Instant representing the time. 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. * @see #getTzais72() * @see #getAlos16Point1Degrees() for more information on this calculation. */ - public Date getTzais16Point1Degrees() { + public Instant getTzais16Point1Degrees() { return getSunsetOffsetByDegrees(ZENITH_16_POINT_1); } @@ -3146,7 +3151,7 @@ public Date getTzais16Point1Degrees() { * lekula can result in chillul Shabbos etc. There is no current plan to remove this * method from the API, and this deprecation is intended to alert developers of the danger of using it. * - * @return the Date representing the time. If the calculation can't be computed such as northern and + * @return the Instant representing the time. 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. @@ -3154,34 +3159,34 @@ public Date getTzais16Point1Degrees() { * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) - public Date getTzais26Degrees() { + public Instant getTzais26Degrees() { return getSunsetOffsetByDegrees(ZENITH_26_DEGREES); } /** * For information on how this is calculated see the comments on {@link #getAlos18Degrees()} * - * @return the Date representing the time. If the calculation can't be computed such as northern and + * @return the Instant representing the time. 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. * @see #getAlos18Degrees() */ - public Date getTzais18Degrees() { + public Instant getTzais18Degrees() { return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); } /** * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()} * - * @return the Date representing the time. If the calculation can't be computed such as northern and + * @return the Instant representing the time. 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. * @see #getTzais90() * @see #getAlos19Point8Degrees() */ - public Date getTzais19Point8Degrees() { + public Instant getTzais19Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_19_POINT_8); } @@ -3190,13 +3195,13 @@ public Date getTzais19Point8Degrees() { * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how * this is calculated see the comments on {@link #getAlos96()}. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getAlos96() */ - public Date getTzais96() { + public Instant getTzais96() { return getTimeOffset(getElevationAdjustedSunset(), 96 * MINUTE_MILLIS); } @@ -3215,11 +3220,11 @@ public Date getTzais96() { * to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time. * - * @return the Date representing the local chatzos - * @see GeoLocation#getLocalMeanTimeOffset() + * @return the Instant representing the local chatzos + * @see GeoLocation#getLocalMeanTimeOffset(Instant) * @see AstronomicalCalendar#getLocalMeanTime(double) */ - public Date getFixedLocalChatzos() { + public Instant getFixedLocalChatzos() { return getLocalMeanTime(12.0); } @@ -3240,17 +3245,18 @@ public Date getFixedLocalChatzos() { * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at * tzais), the time returned will be alos. If either the alos or tzais parameter * are null, no daytime adjustment will be made. - * @return the Date representing the moment halfway between molad and molad. If the time occurs between + * @return the Instant representing the moment halfway between molad and molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. * @see #getSofZmanKidushLevanaBetweenMoldos() - * @see #getSofZmanKidushLevana15Days(Date, Date) + * @see #getSofZmanKidushLevana15Days(Instant, Instant) * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() */ - public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { + public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana @@ -3263,7 +3269,7 @@ public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { } /** - * Returns the Date of the molad based time if it occurs on the current date. Since Kiddush Levana + * Returns the Instant of the molad based time if it occurs on the current date. Since Kiddush Levana * can only be said during the day, there are parameters to limit it to between alos and tzais. If * the time occurs between alos and tzais, tzais will be returned. * @@ -3282,15 +3288,15 @@ public Date getSofZmanKidushLevanaBetweenMoldos(Date alos, Date tzais) { * @return the molad based time. If the zman does not occur during the current date, null will be * returned. */ - private Date getMoladBasedTime(Date moladBasedTime, Date alos, Date tzais, boolean techila) { - Date lastMidnight = getMidnightLastNight(); - Date midnightTonight = getMidnightTonight(); - if(moladBasedTime.before(lastMidnight) || moladBasedTime.after(midnightTonight)){ // Invalid time, bailout + private Instant getMoladBasedTime(Instant moladBasedTime, Instant alos, Instant tzais, boolean techila) { + Instant lastMidnight = getMidnightLastNight(); + Instant midnightTonight = getMidnightTonight(); + if(moladBasedTime.isBefore(lastMidnight) || moladBasedTime.isAfter(midnightTonight)){ // Invalid time, bailout return null; } else if (alos == null || tzais == null){ // Not enough info to adjust return moladBasedTime; } else { // It's the daytime, get the next/prev night - if (moladBasedTime.after(alos) && moladBasedTime.before(tzais)) { + if (moladBasedTime.isAfter(alos) && moladBasedTime.isBefore(tzais)) { if (techila) { return tzais; } else { @@ -3308,16 +3314,16 @@ private Date getMoladBasedTime(Date moladBasedTime, Date alos, Date tzais, boole * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between * molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. * The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between - * tzais and alos, see {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date)}. + * tzais and alos, see {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}. * - * @return the Date representing the moment halfway between molad and molad. If the time occurs between + * @return the Instant representing the moment halfway between molad and molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this * day, a null will be returned. - * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date) + * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) * @see #getSofZmanKidushLevana15Days() * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() */ - public Date getSofZmanKidushLevanaBetweenMoldos() { + public Instant getSofZmanKidushLevanaBetweenMoldos() { return getSofZmanKidushLevanaBetweenMoldos(null, null); } @@ -3326,7 +3332,7 @@ public Date getSofZmanKidushLevanaBetweenMoldos() { * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the * Rema who brings down the opinion of the Maharil's of calculating - * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of + * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during @@ -3342,17 +3348,19 @@ public Date getSofZmanKidushLevanaBetweenMoldos() { * tzais), the time returned will be alos. If either the alos or tzais parameters * are null, no daytime adjustment will be made. * - * @return the Date representing the moment 15 days after the molad. If the time occurs between alos and + * @return the Instant representing the moment 15 days after the molad. If the time occurs between alos and * tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. * - * @see #getSofZmanKidushLevanaBetweenMoldos(Date, Date) + * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) * @see JewishCalendar#getSofZmanKidushLevana15Days() */ - public Date getSofZmanKidushLevana15Days(Date alos, Date tzais) { + public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will @@ -3368,22 +3376,22 @@ public Date getSofZmanKidushLevana15Days(Date alos, Date tzais) { * the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the * Rema who brings down the opinion of the Maharil's of calculating - * {@link #getSofZmanKidushLevanaBetweenMoldos(Date, Date) half way between molad and molad} is of + * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, * See Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei * Zmanim. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to - * between tzais and alos, see {@link #getSofZmanKidushLevana15Days(Date, Date)}. + * between tzais and alos, see {@link #getSofZmanKidushLevana15Days(Instant, Instant)}. * - * @return the Date representing the moment 15 days after the molad. If the time occurs between + * @return the Instant representing the moment 15 days after the molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. * - * @see #getSofZmanKidushLevana15Days(Date, Date) + * @see #getSofZmanKidushLevana15Days(Instant, Instant) * @see #getSofZmanKidushLevanaBetweenMoldos() * @see JewishCalendar#getSofZmanKidushLevana15Days() * */ - public Date getSofZmanKidushLevana15Days() { + public Instant getSofZmanKidushLevana15Days() { return getSofZmanKidushLevana15Days(null, null); } @@ -3391,15 +3399,15 @@ public Date getSofZmanKidushLevana15Days() { * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the * molad. The time will be returned even if it occurs during the day when Kiddush Levana can't be said. - * Use {@link #getTchilasZmanKidushLevana3Days(Date, Date)} if you want to limit the time to night hours. + * Use {@link #getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours. * - * @return the Date representing the moment 3 days after the molad. If the zman will not occur on this day, a + * @return the Instant representing the moment 3 days after the molad. If the zman will not occur on this day, a * null will be returned. - * @see #getTchilasZmanKidushLevana3Days(Date, Date) + * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) * @see #getTchilasZmanKidushLevana7Days() * @see JewishCalendar#getTchilasZmanKidushLevana3Days() */ - public Date getTchilasZmanKidushLevana3Days() { + public Instant getTchilasZmanKidushLevana3Days() { return getTchilasZmanKidushLevana3Days(null, null); } @@ -3419,17 +3427,19 @@ public Date getTchilasZmanKidushLevana3Days() { * tzais), the time returned will be tzais. If either the alos or tzais parameters * are null, no daytime adjustment will be made. * - * @return the Date representing the moment 3 days after the molad. If the time occurs between alos and + * @return the Instant representing the moment 3 days after the molad. If the time occurs between alos and * tzais, tzais will be returned. If the zman will not occur on this day, a * null will be returned. * @see #getTchilasZmanKidushLevana3Days() - * @see #getTchilasZmanKidushLevana7Days(Date, Date) + * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) * @see JewishCalendar#getTchilasZmanKidushLevana3Days() */ - public Date getTchilasZmanKidushLevana3Days(Date alos, Date tzais) { + public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening @@ -3440,7 +3450,7 @@ public Date getTchilasZmanKidushLevana3Days(Date alos, Date tzais) { return null; } - Date zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true); + Instant zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true); //Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) @@ -3453,21 +3463,23 @@ public Date getTchilasZmanKidushLevana3Days(Date alos, Date tzais) { } /** - * Returns the point in time of Molad as a Date Object. For the traditional day of week, hour, - * minute and chalakim, {@link JewishCalendar#getMoladAsDate()} and the not yet completed + * Returns the point in time of Molad as a Instant Object. For the traditional day of week, hour, + * minute and chalakim, {@link JewishCalendar#getMoladAsInstant()} and the not yet completed * {@link com.kosherjava.zmanim.hebrewcalendar.HebrewDateFormatter} that will have formatting for this. * - * @return the Date representing the moment of the molad. If the molad does not occur on this day, a + * @return the Instant representing the moment of the molad. If the molad does not occur on this day, a * null will be returned. * * @see #getTchilasZmanKidushLevana3Days() - * @see #getTchilasZmanKidushLevana7Days(Date, Date) - * @see JewishCalendar#getMoladAsDate() + * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) + * @see JewishCalendar#getMoladAsInstant() */ - public Date getZmanMolad() { + public Instant getZmanMolad() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on @@ -3475,44 +3487,36 @@ public Date getZmanMolad() { if (jewishCalendar.getJewishDayOfMonth() > 2 && jewishCalendar.getJewishDayOfMonth() < 27) { return null; } - Date molad = getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true); + Instant molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); // deal with molad that happens on the end of the previous month if (molad == null && jewishCalendar.getJewishDayOfMonth() > 26) { jewishCalendar.forward(Calendar.MONTH, 1); - molad = getMoladBasedTime(jewishCalendar.getMoladAsDate(), null, null, true); + molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); } return molad; } /** * Used by Molad based zmanim to determine if zmanim occur during the current day. - * @see #getMoladBasedTime(Date, Date, Date, boolean) + * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) * @return previous midnight */ - private Date getMidnightLastNight() { - Calendar midnight = (Calendar)getCalendar().clone(); - // reset hour, minutes, seconds and millis - midnight.set(Calendar.HOUR_OF_DAY, 0); - midnight.set(Calendar.MINUTE, 0); - midnight.set(Calendar.SECOND, 0); - midnight.set(Calendar.MILLISECOND, 0); - return midnight.getTime(); + private Instant getMidnightLastNight() { + ZonedDateTime midnight = getZonedDateTime().truncatedTo(ChronoUnit.DAYS); + return midnight.toInstant(); } /** * Used by Molad based zmanim to determine if zmanim occur during the current day. - * @see #getMoladBasedTime(Date, Date, Date, boolean) + * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) * @return following midnight */ - private Date getMidnightTonight() { - Calendar midnight = (Calendar)getCalendar().clone(); - midnight.add(Calendar.DAY_OF_YEAR, 1);//roll to tonight - midnight.set(Calendar.HOUR_OF_DAY, 0); - midnight.set(Calendar.MINUTE, 0); - midnight.set(Calendar.SECOND, 0); - midnight.set(Calendar.MILLISECOND, 0); - return midnight.getTime(); + private Instant getMidnightTonight() { + return getZonedDateTime() + .plusDays(1) + .truncatedTo(ChronoUnit.DAYS) + .toInstant(); } /** @@ -3530,17 +3534,17 @@ private Date getMidnightTonight() { * ending at tzais), the time returned will be tzais. If either the alos or * tzais parameters are null, no daytime adjustment will be made. * - * @return the Date representing the moment 7 days after the molad. If the time occurs between alos and + * @return the Instant representing the moment 7 days after the molad. If the time occurs between alos and * tzais, tzais will be returned. If the zman will not occur on this day, a * null will be returned. - * @see #getTchilasZmanKidushLevana3Days(Date, Date) + * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) * @see #getTchilasZmanKidushLevana7Days() * @see JewishCalendar#getTchilasZmanKidushLevana7Days() */ - public Date getTchilasZmanKidushLevana7Days(Date alos, Date tzais) { + public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening @@ -3557,15 +3561,15 @@ public Date getTchilasZmanKidushLevana7Days(Date alos, Date tzais) { /** * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 * days after the molad. The time will be returned even if it occurs during the day when Kiddush Levana - * can't be recited. Use {@link #getTchilasZmanKidushLevana7Days(Date, Date)} if you want to limit the time to night hours. + * can't be recited. Use {@link #getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours. * - * @return the Date representing the moment 7 days after the molad regardless of it is day or night. If the zman + * @return the Instant representing the moment 7 days after the molad regardless of it is day or night. If the zman * will not occur on this day, a null will be returned. - * @see #getTchilasZmanKidushLevana7Days(Date, Date) + * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) * @see JewishCalendar#getTchilasZmanKidushLevana7Days() * @see #getTchilasZmanKidushLevana3Days() */ - public Date getTchilasZmanKidushLevana7Days() { + public Instant getTchilasZmanKidushLevana7Days() { return getTchilasZmanKidushLevana7Days(null, null); } @@ -3580,15 +3584,16 @@ public Date getTchilasZmanKidushLevana7Days() { * * @see ZmanimCalendar#getShaahZmanisGra() * @see ZmanimCalendar#getSofZmanTfilaGRA() - * @return the Date one is allowed eating chametz on Erev Pesach. If it is not erev + * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanAchilasChametzGRA() { + public Instant getSofZmanAchilasChametzGRA() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaGRA(); } else { @@ -3606,7 +3611,7 @@ public Date getSofZmanAchilasChametzGRA() { * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}. If it is not * erev Pesach, a null will be returned. * - * @return the Date of the latest time of eating chametz. If it is not erev Pesach or the + * @return the Instant 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 * the {@link AstronomicalCalendar} documentation. @@ -3614,10 +3619,11 @@ public Date getSofZmanAchilasChametzGRA() { * @see #getAlos72() * @see #getSofZmanTfilaMGA72Minutes() */ - public Date getSofZmanAchilasChametzMGA72Minutes() { + public Instant getSofZmanAchilasChametzMGA72Minutes() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA72Minutes(); } else { @@ -3635,7 +3641,7 @@ public Date getSofZmanAchilasChametzMGA72Minutes() { * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not * erev Pesach, a null will be returned. * - * @return the Date of the latest time of eating chametz. If it is not erev Pesach or the + * @return the Instant 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 * the {@link AstronomicalCalendar} documentation. @@ -3643,10 +3649,12 @@ public Date getSofZmanAchilasChametzMGA72Minutes() { * @see #getAlos72Zmanis() * @see #getSofZmanTfilaMGA72MinutesZmanis() */ - public Date getSofZmanAchilasChametzMGA72MinutesZmanis() { + public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA72MinutesZmanis(); } else { @@ -3663,7 +3671,7 @@ public Date getSofZmanAchilasChametzMGA72MinutesZmanis() { * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after * {@link #getAlos16Point1Degrees() dawn}. If it is not erev Pesach, a null will be returned. * - * @return the Date of the latest time of eating chametz. If it is not erev Pesach or the + * @return the Instant of the latest time of eating chametz. If it is not erev Pesach or 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. @@ -3671,10 +3679,12 @@ public Date getSofZmanAchilasChametzMGA72MinutesZmanis() { * @see #getAlos16Point1Degrees() * @see #getSofZmanTfilaMGA16Point1Degrees() */ - public Date getSofZmanAchilasChametzMGA16Point1Degrees() { + public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA16Point1Degrees(); } else { @@ -3690,15 +3700,16 @@ public Date getSofZmanAchilasChametzMGA16Point1Degrees() { * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. * @see ZmanimCalendar#getShaahZmanisGra() - * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not + * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanBiurChametzGRA() { + public Instant getSofZmanBiurChametzGRA() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getElevationAdjustedSunrise(), getShaahZmanisGra() * 5); } else { @@ -3715,17 +3726,18 @@ public Date getSofZmanBiurChametzGRA() { * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after * {@link #getAlos72() dawn}. If it is not erev Pesach, a null will be returned. - * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not + * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getShaahZmanisMGA() * @see #getAlos72() */ - public Date getSofZmanBiurChametzMGA72Minutes() { + public Instant getSofZmanBiurChametzMGA72Minutes() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos72(), getShaahZmanisMGA() * 5); } else { @@ -3742,17 +3754,18 @@ public Date getSofZmanBiurChametzMGA72Minutes() { * the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link * #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link #getShaahZmanis72MinutesZmanis()} after * {@link #getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be returned. - * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not + * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis72MinutesZmanis() * @see #getAlos72Zmanis() */ - public Date getSofZmanBiurChametzMGA72MinutesZmanis() { + public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 5); } else { @@ -3769,7 +3782,7 @@ public Date getSofZmanBiurChametzMGA72MinutesZmanis() { * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after * {@link #getAlos16Point1Degrees() dawn}. If it is not erev Pesach, a null will be returned. - * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not + * @return the Instant 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 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 @@ -3778,10 +3791,12 @@ public Date getSofZmanBiurChametzMGA72MinutesZmanis() { * @see #getShaahZmanis16Point1Degrees() * @see #getAlos16Point1Degrees() */ - public Date getSofZmanBiurChametzMGA16Point1Degrees() { + public Instant getSofZmanBiurChametzMGA16Point1Degrees() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 5); } else { @@ -3814,7 +3829,7 @@ public Date getSofZmanBiurChametzMGA16Point1Degrees() { * practical purposes, daytime mitzvos like shofar and lulav should not be done until after the * published time for netz / sunrise. * - * @return the Date representing the exact sea level netz amiti (sunrise) time. If the calculation can't be + * @return the Instant representing the exact sea level netz amiti (sunrise) 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, a null will be returned. See detailed explanation on top of the page. * @@ -3823,7 +3838,7 @@ public Date getSofZmanBiurChametzMGA16Point1Degrees() { * @see #getSunsetBaalHatanya() * @see #ZENITH_1_POINT_583 */ - private Date getSunriseBaalHatanya() { + private Instant getSunriseBaalHatanya() { return getSunriseOffsetByDegrees(ZENITH_1_POINT_583); } @@ -3844,7 +3859,7 @@ private Date getSunriseBaalHatanya() { * About Our * Zmanim Calculations @ Chabad.org. * - * @return the Date representing the exact sea level shkiah amiti (sunset) time. If the calculation + * @return the Instant representing the exact sea level shkiah amiti (sunset) 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, a null will be returned. See detailed explanation on top of * the {@link AstronomicalCalendar} documentation. @@ -3854,18 +3869,18 @@ private Date getSunriseBaalHatanya() { * @see #getSunriseBaalHatanya() * @see #ZENITH_1_POINT_583 */ - private Date getSunsetBaalHatanya() { + private Instant getSunsetBaalHatanya() { return getSunsetOffsetByDegrees(ZENITH_1_POINT_583); } /** * A method that returns the Baal Hatanya's - * a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}). This forms the base for the + * a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the * Baal Hatanya's day based calculations that are calculated as a 1.583° 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. - * A method that returns a shaah zmanis ({@link #getTemporalHour(Date, Date) temporal hour}) calculated + * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}) calculated * based on the Baal Hatanya's netz * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti} @@ -3879,7 +3894,7 @@ private Date getSunsetBaalHatanya() { * year where the sun does not rise, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See * detailed explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getTemporalHour(Date, Date) + * @see #getTemporalHour(Instant, Instant) * @see #getSunriseBaalHatanya() * @see #getSunsetBaalHatanya() * @see #ZENITH_1_POINT_583 @@ -3894,12 +3909,12 @@ public long getShaahZmanisBaalHatanya() { * before {@link #getSunrise() sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}. * * @see #ZENITH_16_POINT_9 - * @return The Date of dawn. If the calculation can't be computed such as northern and southern + * @return The Instant of dawn. 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. */ - public Date getAlosBaalHatanya() { + public Instant getAlosBaalHatanya() { return getSunriseOffsetByDegrees(ZENITH_16_POINT_9); } @@ -3910,14 +3925,14 @@ public Date getAlosBaalHatanya() { * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() * netz amiti (sunrise)}. * - * @see ZmanimCalendar#getSofZmanShma(Date, Date) + * @see ZmanimCalendar#getSofZmanShma(Instant, Instant) * @see #getShaahZmanisBaalHatanya() - * @return the Date of the latest zman shema according to the Baal Hatanya. If the calculation + * @return the Instant of the latest zman shema according to the Baal Hatanya. 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 {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanShmaBaalHatanya() { + public Instant getSofZmanShmaBaalHatanya() { return getSofZmanShma(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } @@ -3927,14 +3942,14 @@ public Date getSofZmanShmaBaalHatanya() { * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. * - * @see ZmanimCalendar#getSofZmanTfila(Date, Date) + * @see ZmanimCalendar#getSofZmanTfila(Instant, Instant) * @see #getShaahZmanisBaalHatanya() - * @return the Date of the latest zman tfilah. If the calculation can't be computed such as in + * @return the Instant of the latest zman tfilah. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanTfilaBaalHatanya() { + public Instant getSofZmanTfilaBaalHatanya() { return getSofZmanTfila(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } @@ -3947,15 +3962,16 @@ public Date getSofZmanTfilaBaalHatanya() { * returned. * @see #getShaahZmanisBaalHatanya() * @see #getSofZmanTfilaBaalHatanya() - * @return the Date one is allowed eating chametz on Erev Pesach. If it is not erev + * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanAchilasChametzBaalHatanya() { + public Instant getSofZmanAchilasChametzBaalHatanya() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaBaalHatanya(); } else { @@ -3969,15 +3985,15 @@ public Date getSofZmanAchilasChametzBaalHatanya() { * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be returned. * @see #getShaahZmanisBaalHatanya() - * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not + * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Date getSofZmanBiurChametzBaalHatanya() { + public Instant getSofZmanBiurChametzBaalHatanya() { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getCalendar().get(Calendar.YEAR), getCalendar().get(Calendar.MONTH), - getCalendar().get(Calendar.DAY_OF_MONTH)); + ZonedDateTime zdt = getZonedDateTime(); + jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getSunriseBaalHatanya(), getShaahZmanisBaalHatanya() * 5); } else { @@ -3999,15 +4015,15 @@ public Date getSofZmanBiurChametzBaalHatanya() { * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos minutes after either {@link * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. - * @see #getMinchaGedola(Date, Date) + * @see #getMinchaGedola(Instant, Instant) * @see #getShaahZmanisBaalHatanya() * @see #getMinchaKetanaBaalHatanya() - * @return the Date of the time of mincha gedola according to the Baal Hatanya. If the calculation + * @return the Instant of the time of mincha gedola according to the Baal Hatanya. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaGedolaBaalHatanya() { + public Instant getMinchaGedolaBaalHatanya() { return getMinchaGedola(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } @@ -4020,12 +4036,12 @@ public Date getMinchaGedolaBaalHatanya() { * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos minutes after either {@link * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. - * @return the Date of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}. + * @return the Instant of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}. * 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 {@link AstronomicalCalendar} documentation. */ - public Date getMinchaGedolaBaalHatanyaGreaterThan30() { + public Instant getMinchaGedolaBaalHatanyaGreaterThan30() { if (getMinchaGedola30Minutes() == null || getMinchaGedolaBaalHatanya() == null) { return null; } else { @@ -4043,15 +4059,15 @@ public Date getMinchaGedolaBaalHatanyaGreaterThan30() { * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link * #getSunriseBaalHatanya() netz amiti (sunrise)}. * - * @see #getMinchaKetana(Date, Date) + * @see #getMinchaKetana(Instant, Instant) * @see #getShaahZmanisBaalHatanya() * @see #getMinchaGedolaBaalHatanya() - * @return the Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Instant of the time of mincha ketana. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getMinchaKetanaBaalHatanya() { + public Instant getMinchaKetanaBaalHatanya() { return getMinchaKetana(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } @@ -4061,13 +4077,13 @@ public Date getMinchaKetanaBaalHatanya() { * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. * - * @see #getPlagHamincha(Date, Date) - * @return the Date of the time of plag hamincha. If the calculation can't be computed such as + * @see #getPlagHamincha(Instant, Instant) + * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. */ - public Date getPlagHaminchaBaalHatanya() { + public Instant getPlagHaminchaBaalHatanya() { return getPlagHamincha(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } @@ -4076,13 +4092,13 @@ public Date getPlagHaminchaBaalHatanya() { * (90°) after {@link #getSunset() sunset}. For information on the source of this calculation see * {@link #ZENITH_6_DEGREES}. * - * @return The Date of nightfall. If the calculation can't be computed such as northern and southern + * @return The Instant of nightfall. 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. * @see #ZENITH_6_DEGREES */ - public Date getTzaisBaalHatanya() { + public Instant getTzaisBaalHatanya() { return getSunsetOffsetByDegrees(ZENITH_6_DEGREES); } @@ -4094,15 +4110,15 @@ public Date getTzaisBaalHatanya() { * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getAlos18Degrees() * @see #getFixedLocalChatzos() - * @see ZmanimCalendar#getHalfDayBasedZman(Date, Date, double) + * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { + public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzos(), 3); } @@ -4114,15 +4130,15 @@ public Date getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getAlos16Point1Degrees() * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { + public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzos(), 3); } @@ -4135,15 +4151,15 @@ public Date getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getAlos90() * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { + public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos90(), getFixedLocalChatzos(), 3); } @@ -4156,15 +4172,15 @@ public Date getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getAlos72() * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { + public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos72(), getFixedLocalChatzos(), 3); } @@ -4176,15 +4192,15 @@ public Date getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos * zmaniyos (solar hours) after sunrise or half of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getSunrise() * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanShmaGRASunriseToFixedLocalChatzos() { + public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { return getHalfDayBasedZman(getElevationAdjustedSunrise(), getFixedLocalChatzos(), 3); } @@ -4196,15 +4212,15 @@ public Date getSofZmanShmaGRASunriseToFixedLocalChatzos() { * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * - * @return the Date of the latest zman krias shema. If the calculation can't be computed such + * @return the Instant of the latest zman krias shema. 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. * @see #getSunrise() * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Date, Date, double) + * @see #getHalfDayBasedZman(Instant, Instant, double) */ - public Date getSofZmanTfilaGRASunriseToFixedLocalChatzos() { + public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { return getHalfDayBasedZman(getElevationAdjustedSunrise(), getFixedLocalChatzos(), 4); } @@ -4214,7 +4230,7 @@ public Date getSofZmanTfilaGRASunriseToFixedLocalChatzos() { * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA calculated as 30 minutes after {@link #getFixedLocalChatzos() fixed * local chatzos}. * - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. @@ -4223,7 +4239,7 @@ public Date getSofZmanTfilaGRASunriseToFixedLocalChatzos() { * @see #getFixedLocalChatzos() * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset */ - public Date getMinchaGedolaGRAFixedLocalChatzos30Minutes() { + public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { return getTimeOffset(getFixedLocalChatzos(), MINUTE_MILLIS * 30); } @@ -4234,7 +4250,7 @@ public Date getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * to the GRA that is 3.5 shaos zmaniyos (solar * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}. * - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. @@ -4242,9 +4258,9 @@ public Date getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * @see #getMinchaGedola() * @see #getFixedLocalChatzos() * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes - * @see ZmanimCalendar#getHalfDayBasedZman(Date, Date, double) + * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) */ - public Date getMinchaKetanaGRAFixedLocalChatzosToSunset() { + public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { return getHalfDayBasedZman(getFixedLocalChatzos(), getElevationAdjustedSunset(), 3.5); } @@ -4254,7 +4270,7 @@ public Date getMinchaKetanaGRAFixedLocalChatzosToSunset() { * GRA that the day ends at sunset and is 4.75 shaos * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}. * - * @return the Date of the time of mincha gedola. If the calculation can't be computed such as + * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. @@ -4263,9 +4279,9 @@ public Date getMinchaKetanaGRAFixedLocalChatzosToSunset() { * @see #getFixedLocalChatzos() * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes - * @see ZmanimCalendar#getHalfDayBasedZman(Date, Date, double) + * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) */ - public Date getPlagHaminchaGRAFixedLocalChatzosToSunset() { + public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { return getHalfDayBasedZman(getFixedLocalChatzos(), getElevationAdjustedSunset(), 4.75); } @@ -4275,12 +4291,12 @@ public Date getPlagHaminchaGRAFixedLocalChatzosToSunset() { * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should * not be used for latitudes other than ones similar to the latitude of the NY area. * - * @return the Date representing the time. If the calculation can't be computed such as in the Arctic + * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Date getTzais50() { + public Instant getTzais50() { return getTimeOffset(getElevationAdjustedSunset(), 50 * MINUTE_MILLIS); } @@ -4295,14 +4311,14 @@ public Date getTzais50() { * "https://hebrewbooks.org/pdfpager.aspx?req=60388&pgnum=34">249:2. * * @see #getShaahZmanisGra() - * @see #getSamuchLeMinchaKetana(Date, Date, boolean) + * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) * @see #isUseAstronomicalChatzosForOtherZmanim() - * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such + * @return the Instant of the time of samuch lemincha 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. */ - public Date getSamuchLeMinchaKetanaGRA() { + public Instant getSamuchLeMinchaKetanaGRA() { return getSamuchLeMinchaKetana(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); } @@ -4316,14 +4332,14 @@ public Date getSamuchLeMinchaKetanaGRA() { * alos 16.1°}. See the Mechaber and Mishna * Berurah 232 and 249:2. * - * @see #getSamuchLeMinchaKetana(Date, Date, boolean) + * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) * @see #getShaahZmanis16Point1Degrees() - * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such + * @return the Instant of the time of samuch lemincha 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. */ - public Date getSamuchLeMinchaKetana16Point1Degrees() { + public Instant getSamuchLeMinchaKetana16Point1Degrees() { return getSamuchLeMinchaKetana(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -4337,14 +4353,14 @@ public Date getSamuchLeMinchaKetana16Point1Degrees() { * "https://hebrewbooks.org/pdfpager.aspx?req=60387&st=&pgnum=294">Mechaber and Mishna Berurah 232 and 249:2. * - * @see #getSamuchLeMinchaKetana(Date, Date, boolean) + * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) * @see #getShaahZmanis72Minutes() - * @return the Date of the time of samuch lemincha ketana. If the calculation can't be computed such + * @return the Instant of the time of samuch lemincha 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. */ - public Date getSamuchLeMinchaKetana72Minutes() { + public Instant getSamuchLeMinchaKetana72Minutes() { return getSamuchLeMinchaKetana(getAlos72(), getTzais72(), true); } } From 84fa545f45b4629ee39a817529a450d49432ebd1 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 17:58:31 -0400 Subject: [PATCH 012/121] Start using java.time classes Breaking changes --- .../zmanim/hebrewcalendar/JewishDate.java | 87 ++++++++++--------- 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index eb47d309..d56ee85d 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2011 - 2024 Eliyahu Hershfeld + * Copyright (C) 2011 - 2026 Eliyahu Hershfeld * Copyright (C) September 2002 Avrom Finkelstien * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General @@ -17,7 +17,9 @@ package com.kosherjava.zmanim.hebrewcalendar; import java.time.LocalDate; -import java.util.Date; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.Instant; import java.util.Calendar; import java.util.GregorianCalendar; @@ -52,7 +54,7 @@ * @see java.util.Date * @see java.util.Calendar * @author © Avrom Finkelstien 2002 - * @author © Eliyahu Hershfeld 2011 - 2024 + * @author © Eliyahu Hershfeld 2011 - 2026 */ public class JewishDate implements Comparable, Cloneable { /** @@ -976,25 +978,25 @@ public JewishDate() { /** * A constructor that initializes the date to the {@link java.util.Date Date} parameter. * - * @param date - * the Date to set the calendar to + * @param instant + * the Instant to set the calendar to * @throws IllegalArgumentException * if the date would fall prior to the January 1, 1 AD */ - public JewishDate(Date date) { - setDate(date); + public JewishDate(Instant instant) { + setDate(instant); } /** * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. * - * @param calendar - * the Calendar to set the calendar to + * @param zonedDateTime + * the ZonedDateTime to set the calendar to * @throws IllegalArgumentException * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ - public JewishDate(Calendar calendar) { - setDate(calendar); + public JewishDate(ZonedDateTime zonedDateTime) { + setDate(zonedDateTime); } /** @@ -1012,37 +1014,45 @@ public JewishDate(LocalDate localDate) { /** * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. * - * @param calendar - * the Calendar to set the calendar to + * @param zonedDateTime + * the ZonedDateTime to set the calendar to * @throws IllegalArgumentException * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ - public void setDate(Calendar calendar) { - if (calendar.get(Calendar.ERA) == GregorianCalendar.BC) { - throw new IllegalArgumentException("Calendars with a BC era are not supported. The year " - + calendar.get(Calendar.YEAR) + " BC is invalid."); - } - gregorianMonth = calendar.get(Calendar.MONTH) + 1; - gregorianDayOfMonth = calendar.get(Calendar.DATE); - gregorianYear = calendar.get(Calendar.YEAR); - gregorianAbsDate = gregorianDateToAbsDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); // init the date - absDateToJewishDate(); + public void setDate(ZonedDateTime zonedDateTime) { + int year = zonedDateTime.getYear(); - dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; // set day of week + if (year <= 0) { + throw new IllegalArgumentException( + "Calendars with a BC era are not supported. The year " + + year + " BC is invalid." + ); + } + + gregorianYear = year; + gregorianMonth = zonedDateTime.getMonthValue(); // 1 = January + gregorianDayOfMonth = zonedDateTime.getDayOfMonth(); + + // initialize absolute date + gregorianAbsDate = gregorianDateToAbsDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); + + // convert to Jewish date + absDateToJewishDate(); + + // day of week (same calculation as original) + dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; } /** - * Sets the date based on a {@link java.util.Date Date} object. Modifies the Jewish date as well. + * Sets the date based on a {@link java.time.Instant Instant} object. Modifies the Jewish date as well. * - * @param date - * the Date to set the calendar to + * @param instant + * the Instant to set the calendar to * @throws IllegalArgumentException * if the date would fall prior to the year 1 AD */ - public void setDate(Date date) { - Calendar cal = Calendar.getInstance(); - cal.setTime(date); - setDate(cal); + public void setDate(Instant instant) { + setDate(instant.atZone(ZoneId.systemDefault())); } /** @@ -1054,9 +1064,8 @@ public void setDate(Date date) { * if the date would fall prior to the year 1 AD */ public void setDate(LocalDate localDate) { - Calendar cal = Calendar.getInstance(); - cal.set(localDate.getYear(), localDate.getMonthValue() - 1, localDate.getDayOfMonth()); - setDate(cal); + ZonedDateTime zdt = localDate.atStartOfDay(ZoneId.systemDefault()); + setDate(zdt); } /** @@ -1197,8 +1206,8 @@ public LocalDate getLocalDate() { * Resets this date to the current system date. */ public void resetDate() { - Calendar calendar = Calendar.getInstance(); - setDate(calendar); + ZonedDateTime zdt = ZonedDateTime.now(); + setDate(zdt); } /** @@ -1234,7 +1243,7 @@ public String toString() { * @see Calendar#add(int, int) * @see Calendar#roll(int, int) */ - public void forward(int field, int amount) { + public void forward(int field, int amount) { //FIXME first param should be converted from the Calendar.DATE if (field != Calendar.DATE && field != Calendar.MONTH && field != Calendar.YEAR) { throw new IllegalArgumentException("Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported."); } @@ -1401,7 +1410,7 @@ public int compareTo(JewishDate jewishDate) { * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based. */ public int getGregorianMonth() { - return gregorianMonth - 1; + return gregorianMonth - 1; //FIXME } /** @@ -1471,7 +1480,7 @@ public int getDayOfWeek() { */ public void setGregorianMonth(int month) { validateGregorianMonth(month); - setInternalGregorianDate(gregorianYear, month + 1, gregorianDayOfMonth); + setInternalGregorianDate(gregorianYear, month + 1, gregorianDayOfMonth); //FIXME } /** From d103d3deac29db5ce4a7520b4271e6b80467bfe2 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 18:01:04 -0400 Subject: [PATCH 013/121] Start using java.time classes, remove deprecated methods Breaking changes --- .../zmanim/hebrewcalendar/JewishCalendar.java | 312 ++++-------------- 1 file changed, 68 insertions(+), 244 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index 8f05041a..d1dae9fd 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -17,12 +17,13 @@ */ package com.kosherjava.zmanim.hebrewcalendar; -import com.kosherjava.zmanim.util.GeoLocation; - +import java.time.Duration; +import java.time.Instant; import java.time.LocalDate; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; /** * The JewishCalendar extends the JewishDate class and adds calendar methods. @@ -42,7 +43,7 @@ * @see java.util.Calendar * @author © Y. Paritcher 2019 - 2022 * @author © Avrom Finkelstien 2002 - * @author © Eliyahu Hershfeld 2011 - 2024 + * @author © Eliyahu Hershfeld 2011 - 2026 */ public class JewishCalendar extends JewishDate { /** The 14th day of Nissan, the day before Pesach (Passover).*/ @@ -256,21 +257,21 @@ public JewishCalendar() { /** * A constructor that initializes the date to the {@link java.util.Date Date} parameter. * - * @param date - * the Date to set the calendar to + * @param instant + * the Instant to set the calendar to */ - public JewishCalendar(Date date) { - super(date); + public JewishCalendar(Instant instant) { + super(instant); } /** * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. * - * @param calendar - * the Calendar to set the calendar to + * @param zonedDateTime + * the ZonedDateTime to set the calendar to */ - public JewishCalendar(Calendar calendar) { - super(calendar); + public JewishCalendar(ZonedDateTime zonedDateTime) { + super(zonedDateTime); } /** @@ -1230,27 +1231,41 @@ public boolean isTishaBav() { * * @return the Date representing the moment of the molad in Yerushalayim standard time (GMT + 2) */ - public Date getMoladAsDate() { - JewishDate molad = getMolad(); - String locationName = "Jerusalem, Israel"; + public Instant getMoladAsInstant() { + JewishDate molad = getMolad(); + + // Har Habayis coordinates + //double latitude = 31.778; + double longitude = 35.2354; + + // Standard time offset for Jerusalem: GMT+2 + ZoneOffset jerusalemStandardOffset = ZoneOffset.ofHours(2); + + // Compute molad seconds from chalakim + double moladSeconds = molad.getMoladChalakim() * 10.0 / 3.0; + int seconds = (int) moladSeconds; + int millis = (int) ((moladSeconds - seconds) * 1000); + + // Construct ZonedDateTime in standard time (GMT+2) + ZonedDateTime moladZdt = ZonedDateTime.of( + molad.getGregorianYear(), + molad.getGregorianMonth() +1, // 1-based FIXME + molad.getGregorianDayOfMonth(), + molad.getMoladHours(), + molad.getMoladMinutes(), + seconds, + millis * 1_000_000, // nanos + jerusalemStandardOffset + ); - double latitude = 31.778; // Har Habayis latitude - double longitude = 35.2354; // Har Habayis longitude + // Compute local mean time offset in milliseconds (example: 20.94 minutes = 1256400 ms) + long localMeanOffsetMillis = (long) ((longitude - 35.0) * 4 * 60 * 1000); - // The raw molad Date (point in time) must be generated using standard time. Using "Asia/Jerusalem" timezone will result in the time - // being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual time in DST will be done by the date - // formatter class used to display the Date. - TimeZone yerushalayimStandardTZ = TimeZone.getTimeZone("GMT+2"); - GeoLocation geo = new GeoLocation(locationName, latitude, longitude, yerushalayimStandardTZ); - Calendar cal = Calendar.getInstance(geo.getTimeZone()); - cal.clear(); - double moladSeconds = molad.getMoladChalakim() * 10 / (double) 3; - cal.set(molad.getGregorianYear(), molad.getGregorianMonth(), molad.getGregorianDayOfMonth(), - molad.getMoladHours(), molad.getMoladMinutes(), (int) moladSeconds); - cal.set(Calendar.MILLISECOND, (int) (1000 * (moladSeconds - (int) moladSeconds))); - // subtract local time difference of 20.94 minutes (20 minutes and 56.496 seconds) to get to Standard time - cal.add(Calendar.MILLISECOND, -1 * (int) geo.getLocalMeanTimeOffset()); - return cal.getTime(); + // Apply offset using ChronoUnit.MILLIS + moladZdt = moladZdt.minus(localMeanOffsetMillis, ChronoUnit.MILLIS); + + // Return precise Instant + return moladZdt.toInstant(); } /** @@ -1263,12 +1278,8 @@ public Date getMoladAsDate() { * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana3Days() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date) */ - public Date getTchilasZmanKidushLevana3Days() { - Date molad = getMoladAsDate(); - Calendar cal = Calendar.getInstance(); - cal.setTime(molad); - cal.add(Calendar.HOUR, 72); // 3 days after the molad - return cal.getTime(); + public Instant getTchilasZmanKidushLevana3Days() { + return getMoladAsInstant().plus(Duration.ofHours(72)); // 3 days after the molad } /** @@ -1283,12 +1294,8 @@ public Date getTchilasZmanKidushLevana3Days() { * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana7Days() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date) */ - public Date getTchilasZmanKidushLevana7Days() { - Date molad = getMoladAsDate(); - Calendar cal = Calendar.getInstance(); - cal.setTime(molad); - cal.add(Calendar.HOUR, 168); // 7 days after the molad - return cal.getTime(); + public Instant getTchilasZmanKidushLevana7Days() { + return getMoladAsInstant().plus(Duration.ofHours(168)); // 7 days after the molad } /** @@ -1306,18 +1313,18 @@ public Date getTchilasZmanKidushLevana7Days() { * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date) */ - public Date getSofZmanKidushLevanaBetweenMoldos() { - Date molad = getMoladAsDate(); - Calendar cal = Calendar.getInstance(); - cal.setTime(molad); - // add half the time between molad and molad (half of 29 days, 12 hours and 793 chalakim (44 minutes, 3.3 - // seconds), or 14 days, 18 hours, 22 minutes and 666 milliseconds). Add it as hours, not days, to avoid - // DST/ST crossover issues. - cal.add(Calendar.HOUR, (24 * 14) + 18); - cal.add(Calendar.MINUTE, 22); - cal.add(Calendar.SECOND, 1); - cal.add(Calendar.MILLISECOND, 666); - return cal.getTime(); + public Instant getSofZmanKidushLevanaBetweenMoldos() { + Instant molad = getMoladAsInstant(); + + // Duration for half of the lunar month: + // 14 days, 18 hours, 22 minutes, 1 second, 666 milliseconds + Duration halfLunarMonth = Duration.ofDays(14) + .plusHours(18) + .plusMinutes(22) + .plusSeconds(1) + .plusMillis(666); + + return molad.plus(halfLunarMonth); } /** @@ -1337,12 +1344,8 @@ public Date getSofZmanKidushLevanaBetweenMoldos() { * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevana15Days() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date) */ - public Date getSofZmanKidushLevana15Days() { - Date molad = getMoladAsDate(); - Calendar cal = Calendar.getInstance(); - cal.setTime(molad); - cal.add(Calendar.HOUR, 24 * 15); //15 days after the molad. Add it as hours, not days, to avoid DST/ST crossover issues. - return cal.getTime(); + public Instant getSofZmanKidushLevana15Days() { + return getMoladAsInstant().plus(Duration.ofHours(24 * 15)); } /** @@ -1381,9 +1384,9 @@ public Daf getDafYomiYerushalmi() { * * @return the number of elapsed days since tekufas Tishrei. * - * @see #isVeseinTalUmatarStartDate() - * @see #isVeseinTalUmatarStartingTonight() - * @see #isVeseinTalUmatarRecited() + * @see com.kosherjava.zmanim.hebrewcalendar.TefilaRules#isVeseinTalUmatarStartDate(JewishCalendar) + * @see com.kosherjava.zmanim.hebrewcalendar.TefilaRules#isVeseinTalUmatarStartingTonight(JewishCalendar) + * @see com.kosherjava.zmanim.hebrewcalendar.TefilaRules#isYaalehVeyavoRecited(JewishCalendar) */ public int getTekufasTishreiElapsedDays() { // Days since Rosh Hashana year 1. Add 1/2 day as the first tekufas tishrei was 9 hours into the day. This allows all @@ -1393,185 +1396,6 @@ public int getTekufasTishreiElapsedDays() { double solar = (getJewishYear() - 1) * 365.25; return (int) Math.floor(days - solar); } - - /** - * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar - * Livracha (Sheailas Geshamim). In Israel this is the 7th day of Marcheshvan. Outside - * Israel recitation starts on the evening of December 4th (or 5th if it is the year before a civil leap year) - * in the 21st century and shifts a day forward every century not evenly divisible by 400. This method will - * return true if vesein tal umatar on the current Jewish date that starts on the previous night, so - * Dec 5/6 will be returned by this method in the 21st century. vesein tal umatar is not recited on - * Shabbos and the start date will be delayed a day when the start day is on a Shabbos (this - * can only occur out of Israel). - * - * @deprecated Use {@link TefilaRules#isVeseinTalUmatarStartDate(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar - * Livracha (Sheailas Geshamim)). - * - * @see #isVeseinTalUmatarStartingTonight() - * @see #isVeseinTalUmatarRecited() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isVeseinTalUmatarStartDate() { - if (inIsrael) { - // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan - return getJewishMonth() == CHESHVAN && getJewishDayOfMonth() == 7; - } else { - if (getDayOfWeek() == Calendar.SATURDAY) { //Not recited on Friday night - return false; - } - if (getDayOfWeek() == Calendar.SUNDAY) { // When starting on Sunday, it can be the start date or delayed from Shabbos - return getTekufasTishreiElapsedDays() == 48 || getTekufasTishreiElapsedDays() == 47; - } else { - return getTekufasTishreiElapsedDays() == 47; - } - } - } - - /** - * Returns true if tonight is the first night to start reciting Vesein Tal Umatar Livracha ( - * Sheailas Geshamim). In Israel this is the 7th day of Marcheshvan (so the 6th will return - * true). Outside Israel recitation starts on the evening of December 4th (or 5th if it is the year before a - * civil leap year) in the 21st century and shifts a day forward every century not evenly divisible by 400. - * Vesein tal umatar is not recited on Shabbos and the start date will be delayed a day when - * the start day is on a Shabbos (this can only occur out of Israel). - * - * @deprecated Use {@link TefilaRules#isVeseinTalUmatarStartingTonight(JewishCalendar)} instead. This method - * will be removed in the v3.0 release. - * - * @return true if it is the first Jewish day (starting the prior evening of reciting Vesein Tal Umatar - * Livracha (Sheailas Geshamim)). - * - * @see #isVeseinTalUmatarStartDate() - * @see #isVeseinTalUmatarRecited() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isVeseinTalUmatarStartingTonight() { - if (inIsrael) { - // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan - return getJewishMonth() == CHESHVAN && getJewishDayOfMonth() == 6; - } else { - if (getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night - return false; - } - if (getDayOfWeek() == Calendar.SATURDAY) { // When starting on motzai Shabbos, it can be the start date or delayed from Friday night - return getTekufasTishreiElapsedDays() == 47 || getTekufasTishreiElapsedDays() == 46; - } else { - return getTekufasTishreiElapsedDays() == 46; - } - } - } - - /** - * Returns if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. This will return - * true for the entire season, even on Shabbos when it is not recited. - * - * @deprecated Use {@link TefilaRules#isVeseinTalUmatarRecited(JewishCalendar)} instead. This method will - * be removed in the v3.0 release. - * - * @return true if Vesein Tal Umatar Livracha (Sheailas Geshamim) is recited. - * - * @see #isVeseinTalUmatarStartDate() - * @see #isVeseinTalUmatarStartingTonight() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isVeseinTalUmatarRecited() { - if (getJewishMonth() == NISSAN && getJewishDayOfMonth() < 15) { - return true; - } - if (getJewishMonth() < CHESHVAN) { - return false; - } - if (inIsrael) { - return getJewishMonth() != CHESHVAN || getJewishDayOfMonth() >= 7; - } else { - return getTekufasTishreiElapsedDays() >= 47; - } - } - - /** - * Returns if Vesein Beracha is recited. It is recited from 15 Nissan to the point that {@link - * #isVeseinTalUmatarRecited() vesein tal umatar is recited}. - * - * @deprecated Use {@link TefilaRules#isVeseinBerachaRecited(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if Vesein Beracha is recited. - * - * @see #isVeseinTalUmatarRecited() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isVeseinBerachaRecited() { - return !isVeseinTalUmatarRecited(); - } - - /** - * Returns if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. The date is 22 Tishrei. - * - * @deprecated Use {@link TefilaRules#isMashivHaruachStartDate(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if the date is the start date for reciting Mashiv Haruach Umorid Hageshem. - * - * @see #isMashivHaruachEndDate() - * @see #isMashivHaruachRecited() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isMashivHaruachStartDate() { - return getJewishMonth() == TISHREI && getJewishDayOfMonth() == 22; - } - - /** - * Returns if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. The date is 15 Nissan. - * - * @deprecated Use {@link TefilaRules#isMashivHaruachEndDate(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if the date is the end date for reciting Mashiv Haruach Umorid Hageshem. - * - * @see #isMashivHaruachStartDate() - * @see #isMashivHaruachRecited() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isMashivHaruachEndDate() { - return getJewishMonth() == NISSAN && getJewishDayOfMonth() == 15; - } - - /** - * Returns if Mashiv Haruach Umorid Hageshem is recited. This period starts on 22 Tishrei and ends - * on the 15th day of Nissan. - * - * @deprecated Use {@link TefilaRules#isMashivHaruachRecited(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if Mashiv Haruach Umorid Hageshem is recited. - * - * @see #isMashivHaruachStartDate() - * @see #isMashivHaruachEndDate() - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isMashivHaruachRecited() { - JewishDate startDate = new JewishDate(getJewishYear(), TISHREI, 22); - JewishDate endDate = new JewishDate(getJewishYear(), NISSAN, 15); - return compareTo(startDate) > 0 && compareTo(endDate) < 0; - } - - /** - * Returns if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited. - * This period starts on 22 Tishrei and ends on the 15th day of - * Nissan. - * - * @deprecated Use {@link TefilaRules#isMoridHatalRecited(JewishCalendar)} instead. This method will be - * removed in the v3.0 release. - * - * @return true if Morid Hatal (or the lack of reciting Mashiv Haruach following nussach Ashkenaz) is recited. - */ - @Deprecated // (forRemoval=true) // add back once Java 9 is the minimum supported version - public boolean isMoridHatalRecited() { - return !isMashivHaruachRecited() || isMashivHaruachStartDate() || isMashivHaruachEndDate(); - } /** * Returns true if the current day is Isru Chag. The method returns true for the day following Pesach From 8b9dba0053c67de7025c520e2a049162e2b96370 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 13 Mar 2026 18:02:18 -0400 Subject: [PATCH 014/121] Start using java.time classes --- .../YerushalmiYomiCalculator.java | 282 +++++++++--------- 1 file changed, 134 insertions(+), 148 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java index a5603e9b..a1927404 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java @@ -15,9 +15,8 @@ */ package com.kosherjava.zmanim.hebrewcalendar; -import java.util.Calendar; -import java.util.GregorianCalendar; - +import java.time.ZoneId; +import java.time.ZonedDateTime; /** * This class calculates the Talmud Yerusalmi masechta (tractate).*/ - private final static int[] BLATT_PER_MASECHTA = { - 68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22, 22, 42, 26, 26, 33, 34, 22, - 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13}; - - /** - * Default constructor. - */ - public YerushalmiYomiCalculator() { - // nothing here - } - - /** - * Returns the Daf Yomi - * Yerusalmi page ({@link Daf}) for a given date. - * The first Daf Yomi cycle started on 15 Shevat (Tu Bishvat), 5740 (February, 2, 1980) and calculations - * prior to this date will result in an IllegalArgumentException thrown. A null will be returned on Tisha B'Av or - * Yom Kippur. - * - * @param calendar - * the calendar date for calculation - * @return the {@link Daf} or null if the date is on Tisha B'Av or Yom Kippur. - * - * @throws IllegalArgumentException - * if the date is prior to the February 2, 1980, the start of the first Daf Yomi Yerushalmi cycle - */ - public static Daf getDafYomiYerushalmi(JewishCalendar calendar) { - - Calendar nextCycle = new GregorianCalendar(); - Calendar prevCycle = new GregorianCalendar(); - Calendar requested = calendar.getGregorianCalendar(); - int masechta = 0; - Daf dafYomi = null; - - // There isn't Daf Yomi on Yom Kippur or Tisha B'Av. - if ( calendar.getYomTovIndex() == JewishCalendar.YOM_KIPPUR || - calendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV ) { - return null; - } - - - if (requested.before(DAF_YOMI_START_DAY)) { - throw new IllegalArgumentException(requested + " is prior to organized Daf Yomi Yerushalmi cycles that started on " - + DAF_YOMI_START_DAY); - } - - // Start to calculate current cycle. init the start day - nextCycle.setTime(DAF_YOMI_START_DAY.getTime()); - - // Go cycle by cycle, until we get the next cycle - while (requested.after(nextCycle)) { - prevCycle.setTime(nextCycle.getTime()); - - // Adds the number of whole shas dafs. and the number of days that not have daf. - nextCycle.add(Calendar.DAY_OF_MONTH, WHOLE_SHAS_DAFS); - nextCycle.add(Calendar.DAY_OF_MONTH, getNumOfSpecialDays(prevCycle, nextCycle)); - } - - // Get the number of days from cycle start until request. - int dafNo = (int)(getDiffBetweenDays(prevCycle, requested)); - - // Get the number of special day to subtract - int specialDays = getNumOfSpecialDays(prevCycle, requested); - int total = dafNo - specialDays; - - // Finally find the daf. - for (int i : BLATT_PER_MASECHTA) { - if (total < i) { - dafYomi = new Daf(masechta, total + 1); - break; - } - total -= i; - masechta++; - } - - return dafYomi; - } - - /** - * Return the number of special days (Yom Kippur and Tisha Beav, where there are no dafim), between the start date - * (as a Calendar) and end date (also as a Calendar). - * - * @param start date to start calculating from - * @param end date to finish calculating at - * @return the number of special days between the start and end dates - */ - private static int getNumOfSpecialDays(Calendar start, Calendar end) { - - // Find the start and end Jewish years - int startYear = new JewishCalendar(start).getJewishYear(); - int endYear = new JewishCalendar(end).getJewishYear(); - - // Value to return - int specialDays = 0; - - //Instant of special Dates - JewishCalendar yom_kippur = new JewishCalendar(5770, 7, 10); - JewishCalendar tisha_beav = new JewishCalendar(5770, 5, 9); - - // Go over the years and find special dates - for (int i = startYear; i <= endYear; i++) { - yom_kippur.setJewishYear(i); - tisha_beav.setJewishYear(i); - - if (isBetween(start, yom_kippur.getGregorianCalendar(), end)) { - specialDays++; - } - if (isBetween(start, tisha_beav.getGregorianCalendar(), end)) { - specialDays++; - } - } - - return specialDays; - } - - /** - * Return if the date is between two dates - * - * @param start the start date - * @param date the date being compared - * @param end the end date - * @return if the date is between the start and end dates - */ - private static boolean isBetween(Calendar start, Calendar date, Calendar end ) { - return start.before(date) && end.after(date); - } - - /** - * Return the number of days between the dates passed in - * @param start the start date - * @param end the end date - * @return the number of days between the start and end dates - */ - private static long getDiffBetweenDays(Calendar start, Calendar end) { - return (end.getTimeInMillis() - start.getTimeInMillis()) / DAY_MILIS; - } + + /** Start date of first Daf Yomi Yerushalmi cycle: 1980-02-02 */ + private static final ZonedDateTime DAF_YOMI_START_DAY = + ZonedDateTime.of(1980, 2, 2, 0, 0, 0, 0, ZoneId.systemDefault()); + + /** milliseconds in a day*/ + private static final int DAY_MILLIS = 1000 * 60 * 60 * 24; + /** number of pages (blatt/dafim) in Shas*/ + private static final int WHOLE_SHAS_DAFS = 1554; + + /** number of pages (blatt/dafim) per masechta*/ + private static final int[] BLATT_PER_MASECHTA = { + 68, 37, 34, 44, 31, 59, 26, 33, 28, 20, 13, 92, 65, 71, 22, 22, 42, 26, 26, 33, 34, 22, + 19, 85, 72, 47, 40, 47, 54, 48, 44, 37, 34, 44, 9, 57, 37, 19, 13 + }; + + /** + * Default constructor. + */ + public YerushalmiYomiCalculator() { + // No-op + } + + /** + * Returns the Daf Yomi Yerushalmi page for a given Jewish date. + * Returns null on Yom Kippur or Tisha B’Av. + * @param jewishCalendar the JewishCalendar to set. + * @return the daf. + */ + public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { + ZonedDateTime requested = jewishCalendar.getGregorianCalendar().toInstant() + .atZone(ZoneId.systemDefault()); + int masechta = 0; + Daf dafYomi = null; + + // No Daf Yomi on Yom Kippur or Tisha B'Av + if (jewishCalendar.getYomTovIndex() == JewishCalendar.YOM_KIPPUR || + jewishCalendar.getYomTovIndex() == JewishCalendar.TISHA_BEAV) { + return null; + } + + if (requested.isBefore(DAF_YOMI_START_DAY)) { + throw new IllegalArgumentException(requested + " is prior to the first Daf Yomi cycle starting on " + + DAF_YOMI_START_DAY); + } + + // Initialize cycle dates + ZonedDateTime nextCycle = DAF_YOMI_START_DAY; + ZonedDateTime prevCycle = DAF_YOMI_START_DAY; + + // Loop through cycles until we reach the requested date + while (requested.isAfter(nextCycle)) { + prevCycle = nextCycle; + + // Add whole cycle days + nextCycle = nextCycle.plusDays(WHOLE_SHAS_DAFS); + nextCycle = nextCycle.plusDays(getNumOfSpecialDays(prevCycle, nextCycle)); + } + + // Days between start of cycle and requested date + int dafNo = (int) getDiffBetweenDays(prevCycle, requested); + + int specialDays = getNumOfSpecialDays(prevCycle, requested); + int total = dafNo - specialDays; + + // Find the daf + for (int blatt : BLATT_PER_MASECHTA) { + if (total < blatt) { + dafYomi = new Daf(masechta, total + 1); + break; + } + total -= blatt; + masechta++; + } + + return dafYomi; + } + + /** + * Counts the number of "special days" (Yom Kippur, Tisha B’Av) between two ZonedDateTimes. + * @param start the start date for the calculation + * @param end the start date for the calculatio + * @return the number of special days + */ + private static int getNumOfSpecialDays(ZonedDateTime start, ZonedDateTime end) { + + int startYear = new JewishCalendar(start).getJewishYear(); + int endYear = new JewishCalendar(end).getJewishYear(); + + int specialDays = 0; + + // Loop over each Jewish year in range + for (int year = startYear; year <= endYear; year++) { + // Create Yom Kippur and Tisha B’Av for that Jewish year + JewishCalendar yomKippur = new JewishCalendar(5770, 7, 10); // month/day are constants + JewishCalendar tishaBeav = new JewishCalendar(5770, 5, 9); + + yomKippur.setJewishYear(year); + tishaBeav.setJewishYear(year); + + ZonedDateTime ykDate = yomKippur.getGregorianCalendar().toInstant() + .atZone(start.getZone()); + ZonedDateTime tbDate = tishaBeav.getGregorianCalendar().toInstant() + .atZone(start.getZone()); + + if (isBetween(start, ykDate, end)) specialDays++; + if (isBetween(start, tbDate, end)) specialDays++; + } + + return specialDays; + } + + /** + * Checks if a date is strictly between start and end. + * @param start the start ZonedDateTime + * @param date the ZonedDateTime to check + * @param end the end ZonedDateTime + * @return if the date is between the two dates + */ + private static boolean isBetween(ZonedDateTime start, ZonedDateTime date, ZonedDateTime end) { + return start.isBefore(date) && end.isAfter(date); + } + + /** + * Returns the number of full days between two ZonedDateTimes. + * @param start the start ZonedDateTime + * @param end the end ZonedDateTime + * @return the number of days between the dates. + */ + private static long getDiffBetweenDays(ZonedDateTime start, ZonedDateTime end) { + return (end.toInstant().toEpochMilli() - start.toInstant().toEpochMilli()) / DAY_MILLIS; + } } From 3e54af759c013d895fa462bbf1011ae1a7b3059a Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Mon, 16 Mar 2026 09:28:16 -0400 Subject: [PATCH 015/121] Migrate to LocalDate, Fix some bugs (#253) * Migrate AstronomicalCalendar to use LocalDate - Fix Timezone Bug - Use correct SUNRISE enum in getInstantFromTime * Fix Javadocs --- .gitignore | 3 +- .../zmanim/AstronomicalCalendar.java | 127 +++++++++--------- .../zmanim/ComprehensiveZmanimCalendar.java | 57 +++----- .../com/kosherjava/zmanim/ZmanimCalendar.java | 12 +- .../zmanim/hebrewcalendar/JewishCalendar.java | 8 +- .../zmanim/util/AstronomicalCalculator.java | 21 +-- .../kosherjava/zmanim/util/GeoLocation.java | 4 +- .../zmanim/util/NOAACalculator.java | 79 +++++------ .../zmanim/util/SunTimesCalculator.java | 47 +++---- .../zmanim/util/ZmanimFormatter.java | 28 ++-- 10 files changed, 184 insertions(+), 202 deletions(-) diff --git a/.gitignore b/.gitignore index e82f6727..fdadea96 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ target/ .idea/ zmanim.iml .gradle -build \ No newline at end of file +build +local.properties \ No newline at end of file diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index dd6606c4..270f79c0 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -19,16 +19,20 @@ import java.time.Duration; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; +import java.util.TimeZone; + import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import com.kosherjava.zmanim.util.ZmanimFormatter; /** * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise}, {@link #getSunset() - * sunset} and twilight times. This class contains a {@link #getZonedDateTime() zonedDateTime} and can therefore use the standard + * sunset} and twilight times. This class contains a {@link #getLocalDate() zonedDateTime} and can therefore use the standard * Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be * changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with * the {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine @@ -95,7 +99,7 @@ public class AstronomicalCalendar implements Cloneable { /** * The ZonedDateTime encapsulated by this class to track the current date used by the class */ - private ZonedDateTime zonedDateTime; + private LocalDate localDate; /** * the {@link GeoLocation} used for calculations. @@ -329,7 +333,7 @@ public static Instant getTimeOffset(Instant time, long offsetMillis) { public Instant getSunriseOffsetByDegrees(double offsetZenith) { double dawn = getUTCSunrise(offsetZenith); return Double.isNaN(dawn) ? null - : getInstantFromTime(dawn, SolarEvent.SUNSET); + : getInstantFromTime(dawn, SolarEvent.SUNRISE); } /** @@ -371,7 +375,7 @@ public AstronomicalCalendar() { * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class. */ public AstronomicalCalendar(GeoLocation geoLocation) { - setZonedDateTime(ZonedDateTime.now(geoLocation.getZoneId())); + setLocalDate(LocalDate.now(geoLocation.getZoneId())); setGeoLocation(geoLocation);// duplicate call setAstronomicalCalculator(AstronomicalCalculator.getDefault()); } @@ -387,7 +391,7 @@ public AstronomicalCalendar(GeoLocation geoLocation) { * not set, {@link Double#NaN} will be returned. See detailed explanation on top of the page. */ public double getUTCSunrise(double zenith) { - return getAstronomicalCalculator().getUTCSunrise(getAdjustedCalendar(), getGeoLocation(), zenith, true); + return getAstronomicalCalculator().getUTCSunrise(getAdjustedLocalDate(), getGeoLocation(), zenith, true); } /** @@ -405,7 +409,7 @@ public double getUTCSunrise(double zenith) { * @see AstronomicalCalendar#getUTCSeaLevelSunset */ public double getUTCSeaLevelSunrise(double zenith) { - return getAstronomicalCalculator().getUTCSunrise(getAdjustedCalendar(), getGeoLocation(), zenith, false); + return getAstronomicalCalculator().getUTCSunrise(getAdjustedLocalDate(), getGeoLocation(), zenith, false); } /** @@ -420,7 +424,7 @@ public double getUTCSeaLevelSunrise(double zenith) { * @see AstronomicalCalendar#getUTCSeaLevelSunset */ public double getUTCSunset(double zenith) { - return getAstronomicalCalculator().getUTCSunset(getAdjustedCalendar(), getGeoLocation(), zenith, true); + return getAstronomicalCalculator().getUTCSunset(getAdjustedLocalDate(), getGeoLocation(), zenith, true); } /** @@ -439,7 +443,7 @@ public double getUTCSunset(double zenith) { * @see AstronomicalCalendar#getUTCSeaLevelSunrise */ public double getUTCSeaLevelSunset(double zenith) { - return getAstronomicalCalculator().getUTCSunset(getAdjustedCalendar(), getGeoLocation(), zenith, false); + return getAstronomicalCalculator().getUTCSunset(getAdjustedLocalDate(), getGeoLocation(), zenith, false); } /** @@ -506,7 +510,7 @@ public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ public Instant getSunTransit() { - double noon = getAstronomicalCalculator().getUTCNoon(getAdjustedCalendar(), getGeoLocation()); + double noon = getAstronomicalCalculator().getUTCNoon(getAdjustedLocalDate(), getGeoLocation()); return getInstantFromTime(noon, SolarEvent.NOON); //FIXME NEW CODE } @@ -536,7 +540,7 @@ public Instant getSunTransit() { * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ public Instant getSolarMidnight() { - double noon = getAstronomicalCalculator().getUTCMidnight(getAdjustedCalendar(), getGeoLocation()); + double noon = getAstronomicalCalculator().getUTCMidnight(getAdjustedLocalDate(), getGeoLocation()); return getInstantFromTime(noon, SolarEvent.MIDNIGHT); } @@ -589,35 +593,27 @@ protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { return null; } - ZonedDateTime adjustedZonedDateTime = getAdjustedZonedDateTime(); - - LocalDate date = adjustedZonedDateTime - .withZoneSameInstant(ZoneOffset.UTC) - .toLocalDate(); + LocalDate date = getAdjustedLocalDate(); - // Convert fractional hour to total seconds - int totalSeconds = (int) Math.floor(time * 3600); - int hours = totalSeconds / 3600; - int minutes = (totalSeconds % 3600) / 60; - int seconds = totalSeconds % 60; - int localTimeHours = (int) getGeoLocation().getLongitude() / 15; + double localTimeHours = (getGeoLocation().getLongitude() / 15) + time; - if (solarEvent == SolarEvent.SUNRISE && localTimeHours + hours > 18) { + if (solarEvent == SolarEvent.SUNRISE && localTimeHours > 18) { date = date.minusDays(1); - } else if (solarEvent == SolarEvent.SUNSET && localTimeHours + hours < 6) { + } else if (solarEvent == SolarEvent.SUNSET && localTimeHours < 6) { date = date.plusDays(1); - } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours + hours < 12) { + } else if (solarEvent == SolarEvent.MIDNIGHT && localTimeHours < 12) { date = date.plusDays(1); } else if (solarEvent == SolarEvent.NOON) { - if (localTimeHours + hours < 0) { + if (localTimeHours < 0) { date = date.plusDays(1); - } else if (localTimeHours + hours > 24) { + } else if (localTimeHours > 24) { date = date.minusDays(1); } } + LocalDateTime dateTime = date.atStartOfDay().plusSeconds((long) (time*3600)); - LocalTime localTime = LocalTime.of(hours, minutes, seconds); - return ZonedDateTime.of(date, localTime, ZoneOffset.UTC).toInstant(); + // The computed time is in UTC fractional hours; anchor in UTC before converting. + return ZonedDateTime.of(dateTime, ZoneOffset.UTC).toInstant(); } /** @@ -669,10 +665,10 @@ public double getSunriseSolarDipFromOffset(double minutes) { * @return the degrees below the horizon after sunset that match the offset in minutes passed it as a parameter. If * the calculation can't be computed (no sunset occurs on this day) a {@link Double#NaN} will be returned. * @deprecated This method is slow and inefficient and should NEVER be used in a loop. This method should be replaced - * by calls to {@link AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation)}. That method will + * by calls to {@link AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation)}. That method will * efficiently return the the solar elevation (the sun's position in degrees below (or above) the horizon) * at the given time even in the arctic when there is no sunrise. - * @see AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) + * @see AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) * @see #getSunriseSolarDipFromOffset(double) */ @Deprecated(forRemoval=false) @@ -718,39 +714,42 @@ public Instant getLocalMeanTime(double hours) { throw new IllegalArgumentException("Hours must be between 0 and 23.9999..."); } - double rawOffset = getGeoLocation().getZoneId().getRules().getStandardOffset(getZonedDateTime().toInstant()).getTotalSeconds() * 1000; + double rawOffset = getGeoLocation().getZoneId().getRules().getOffset(getMidnightLastNight().toInstant()).getTotalSeconds() * 1000; double utcTime = hours - rawOffset / (double) HOUR_MILLIS; Instant instant = getInstantFromTime(utcTime, SolarEvent.SUNRISE); - return getTimeOffset(instant, -getGeoLocation().getLocalMeanTimeOffset(getZonedDateTime().toInstant())); + return getTimeOffset(instant, -getGeoLocation().getLocalMeanTimeOffset(getMidnightLastNight().toInstant())); } - - /** - * Adjusts the ZonedDateTime to deal with edge cases where the location crosses the antimeridian. - * - * @see GeoLocation#getAntimeridianAdjustment(Instant) - * @return the adjusted Calendar - */ - private ZonedDateTime getAdjustedCalendar(){ - int offset = getGeoLocation().getAntimeridianAdjustment(getZonedDateTime().toInstant()); - if (offset == 0) { - return getZonedDateTime(); - } - ZonedDateTime adjustedZonedDateTime = getZonedDateTime(); - return adjustedZonedDateTime.plusDays(1); - } - + /** * Adjusts the ZonedDateTime to deal with edge cases where the location crosses the antimeridian. * * @see GeoLocation#getAntimeridianAdjustment(Instant) * @return the adjusted Calendar */ - private ZonedDateTime getAdjustedZonedDateTime(){ - ZonedDateTime adjustedZonedDateTime = getZonedDateTime(); - int offset = getGeoLocation().getAntimeridianAdjustment(getZonedDateTime().toInstant()); - return offset == 0 ? adjustedZonedDateTime : adjustedZonedDateTime.plusDays(offset); - } + private LocalDate getAdjustedLocalDate(){ + int offset = getGeoLocation().getAntimeridianAdjustment(getMidnightLastNight().toInstant()); + return offset == 0 ? getLocalDate() : getLocalDate().plusDays(offset); + } + + /** + * Used by Molad based zmanim to determine if zmanim occur during the current day. + * This is also used as the anchor for current timezone-offset calculations. + * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) + * @return midnight at the start of the current local date in the configured timezone + */ + protected ZonedDateTime getMidnightLastNight() { + return ZonedDateTime.of(getLocalDate(),LocalTime.MIDNIGHT,getGeoLocation().getZoneId()); + } + + /** + * Used by Molad based zmanim to determine if zmanim occur during the current day. + * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) + * @return following midnight + */ + protected ZonedDateTime getMidnightTonight() { + return ZonedDateTime.of(getLocalDate().plusDays(1),LocalTime.MIDNIGHT,getGeoLocation().getZoneId()); + } /** * Returns an XML formatted representation of the class using the default output of the @@ -787,7 +786,7 @@ public boolean equals(Object object) { return false; } AstronomicalCalendar aCal = (AstronomicalCalendar) object; - return getZonedDateTime().equals(aCal.getZonedDateTime()) && getGeoLocation().equals(aCal.getGeoLocation()) + return getLocalDate().equals(aCal.getLocalDate()) && getGeoLocation().equals(aCal.getGeoLocation()) && getAstronomicalCalculator().equals(aCal.getAstronomicalCalculator()); } @@ -797,7 +796,7 @@ public boolean equals(Object object) { public int hashCode() { int result = 17; result = 37 * result + getClass().hashCode(); // needed or this and subclasses will return identical hash - result += 37 * result + getZonedDateTime().hashCode(); + result += 37 * result + getLocalDate().hashCode(); result += 37 * result + getGeoLocation().hashCode(); result += 37 * result + getAstronomicalCalculator().hashCode(); return result; @@ -823,7 +822,6 @@ public GeoLocation getGeoLocation() { */ public void setGeoLocation(GeoLocation geoLocation) { this.geoLocation = geoLocation; - getZonedDateTime().withZoneSameInstant(getGeoLocation().getZoneId()); } /** @@ -856,29 +854,24 @@ public void setAstronomicalCalculator(AstronomicalCalculator astronomicalCalcula * * @return Returns the ZonedDateTime. */ - public ZonedDateTime getZonedDateTime() { - return this.zonedDateTime; + public LocalDate getLocalDate() { + return this.localDate; } /** * Sets the ZonedDateTime object for us in this class. - * @param zonedDateTime + * @param localDate * The ZonedDateTime to set. */ - public void setZonedDateTime(ZonedDateTime zonedDateTime) { - this.zonedDateTime = zonedDateTime; - if (getGeoLocation() != null) {// if available set the Calendar's timezone to the GeoLocation TimeZone - getZonedDateTime().withZoneSameInstant(getGeoLocation().getZoneId()); - } + public void setLocalDate(LocalDate localDate) { + this.localDate = localDate; } /** * A method that creates a deep copy of the object. * Note: If the {@link java.util.TimeZone} in the cloned {@link com.kosherjava.zmanim.util.GeoLocation} will * be changed from the original, it is critical that - * {@link com.kosherjava.zmanim.AstronomicalCalendar#getZonedDateTime()}. - * {@link java.util.Calendar#setTimeZone(TimeZone) setTimeZone(TimeZone)} be called in order for the - * AstronomicalCalendar to output times in the expected offset after being cloned. + * {@link com.kosherjava.zmanim.AstronomicalCalendar#getLocalDate()}. * * @see java.lang.Object#clone() */ diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index f10f4aec..e16acf23 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -15,6 +15,7 @@ */ package com.kosherjava.zmanim; +import java.time.LocalDate; import java.util.Calendar; // FIXME remove once FORWARD can be refactored. import java.time.ZonedDateTime; import java.time.temporal.ChronoUnit; @@ -3254,7 +3255,7 @@ public Instant getFixedLocalChatzos() { */ public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime @@ -3289,8 +3290,8 @@ public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) * returned. */ private Instant getMoladBasedTime(Instant moladBasedTime, Instant alos, Instant tzais, boolean techila) { - Instant lastMidnight = getMidnightLastNight(); - Instant midnightTonight = getMidnightTonight(); + Instant lastMidnight = getMidnightLastNight().toInstant(); + Instant midnightTonight = getMidnightTonight().toInstant(); if(moladBasedTime.isBefore(lastMidnight) || moladBasedTime.isAfter(midnightTonight)){ // Invalid time, bailout return null; } else if (alos == null || tzais == null){ // Not enough info to adjust @@ -3358,7 +3359,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() { public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in @@ -3437,7 +3438,7 @@ public Instant getTchilasZmanKidushLevana3Days() { public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime @@ -3477,7 +3478,7 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { public Instant getZmanMolad() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime @@ -3496,28 +3497,6 @@ public Instant getZmanMolad() { } return molad; } - - /** - * Used by Molad based zmanim to determine if zmanim occur during the current day. - * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) - * @return previous midnight - */ - private Instant getMidnightLastNight() { - ZonedDateTime midnight = getZonedDateTime().truncatedTo(ChronoUnit.DAYS); - return midnight.toInstant(); - } - - /** - * Used by Molad based zmanim to determine if zmanim occur during the current day. - * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) - * @return following midnight - */ - private Instant getMidnightTonight() { - return getZonedDateTime() - .plusDays(1) - .truncatedTo(ChronoUnit.DAYS) - .toInstant(); - } /** * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 @@ -3543,7 +3522,7 @@ private Instant getMidnightTonight() { */ public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for @@ -3591,7 +3570,7 @@ public Instant getTchilasZmanKidushLevana7Days() { */ public Instant getSofZmanAchilasChametzGRA() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3621,7 +3600,7 @@ public Instant getSofZmanAchilasChametzGRA() { */ public Instant getSofZmanAchilasChametzMGA72Minutes() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3652,7 +3631,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3682,7 +3661,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3707,7 +3686,7 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { */ public Instant getSofZmanBiurChametzGRA() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3735,7 +3714,7 @@ public Instant getSofZmanBiurChametzGRA() { */ public Instant getSofZmanBiurChametzMGA72Minutes() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3763,7 +3742,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { */ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3793,7 +3772,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { */ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime @@ -3969,7 +3948,7 @@ public Instant getSofZmanTfilaBaalHatanya() { */ public Instant getSofZmanAchilasChametzBaalHatanya() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { @@ -3992,7 +3971,7 @@ public Instant getSofZmanAchilasChametzBaalHatanya() { */ public Instant getSofZmanBiurChametzBaalHatanya() { JewishCalendar jewishCalendar = new JewishCalendar(); - ZonedDateTime zdt = getZonedDateTime(); + LocalDate zdt = getLocalDate(); jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getSunriseBaalHatanya(), getShaahZmanisBaalHatanya() * 5); diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 4edff603..19f06be3 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -16,6 +16,8 @@ package com.kosherjava.zmanim; import java.time.Instant; +import java.time.LocalDate; + import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; @@ -399,9 +401,9 @@ public Instant getChatzos() { * zmaniyos after sunrise. See The Definition * of Chatzos for a detailed explanation of the ways to calculate Chatzos. * - * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(ZonedDateTime, GeoLocation) - * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(ZonedDateTime, GeoLocation) - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(ZonedDateTime, GeoLocation) + * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(LocalDate, GeoLocation) + * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(LocalDate, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see AstronomicalCalendar#getSunTransit(Instant, Instant) * @see #getChatzos() * @see #getSunTransit() @@ -1084,8 +1086,8 @@ public void setCandleLightingOffset(double candleLightingOffset) { */ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsrael) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getZonedDateTime().getYear(),getZonedDateTime().getMonthValue(), - getZonedDateTime().getDayOfMonth()); + jewishCalendar.setGregorianDate(getLocalDate().getYear(), getLocalDate().getMonthValue(), + getLocalDate().getDayOfMonth()); jewishCalendar.setInIsrael(inIsrael); diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index d1dae9fd..ddf05f3d 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -1276,7 +1276,7 @@ public Instant getMoladAsInstant() { * @return the Date representing the moment 3 days after the molad. * * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana3Days() - * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana3Days(Date, Date) + * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana3Days(Instant, Instant) */ public Instant getTchilasZmanKidushLevana3Days() { return getMoladAsInstant().plus(Duration.ofHours(72)); // 3 days after the molad @@ -1292,7 +1292,7 @@ public Instant getTchilasZmanKidushLevana3Days() { * @return the Date representing the moment 7 days after the molad. * * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana7Days() - * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana7Days(Date, Date) + * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getTchilasZmanKidushLevana7Days(Instant, Instant) */ public Instant getTchilasZmanKidushLevana7Days() { return getMoladAsInstant().plus(Duration.ofHours(168)); // 7 days after the molad @@ -1311,7 +1311,7 @@ public Instant getTchilasZmanKidushLevana7Days() { * * @see #getSofZmanKidushLevana15Days() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos() - * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Date, Date) + * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) */ public Instant getSofZmanKidushLevanaBetweenMoldos() { Instant molad = getMoladAsInstant(); @@ -1342,7 +1342,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() { * @return the Date representing the moment 15 days after the molad. * @see #getSofZmanKidushLevanaBetweenMoldos() * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevana15Days() - * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevana15Days(Date, Date) + * @see com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getSofZmanKidushLevana15Days(Instant, Instant) */ public Instant getSofZmanKidushLevana15Days() { return getMoladAsInstant().plus(Duration.ofHours(24 * 15)); diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index 9bcda8d8..68645b9e 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -15,6 +15,7 @@ */ package com.kosherjava.zmanim.util; +import java.time.LocalDate; import java.time.ZonedDateTime; /** @@ -104,7 +105,7 @@ public static AstronomicalCalculator getDefault() { * A method that calculates UTC sunrise as well as any time based on an angle above or below sunrise. This abstract * method is implemented by the classes that extend this class. * - * @param zonedDateTime + * @param localDate * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. @@ -121,14 +122,14 @@ public static AstronomicalCalculator getDefault() { * {@link java.lang.Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ - public abstract double getUTCSunrise(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, + public abstract double getUTCSunrise(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation); /** * A method that calculates UTC sunset as well as any time based on an angle above or below sunset. This abstract * method is implemented by the classes that extend this class. * - * @param zonedDateTime + * @param localDate * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. @@ -145,7 +146,7 @@ public abstract double getUTCSunrise(ZonedDateTime zonedDateTime, GeoLocation ge * {@link java.lang.Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ - public abstract double getUTCSunset(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, + public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation); @@ -155,14 +156,14 @@ public abstract double getUTCSunset(ZonedDateTime zonedDateTime, GeoLocation geo * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating * the time as halfway between sunrise and sunset. * - * @param zonedDateTime + * @param localDate * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. * * @return the time in minutes from zero UTC */ - public abstract double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation); + public abstract double getUTCNoon(LocalDate localDate, GeoLocation geoLocation); /** @@ -171,21 +172,21 @@ public abstract double getUTCSunset(ZonedDateTime zonedDateTime, GeoLocation geo * true solar midnight, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating * the time as 12 hours after halfway between sunrise and sunset. * - * @param zonedDateTime + * @param localDate * Used to calculate day of year. * @param geoLocation * The location information used for astronomical calculating sun times. * * @return the time in minutes from zero UTC */ - public abstract double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation); + public abstract double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation); /** * Return the Solar Elevation for the * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the * horizon. Not corrected for altitude. * - * @param zonedDateTime + * @param localDate * time of calculation * @param geoLocation * The location information @@ -200,7 +201,7 @@ public abstract double getUTCSunset(ZonedDateTime zonedDateTime, GeoLocation geo * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 180 * degrees. * - * @param zonedDateTime + * @param localDate * time of calculation * @param geoLocation * The location information diff --git a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java index 976dac76..3b43c3b2 100644 --- a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java +++ b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java @@ -342,7 +342,7 @@ public void setZoneId(ZoneId zoneId) { */ public long getLocalMeanTimeOffset(Instant instant) { ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId); - long timezoneOffsetMillis = zonedDateTime.getOffset().getTotalSeconds() * 1000; + long timezoneOffsetMillis = zonedDateTime.getOffset().getTotalSeconds() * 1000L; return (long) (getLongitude() * 4 * MINUTE_MILLIS - timezoneOffsetMillis); } @@ -695,7 +695,7 @@ public String toString() { * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object. * Note: If the {@link java.time.ZoneId} in the clone will be changed from the original, it is critical - * that {@link com.kosherjava.zmanim.AstronomicalCalendar#getZonedDateTime()}. + * that {@link com.kosherjava.zmanim.AstronomicalCalendar#getLocalDate()}. * * @see java.lang.Object#clone() */ diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index ebb3be97..fe445bf7 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -16,6 +16,7 @@ package com.kosherjava.zmanim.util; import java.time.ZoneOffset; +import java.time.LocalDate; import java.time.ZonedDateTime; /** @@ -69,24 +70,24 @@ public String getCalculatorName() { } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(LocalDate, GeoLocation, double, boolean) */ - public double getUTCSunrise(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - double sunrise = getSunRiseSetUTC(zdt, geoLocation.getLatitude(), -geoLocation.getLongitude(), + double sunrise = getSunRiseSetUTC(dt, geoLocation.getLatitude(), -geoLocation.getLongitude(), adjustedZenith, SolarEvent.SUNRISE); sunrise = sunrise / 60; return sunrise > 0 ? sunrise % 24 : sunrise % 24 + 24; // ensure that the time is >= 0 and < 24 } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean) */ - public double getUTCSunset(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - double sunset = getSunRiseSetUTC(zdt, geoLocation.getLatitude(), -geoLocation.getLongitude(), + double sunset = getSunRiseSetUTC(dt, geoLocation.getLatitude(), -geoLocation.getLongitude(), adjustedZenith, SolarEvent.SUNSET); sunset = sunset / 60; return sunset > 0 ? sunset % 24 : sunset % 24 + 24; // ensure that the time is >= 0 and < 24 @@ -95,15 +96,15 @@ public double getUTCSunset(ZonedDateTime zdt, GeoLocation geoLocation, double ze /** * Return the Julian day from a Java Calendar. * - * @param zonedDateTime - * The ZonedDateTime + * @param localDate + * The LocalDate * @return the Julian day corresponding to the date Note: Number is returned for the start of the Julian * day. Fractional days / time should be added later. */ - private static double getJulianDay(ZonedDateTime zonedDateTime) { - int year = zonedDateTime.getYear(); - int month = zonedDateTime.getMonthValue(); - int day = zonedDateTime.getDayOfMonth(); + private static double getJulianDay(LocalDate localDate) { + int year = localDate.getYear(); + int month = localDate.getMonthValue(); + int day = localDate.getDayOfMonth(); if (month <= 2) { year -= 1; @@ -311,18 +312,18 @@ private static double getSunHourAngle(double latitude, double solarDeclination, } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) */ - public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) { - return getSolarElevationAzimuth(zdt, geoLocation, false); + public double getSolarElevation(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + return getSolarElevationAzimuth(zonedDateTime, geoLocation, false); } - + /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(ZonedDateTime, GeoLocation) */ - public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { - return getSolarElevationAzimuth(zdt, geoLocation, true); + public double getSolarAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { + return getSolarElevationAzimuth(zonedDateTime, geoLocation, true); } /** @@ -339,22 +340,22 @@ public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { * true for azimuth, false for elevation * @return solar elevation or azimuth in degrees. * - * @see #getSolarElevation(Calendar, GeoLocation) - * @see #getSolarAzimuth(Calendar, GeoLocation) + * @see #getSolarElevation(ZonedDateTime, GeoLocation) + * @see #getSolarAzimuth(ZonedDateTime, GeoLocation) */ private double getSolarElevationAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation, boolean isAzimuth) { double lat = Math.toRadians(geoLocation.getLatitude()); double lon = geoLocation.getLongitude(); - ZonedDateTime utc = zonedDateTime.withZoneSameInstant(ZoneOffset.UTC); + ZonedDateTime utc = zonedDateTime.withZoneSameInstant(ZoneOffset.UTC); double fractionalDay = (utc.getHour() + (utc.getMinute() + (utc.getSecond() + utc.getNano() / 1_000_000_000.0) / 60.0) / 60.0) / 24.0; - double jd = getJulianDay(utc) + fractionalDay; + double jd = getJulianDay(utc.toLocalDate()) + fractionalDay; double jc = getJulianCenturiesFromJulianDay(jd); double decl = Math.toRadians(getSunDeclination(jc)); @@ -393,18 +394,18 @@ private double getSolarElevationAzimuth(ZonedDateTime zonedDateTime, GeoLocation * Other calculators may return a more simplified calculation of halfway between sunrise and sunset. See The Definition of Chatzos for details on * solar noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) * - * @param zonedDateTime - * The zonedDateTime representing the date to calculate solar noon for + * @param localDate + * The localDate representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. This class uses only requires * the longitude for calculating noon since it is the same time anywhere along the longitude line. * @return the time in minutes from zero UTC */ - public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { - double noon = getSolarNoonMidnightUTC(getJulianDay(zonedDateTime), -geoLocation.getLongitude(), SolarEvent.NOON); + public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { + double noon = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.NOON); noon = noon / 60; return noon > 0 ? noon % 24 : noon % 24 + 24; // ensure that the time is >= 0 and < 24 } @@ -417,18 +418,18 @@ public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { * simplified calculation of halfway between sunrise and sunset. See The Definition of Chatzos for details on * solar noon / midnight calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) * - * @param zonedDateTime - * The ZonedDateTime representing the date to calculate solar noon for + * @param localDate + * The LocalDate representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. This class uses only requires * the longitude for calculating noon since it is the same time anywhere along the longitude line. * @return the time in minutes from zero UTC */ - public double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { - double midnight = getSolarNoonMidnightUTC(getJulianDay(zonedDateTime), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); + public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { + double midnight = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); midnight = midnight / 60; return midnight > 0 ? midnight % 24 : midnight % 24 + 24; // ensure that the time is >= 0 and < 24 } @@ -448,8 +449,8 @@ public double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocatio * * @return the time in minutes from zero UTC * - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) - * @see #getUTCNoon(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) + * @see #getUTCNoon(LocalDate, GeoLocation) */ private static double getSolarNoonMidnightUTC(double julianDay, double longitude, SolarEvent solarEvent) { julianDay = (solarEvent == SolarEvent.NOON) ? julianDay : julianDay + 0.5; @@ -469,8 +470,8 @@ private static double getSolarNoonMidnightUTC(double julianDay, double longitude * of sunrise or sunset in minutes for the given day at the given location on earth. * @todo Possibly increase the number of passes for improved accuracy, especially in the Arctic areas. * - * @param zonedDateTime - * The ZonedDateTime. + * @param localDate + * The LocalDate. * @param latitude * The latitude of observer in degrees * @param longitude @@ -481,9 +482,9 @@ private static double getSolarNoonMidnightUTC(double julianDay, double longitude * If the calculation is for {@link SolarEvent#SUNRISE SUNRISE} or {@link SolarEvent#SUNSET SUNSET} * @return the time in minutes from zero Universal Coordinated Time (UTC) */ - private static double getSunRiseSetUTC(ZonedDateTime zonedDateTime, double latitude, double longitude, double zenith, + private static double getSunRiseSetUTC(LocalDate localDate, double latitude, double longitude, double zenith, SolarEvent solarEvent) { - double julianDay = getJulianDay(zonedDateTime); + double julianDay = getJulianDay(localDate); // Find the time of solar noon at the location, and use that declination. // This is better than start of the Julian day diff --git a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java index 904d67f2..19b75418 100644 --- a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java @@ -15,6 +15,7 @@ */ package com.kosherjava.zmanim.util; +import java.time.LocalDate; import java.time.ZonedDateTime; /** @@ -46,21 +47,21 @@ public String getCalculatorName() { } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(Calendar, GeoLocation, double, boolean) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(LocalDate, GeoLocation, double, boolean) */ - public double getUTCSunrise(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(zdt, geoLocation, adjustedZenith, true); + return getTimeUTC(dt, geoLocation, adjustedZenith, true); } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(Calendar, GeoLocation, double, boolean) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean */ - public double getUTCSunset(ZonedDateTime zdt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(zdt, geoLocation, adjustedZenith, false); + return getTimeUTC(dt, geoLocation, adjustedZenith, false); } /** @@ -222,8 +223,8 @@ private static double getLocalMeanTime(double localHour, double sunRightAscensio * Get sunrise or sunset time in UTC, according to flag. This time is returned as * a double and is not adjusted for time-zone. * - * @param zonedDateTime - * the ZonedDateTime object to extract the day of year for calculation + * @param localDate + * the LocalDate object to extract the day of year for calculation * @param geoLocation * the GeoLocation object that contains the latitude and longitude * @param zenith @@ -234,8 +235,8 @@ private static double getLocalMeanTime(double localHour, double sunRightAscensio * (expected behavior for some locations such as near the poles, * {@link Double#NaN} will be returned. */ - private static double getTimeUTC(ZonedDateTime zonedDateTime, GeoLocation geoLocation, double zenith, boolean isSunrise) { - int dayOfYear = zonedDateTime.getDayOfYear(); + private static double getTimeUTC(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean isSunrise) { + int dayOfYear = localDate.getDayOfYear(); double sunMeanAnomaly = getMeanAnomaly(dayOfYear, geoLocation.getLongitude(), isSunrise); double sunTrueLong = getSunTrueLongitude(sunMeanAnomaly); double sunRightAscensionHours = getSunRightAscensionHours(sunTrueLong); @@ -262,19 +263,19 @@ private static double getTimeUTC(ZonedDateTime zonedDateTime, GeoLocation geoLoc * {@link NOAACalculator}, the default calculator, returns true solar noon. See The Definition of Chatzos for details on solar * noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see NOAACalculator * - * @param zonedDateTime - * The ZonedDateTime representing the date to calculate solar noon for + * @param localDate + * The LocalDate representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for * some locations such as near the poles, {@link Double#NaN} will be returned. */ - public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { - double sunrise = getUTCSunrise(zonedDateTime, geoLocation, 90, false); - double sunset = getUTCSunset(zonedDateTime, geoLocation, 90, false); + public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { + double sunrise = getUTCSunrise(localDate, geoLocation, 90, false); + double sunset = getUTCSunset(localDate, geoLocation, 90, false); double noon = sunrise + ((sunset - sunrise) / 2); if (noon < 0) { noon += 12; @@ -292,29 +293,29 @@ public double getUTCNoon(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { * {@link NOAACalculator}, the default calculator, returns true solar noon. See The Definition of Chatzos for details on solar * noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see NOAACalculator * - * @param zonedDateTime - * The ZonedDateTime representing the date to calculate solar noon for + * @param localDate + * The LocalDate representing the date to calculate solar noon for * @param geoLocation * The location information used for astronomical calculating sun times. * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for * some locations such as near the poles, {@link Double#NaN} will be returned. */ - public double getUTCMidnight(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { - return (getUTCNoon(zonedDateTime, geoLocation) + 12); + public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { + return (getUTCNoon(localDate, geoLocation) + 12); } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(ZonedDateTime, GeoLocation) */ public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarAzimuth method. Use the NOAACalculator instead."); } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) */ public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) { throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarElevation method. Use the NOAACalculator instead."); diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index e93e7a45..342886fc 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -17,6 +17,8 @@ import java.lang.reflect.Method; import java.text.DecimalFormat; +import java.time.LocalDate; +import java.time.LocalTime; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -277,8 +279,8 @@ public String format(Time time) { * settings. * @return the formatted String */ - public String formatDateTime(Instant instant, ZonedDateTime zonedDateTime) { - ZonedDateTime dateTime = instant.atZone(zonedDateTime.getZone()); + public String formatDateTime(Instant instant, ZoneId zoneId) { + ZonedDateTime dateTime = instant.atZone(zoneId); if (this.dateTimeFormatter.toString().equals("yyyy-MM-dd'T'HH:mm:ss")) { return getXSDateTime(instant); @@ -380,7 +382,7 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); df = df.withZone(astronomicalCalendar.getGeoLocation().getZoneId()); - Instant instant = astronomicalCalendar.getZonedDateTime().toInstant(); + LocalDate localDate = astronomicalCalendar.getLocalDate(); ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); StringBuilder sb = new StringBuilder("<"); @@ -400,7 +402,7 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { // output += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; // output += xsi:schemaLocation="http://www.kosherjava.com/zmanim basicZmanim.xsd" } - sb.append(" date=\"").append(df.format(instant)).append("\""); + sb.append(" date=\"").append(df.format(localDate)).append("\""); sb.append(" type=\"").append(astronomicalCalendar.getClass().getName()).append("\""); sb.append(" algorithm=\"").append(astronomicalCalendar.getAstronomicalCalculator().getCalculatorName()).append("\""); sb.append(" location=\"").append(astronomicalCalendar.getGeoLocation().getLocationName()).append("\""); @@ -409,7 +411,9 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { sb.append(" elevation=\"").append(astronomicalCalendar.getGeoLocation().getElevation()).append("\""); sb.append(" timeZoneName=\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\""); sb.append(" timeZoneID=\"").append(zi.getId()).append("\""); - double offsetHours = astronomicalCalendar.getZonedDateTime().getOffset().getTotalSeconds() / 3600.0; + + ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); + double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); //sb.append(" useElevationAllZmanim=\"").append(astronomicalCalendar.useElevationAllZmanim()).append("\""); //TODO likely using reflection @@ -455,7 +459,7 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = (Zman) dateList.get(i); sb.append("\t<").append(zman.getLabel()).append(">"); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getZonedDateTime())); + sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); sb.append("\n"); } Collections.sort(durationList, Zman.DURATION_ORDER); @@ -539,11 +543,11 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd") .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); - Instant instant = astronomicalCalendar.getZonedDateTime().toInstant(); + LocalDate localDate = astronomicalCalendar.getLocalDate(); ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); StringBuilder sb = new StringBuilder("{\n\"metadata\":{\n"); - sb.append("\t\"date\":\"").append(df.format(instant)).append("\",\n"); + sb.append("\t\"date\":\"").append(df.format(localDate)).append("\",\n"); sb.append("\t\"type\":\"").append(astronomicalCalendar.getClass().getName()).append("\",\n"); sb.append("\t\"algorithm\":\"").append(astronomicalCalendar.getAstronomicalCalculator().getCalculatorName()).append("\",\n"); sb.append("\t\"location\":\"").append(astronomicalCalendar.getGeoLocation().getLocationName()).append("\",\n"); @@ -554,9 +558,9 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { sb.append("\t\"timeZoneName\":\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\",\n"); sb.append("\t\"timeZoneID\":\"").append(zi.getId()).append("\",\n"); //FIXME - - - double offsetHours = astronomicalCalendar.getZonedDateTime().getOffset().getTotalSeconds() / 3600.0; + + ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); + double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); sb.append("},\n\""); @@ -603,7 +607,7 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = (Zman) dateList.get(i); sb.append("\t\"").append(zman.getLabel()).append("\":\""); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getZonedDateTime())); + sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); sb.append("\",\n"); } Collections.sort(durationList, Zman.DURATION_ORDER); From 46d39f51ff45db67bb0d4865850dced1559a59f0 Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:17:11 -0400 Subject: [PATCH 016/121] Improve sunrise/set method names (#254) * Migrate AstronomicalCalendar to use LocalDate - Fix Timezone Bug - Use correct SUNRISE enum in getInstantFromTime * Fix Javadocs * Rename getSunrise to getSunriseWithElevation. Fix javadoc on `isUseElevation` * Rename getElevationAdjustedSunset/rise to avoid further confusion. --- .../zmanim/AstronomicalCalendar.java | 97 +++++--- .../zmanim/ComprehensiveZmanimCalendar.java | 212 +++++++++--------- .../com/kosherjava/zmanim/ZmanimCalendar.java | 110 ++++----- .../RegressionTestFileWriter.java | 3 +- 4 files changed, 231 insertions(+), 191 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 270f79c0..618f7336 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -23,15 +23,13 @@ import java.time.LocalTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; -import java.util.TimeZone; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import com.kosherjava.zmanim.util.ZmanimFormatter; /** - * A Java calendar that calculates astronomical times such as {@link #getSunrise() sunrise}, {@link #getSunset() + * A Java calendar that calculates astronomical times such as {@link #getSunriseWithElevation() sunrise}, {@link #getSunsetWithElevation() * sunset} and twilight times. This class contains a {@link #getLocalDate() zonedDateTime} and can therefore use the standard * Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be * changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with @@ -112,7 +110,7 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The getSunrise method returns a Instant representing the + * The getSunriseWithElevation method returns a Instant 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 @@ -127,7 +125,7 @@ public class AstronomicalCalendar implements Cloneable { * @see #getSeaLevelSunrise() * @see AstronomicalCalendar#getUTCSunrise */ - public Instant getSunrise() { + public Instant getSunriseWithElevation() { double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); if (Double.isNaN(sunrise)) { return null; @@ -135,6 +133,28 @@ public Instant getSunrise() { return getInstantFromTime(sunrise, SolarEvent.SUNRISE); } } + /** + * @deprecated Use {@link #getSunriseWithElevation()} instead. + * This method already accounts for the observer's elevation, but the name + * does not clearly indicate this behavior. The replacement method has a + * clearer and more descriptive name. + * + * @return the Instant representing the exact sunrise 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, a null will be returned. See detailed explanation on top of the page. + * @see AstronomicalCalculator#adjustZenith + * @see #getSeaLevelSunrise() + * @see AstronomicalCalendar#getUTCSunrise + */ + @Deprecated(forRemoval = false) + public Instant getSunrise() { + double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); + if (Double.isNaN(sunrise)) { + return null; + } else { + return getInstantFromTime(sunrise, SolarEvent.SUNRISE); + } + } /** * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation @@ -145,7 +165,7 @@ public Instant getSunrise() { * @return the Instant representing the exact sea-level sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getSunrise + * @see AstronomicalCalendar#getSunriseWithElevation * @see AstronomicalCalendar#getUTCSeaLevelSunrise * @see #getSeaLevelSunset() */ @@ -196,18 +216,40 @@ public Instant getBeginAstronomicalTwilight() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } + /** + * The getSunsetWithElevation method returns a Instant 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 + * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction + * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. + * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note: + * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone + * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this + * case the sunset date will be incremented to the following date. + * + * @return the Instant representing the exact sunset 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, a null will be returned. See detailed explanation on top of the page. + * @see AstronomicalCalculator#adjustZenith + * @see #getSeaLevelSunset() + * @see AstronomicalCalendar#getUTCSunset + */ + public Instant getSunsetWithElevation() { + double sunset = getUTCSunset(GEOMETRIC_ZENITH); + if (Double.isNaN(sunset)) { + return null; + } else { + return getInstantFromTime(sunset, SolarEvent.SUNSET); + } + } + /** - * The getSunset method returns a Instant 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 - * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction - * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. - * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note: - * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone - * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this - * case the sunset date will be incremented to the following date. - * + * @deprecated Use {@link #getSunsetWithElevation()} instead. + * This method already accounts for the observer's elevation, but its name + * does not clearly reflect that behavior. The replacement method provides + * a more accurate and descriptive name. + * * @return the Instant representing the exact sunset 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, a null will be returned. See detailed explanation on top of the page. @@ -215,6 +257,7 @@ public Instant getBeginAstronomicalTwilight() { * @see #getSeaLevelSunset() * @see AstronomicalCalendar#getUTCSunset */ + @Deprecated(forRemoval = false) public Instant getSunset() { double sunset = getUTCSunset(GEOMETRIC_ZENITH); if (Double.isNaN(sunset)) { @@ -233,9 +276,9 @@ public Instant getSunset() { * @return the Instant representing the exact sea-level sunset 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getSunset + * @see AstronomicalCalendar#getSunsetWithElevation * @see AstronomicalCalendar#getUTCSeaLevelSunset - * @see #getSunset() + * @see #getSunsetWithElevation() */ public Instant getSeaLevelSunset() { double sunset = getUTCSeaLevelSunset(GEOMETRIC_ZENITH); @@ -317,15 +360,15 @@ public static Instant getTimeOffset(Instant time, long offsetMillis) { /** * A utility method that returns the time of an offset by degrees below or above the horizon of - * {@link #getSunrise() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° + * {@link #getSunriseWithElevation() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees before {@link #getSunrise()} to use in the calculation. For time after sunrise use + * the degrees before {@link #getSunriseWithElevation()} to use in the calculation. For time after sunrise use * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14° * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a * parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunrise()}. If the calculation + * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunriseWithElevation()}. 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 page. @@ -337,15 +380,15 @@ public Instant getSunriseOffsetByDegrees(double offsetZenith) { } /** - * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunset() + * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunsetWithElevation() * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees after {@link #getSunset()} to use in the calculation. For time before sunset use negative + * the degrees after {@link #getSunsetWithElevation()} to use in the calculation. For time before sunset use negative * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunset()}. If the calculation can't + * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunsetWithElevation()}. 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 page. @@ -466,8 +509,8 @@ public long getTemporalHour() { /** * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset * passed as parameters to this method. An example of the use of this method would be the calculation of a - * elevation adjusted temporal hour by passing in {@link #getSunrise() sunrise} and - * {@link #getSunset() sunset} as parameters. + * elevation adjusted temporal hour by passing in {@link #getSunriseWithElevation() sunrise} and + * {@link #getSunsetWithElevation() sunset} as parameters. * * @param startOfDay * The start of the day. diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index e16acf23..fa2bbb43 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -17,8 +17,6 @@ import java.time.LocalDate; import java.util.Calendar; // FIXME remove once FORWARD can be refactored. -import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; import java.time.Instant; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; @@ -33,7 +31,7 @@ * 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 * {@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 + * time based on degrees or time before or after {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} and are of interest * for calculation beyond zmanim calculations. Here are some examples. *

First create the Calendar for the location you would like to calculate: * @@ -168,7 +166,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating misheyakir according to some opinions. This calculation is based on the position of the sun - * 45 minutes before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux which * calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -179,7 +177,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating misheyakir according to some opinions. This calculation is based on the position of the sun - * 48 minutes before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux, which * calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -190,7 +188,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating misheyakir according to some opinions. This calculation is based on the position of the sun - * 52 minutes before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux, which * calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -201,7 +199,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun slightly less - * than 57 minutes before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux, which * calculates to 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -324,7 +322,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 6° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating tzais / nightfall based on the opinion of the Baal Hatanya. This calculation is based on the - * position of the sun 24 minutes after {@link #getSunset() sunset} in Jerusalem around the equinox / equilux, which * is 6° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -568,11 +566,11 @@ public long getShaahZmanis72Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation + * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day - * from {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. + * from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -603,11 +601,11 @@ public long getShaahZmanis90Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides + * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal - * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunrise() sunrise} to - * {@link #getSunset() sunset}. + * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunriseWithElevation() sunrise} to + * {@link #getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -623,11 +621,11 @@ public long getShaahZmanis90MinutesZmanis() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides the + * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides the * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from - * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. + * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -644,8 +642,8 @@ public long getShaahZmanis96MinutesZmanis() { * Method to return a shaah zmanis (temporal hour) according to the opinion of the * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before - * {@link #getSunrise() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40 - * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunset() + * {@link #getSunriseWithElevation() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40 + * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunsetWithElevation() * sunset}. This day is split into 12 equal parts with 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}. @@ -746,11 +744,11 @@ public long getShaahZmanis120Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunrise() sunrise}. This calculation divides + * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from - * {@link #getSunrise() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are + * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. Since zmanim that use this method are * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point * is reached, zmanim that use this should only be used lechumra such as delaying the start of * nighttime mitzvos. @@ -820,7 +818,7 @@ public Instant getPlagHamincha120Minutes() { } /** - * Method to return alos (dawn) calculated as 60 minutes before {@link #getSunrise() sunrise} or + * Method to return alos (dawn) calculated as 60 minutes before {@link #getSunriseWithElevation() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is the * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the @@ -852,7 +850,7 @@ public Instant getPlagHamincha120Minutes() { * @see #getShaahZmanis60Minutes() */ public Instant getAlos60() { - return getTimeOffset(getElevationAdjustedSunrise(), -60 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -60 * MINUTE_MILLIS); } /** @@ -860,9 +858,9 @@ public Instant getAlos60() { * 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 day being from {@link #getSeaLevelSunrise() sea - * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() + * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link - * #getElevationAdjustedSunrise()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation is used in the calendars + * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * @@ -877,7 +875,7 @@ public Instant getAlos72Zmanis() { } /** - * Method to return alos (dawn) calculated using 96 minutes before {@link #getSunrise() sunrise} or + * Method to return alos (dawn) calculated using 96 minutes before {@link #getSunriseWithElevation() 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. @@ -892,18 +890,18 @@ public Instant getAlos72Zmanis() { * documentation. */ public Instant getAlos96() { - return getTimeOffset(getElevationAdjustedSunrise(), -96 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -96 * MINUTE_MILLIS); } /** * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before - * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link * #isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 * mil is 90 minutes which is 1/8th of a day (12 * 60) / 8 = 90. 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()}. The actual calculation used - * is {@link #getElevationAdjustedSunrise()} - ({@link #getShaahZmanisGra()} * 1.5). + * #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() + * sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used + * is {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGra()} * 1.5). * * @return the Instant 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, @@ -917,12 +915,12 @@ public Instant getAlos90Zmanis() { /** * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before - * {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link * #isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96). 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()}. The actual calculation used is {@link #getElevationAdjustedSunrise()} + * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() + * sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunriseBasedOnElevationSetting()} * - ({@link #getShaahZmanisGra()} * 1.6). * * @return the Instant representing the time. If the calculation can't be computed such as in the Arctic @@ -936,7 +934,7 @@ public Instant getAlos96Zmanis() { } /** - * Method to return alos (dawn) calculated using 90 minutes before {@link #getSunrise() sunrise} or + * Method to return alos (dawn) calculated using 90 minutes before {@link #getSunriseWithElevation() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) based * on the time to walk the distance of 4 mil at 22.5 minutes a @@ -951,12 +949,12 @@ public Instant getAlos96Zmanis() { * documentation. */ public Instant getAlos90() { - return getTimeOffset(getElevationAdjustedSunrise(), -90 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -90 * MINUTE_MILLIS); } /** * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes - * before {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * before {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link * #isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a * mil. Time based offset calculations for alos are based on the* opinion of the lechumra only and method returns alos (dawn) calculated using - * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunrise() sunrise} or {@link + * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunriseWithElevation() sunrise} or {@link * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based * on a 24-minute 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 #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 + * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The + * actual calculation used is {@link #getSunriseWithElevation()} - ({@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 * performed during the day. @@ -1117,7 +1115,7 @@ public Instant getAlos16Point1Degrees() { /** * This method returns misheyakir based on the position of the sun {@link #ZENITH_12_POINT_85 12.85°} * below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly - * later than 57 minutes before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux. This * zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes - * before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @todo recalculate. @@ -1181,7 +1179,7 @@ public Instant getMisheyakir11Point5Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes - * before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -1199,7 +1197,7 @@ public Instant getMisheyakir11Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2 * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes - * before {@link #getSunrise() sunrise} in Jerusalem around the equinox which calculates * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -1277,7 +1275,7 @@ public Instant getMisheyakir9Point5Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This + * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunriseWithElevation() sunrise}. This * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall * with both being 19.8° below sunrise or sunset. This returns the time of 3 * @@ -1297,7 +1295,7 @@ public Instant getSofZmanShmaMGA19Point8Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time + * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of @@ -1317,7 +1315,7 @@ public Instant getSofZmanShmaMGA16Point1Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 3 + * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunriseWithElevation() sunrise}. This time is 3 * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after @@ -1337,7 +1335,7 @@ public Instant getSofZmanShmaMGA18Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 3 {@link + * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link @@ -1361,7 +1359,7 @@ public Instant getSofZmanShmaMGA72Minutes() { * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before - * {@link #getSunrise() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} + * {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes @@ -1383,7 +1381,7 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 3 + * alos being {@link #getAlos90() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 * @@ -1404,7 +1402,7 @@ public Instant getSofZmanShmaMGA90Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() + * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} @@ -1426,7 +1424,7 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 3 + * on alos being {@link #getAlos96() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link @@ -1447,7 +1445,7 @@ public Instant getSofZmanShmaMGA96Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunrise() + * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} @@ -1498,7 +1496,7 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunrise() sunrise}. + * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunriseWithElevation() sunrise}. * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3 @@ -1540,7 +1538,7 @@ public Instant getSofZmanShmaMGA120Minutes() { * @see #getSeaLevelSunset() */ public Instant getSofZmanShmaAlos16Point1ToSunset() { - return getSofZmanShma(getAlos16Point1Degrees(), getElevationAdjustedSunset(), false); + return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); } /** @@ -1569,7 +1567,7 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunrise() sunrise}. This time + * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunriseWithElevation() sunrise}. This time * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link @@ -1591,7 +1589,7 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunrise() sunrise}. This time + * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link @@ -1612,7 +1610,7 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunrise() sunrise}. This time is 4 + * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunriseWithElevation() sunrise}. This time is 4 * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after @@ -1633,7 +1631,7 @@ public Instant getSofZmanTfilaMGA18Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72() 72} minutes before {@link #getSunrise() sunrise}. This time is 4 + * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 * @@ -1655,7 +1653,7 @@ public Instant getSofZmanTfilaMGA72Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is 4 + * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is 4 * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn} * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos @@ -1675,7 +1673,7 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90() 90} minutes before {@link #getSunrise() sunrise}. This time is 4 + * alos being {@link #getAlos90() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 * @@ -1695,7 +1693,7 @@ public Instant getSofZmanTfilaMGA90Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is + * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn} * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes @@ -1716,7 +1714,7 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos96() 96} minutes before {@link #getSunrise() sunrise}. This time is 4 + * alos being {@link #getAlos96() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 * @@ -1736,7 +1734,7 @@ public Instant getSofZmanTfilaMGA96Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunrise() sunrise}. This time is + * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn} * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes @@ -1757,7 +1755,7 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos120() 120} minutes before {@link #getSunrise() sunrise} . This time is 4 + * alos being {@link #getAlos120() 120} minutes before {@link #getSunriseWithElevation() sunrise} . This time is 4 * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn} * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of @@ -2250,7 +2248,7 @@ public Instant getPlagHamincha18Degrees() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the opinion - * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset() sunset}. + * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunsetWithElevation() sunset}. * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() @@ -2273,7 +2271,7 @@ public Instant getPlagHamincha18Degrees() { */ @Deprecated (forRemoval=false) public Instant getPlagAlosToSunset() { - return getPlagHamincha(getAlos16Point1Degrees(), getElevationAdjustedSunset(), false); + return getPlagHamincha(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); } /** @@ -2360,7 +2358,7 @@ public Instant getBainHashmashosRT13Point24Degrees() { * */ public Instant getBainHashmashosRT58Point5Minutes() { - return getTimeOffset(getElevationAdjustedSunset(), 58.5 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 58.5 * MINUTE_MILLIS); } /** @@ -2393,11 +2391,11 @@ public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { */ public Instant getBainHashmashosRT2Stars() { Instant alos19Point8 = getAlos19Point8Degrees(); - Instant sunrise = getElevationAdjustedSunrise(); + Instant sunrise = getSunriseBasedOnElevationSetting(); if (alos19Point8 == null || sunrise == null) { return null; } - return getTimeOffset(getElevationAdjustedSunset(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); + return getTimeOffset(getSunsetBasedOnElevationSetting(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); } /** @@ -2414,7 +2412,7 @@ public Instant getBainHashmashosRT2Stars() { * @see #getBainHashmashosYereim3Point05Degrees() */ public Instant getBainHashmashosYereim18Minutes() { - return getTimeOffset(getElevationAdjustedSunset(), -18 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS); } /** @@ -2467,7 +2465,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() { * @see #getBainHashmashosYereim2Point8Degrees() */ public Instant getBainHashmashosYereim16Point875Minutes() { - return getTimeOffset(getElevationAdjustedSunset(), -16.875 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS); } /** @@ -2510,7 +2508,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() { * @see #getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim13Point5Minutes() { - return getTimeOffset(getElevationAdjustedSunset(), -13.5 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS); } /** @@ -2784,7 +2782,7 @@ public Instant 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 #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link + * for 4 mil after {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link * #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60()}. * * @return the Instant representing 60 minutes after sea level sunset. If the calculation can't be @@ -2797,7 +2795,7 @@ public Instant getTzaisGeonim9Point75Degrees() { * @see #getShaahZmanis60Minutes() */ public Instant getTzais60() { - return getTimeOffset(getElevationAdjustedSunset(), 60 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS); } /** @@ -2817,7 +2815,7 @@ public Instant getTzais60() { * @see #setAteretTorahSunsetOffset(double) */ public Instant getTzaisAteretTorah() { - return getTimeOffset(getElevationAdjustedSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); } /** @@ -3011,9 +3009,9 @@ private Instant getZmanisBasedOffset(double hours) { } if (hours > 0) { - return getTimeOffset(getElevationAdjustedSunset(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours)); } else { - return getTimeOffset(getElevationAdjustedSunrise(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours)); } } @@ -3047,7 +3045,7 @@ public Instant getTzais96Zmanis() { } /** - * Method to return tzais (dusk) calculated as 90 minutes after {@link #getSunset() sunset} or {@link + * Method to return tzais (dusk) calculated as 90 minutes after {@link #getSunsetWithElevation() sunset} or {@link * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). This method returns * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a mil according to the mil * according to the Rambam's opinion is 2/5 of an hour (24 minutes) * for a total of 120 minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link - * #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). + * #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). * A similar calculation {@link #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. * Since the zman is extremely late and at a point that 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. @@ -3090,7 +3088,7 @@ public Instant getTzais90() { */ @Deprecated (forRemoval=false) public Instant getTzais120() { - return getTimeOffset(getElevationAdjustedSunset(), 120 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 120 * MINUTE_MILLIS); } /** @@ -3192,7 +3190,7 @@ public Instant getTzais19Point8Degrees() { } /** - * A method to return tzais (dusk) calculated as 96 minutes after {@link #getSunset() sunset} or {@link + * A method to return tzais (dusk) calculated as 96 minutes after {@link #getSunsetWithElevation() sunset} or {@link * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how * this is calculated see the comments on {@link #getAlos96()}. * @@ -3203,7 +3201,7 @@ public Instant getTzais19Point8Degrees() { * @see #getAlos96() */ public Instant getTzais96() { - return getTimeOffset(getElevationAdjustedSunset(), 96 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS); } /** @@ -3583,7 +3581,7 @@ public Instant getSofZmanAchilasChametzGRA() { /** * This method returns the latest time one is allowed eating 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 identical to the + * being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA() * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes @@ -3613,7 +3611,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunrise() sunrise}. This time is identical to the + * being {@link #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the * {@link #getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link #getShaahZmanis72MinutesZmanis() * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis @@ -3644,7 +3642,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { /** * This method returns the latest time one is allowed eating 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 4 {@link + * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time is 4 {@link * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after @@ -3690,7 +3688,7 @@ public Instant getSofZmanBiurChametzGRA() { jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getElevationAdjustedSunrise(), getShaahZmanisGra() * 5); + return getTimeOffset(getSunriseBasedOnElevationSetting(), getShaahZmanisGra() * 5); } else { return null; } @@ -3700,7 +3698,7 @@ public Instant getSofZmanBiurChametzGRA() { * 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 + * being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after @@ -3728,7 +3726,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { * 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 #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunrise() sunrise}. This time is 5 {@link + * being {@link #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link * #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of * the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link * #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link #getShaahZmanis72MinutesZmanis()} after @@ -3756,7 +3754,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { * 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 + * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time is 5 * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after @@ -3812,7 +3810,7 @@ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { * 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 page. * - * @see #getSunrise() + * @see #getSunriseWithElevation() * @see #getSeaLevelSunrise() * @see #getSunsetBaalHatanya() * @see #ZENITH_1_POINT_583 @@ -3843,7 +3841,7 @@ private Instant getSunriseBaalHatanya() { * rise, and one where it does not set, a null will be returned. See detailed explanation on top of * the {@link AstronomicalCalendar} documentation. * - * @see #getSunset() + * @see #getSunsetWithElevation() * @see #getSeaLevelSunset() * @see #getSunriseBaalHatanya() * @see #ZENITH_1_POINT_583 @@ -3885,7 +3883,7 @@ public long getShaahZmanisBaalHatanya() { /** * Returns the Baal Hatanya's alos * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon} - * before {@link #getSunrise() sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}. + * before {@link #getSunriseWithElevation() sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}. * * @see #ZENITH_16_POINT_9 * @return The Instant of dawn. If the calculation can't be computed such as northern and southern @@ -4068,7 +4066,7 @@ public Instant getPlagHaminchaBaalHatanya() { /** * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon - * (90°) after {@link #getSunset() sunset}. For information on the source of this calculation see + * (90°) after {@link #getSunsetWithElevation() sunset}. For information on the source of this calculation see * {@link #ZENITH_6_DEGREES}. * * @return The Instant of nightfall. If the calculation can't be computed such as northern and southern @@ -4167,7 +4165,7 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * This method returns Rav Moshe Feinstein's opinion of the * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the GRA that the day is calculated from - * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunrise() + * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunriseWithElevation() * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos * zmaniyos (solar hours) after sunrise or half of this half-day. * @@ -4175,12 +4173,12 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * 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. - * @see #getSunrise() + * @see #getSunriseWithElevation() * @see #getFixedLocalChatzos() * @see #getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getElevationAdjustedSunrise(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 3); } /** @@ -4188,19 +4186,19 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers)) * according to the opinion of the GRA that the day is * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at - * {@link #getSunrise() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila + * {@link #getSunriseWithElevation() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see #getSunrise() + * @see #getSunriseWithElevation() * @see #getFixedLocalChatzos() * @see #getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getElevationAdjustedSunrise(), getFixedLocalChatzos(), 4); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 4); } /** @@ -4240,7 +4238,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) */ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzos(), getElevationAdjustedSunset(), 3.5); + return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 3.5); } /** @@ -4261,11 +4259,11 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) */ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzos(), getElevationAdjustedSunset(), 4.75); + return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 4.75); } /** - * Method to return tzais (dusk) calculated as 50 minutes after {@link #getSunset() sunset} or {@link + * Method to return tzais (dusk) calculated as 50 minutes after {@link #getSunsetWithElevation() sunset} or {@link * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). 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 other than ones similar to the latitude of the NY area. @@ -4276,7 +4274,7 @@ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { * documentation. */ public Instant getTzais50() { - return getTimeOffset(getElevationAdjustedSunset(), 50 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 50 * MINUTE_MILLIS); } /** @@ -4284,8 +4282,8 @@ public Instant getTzais50() { * {@link #getMinchaKetana()} or is 9 * shaos zmaniyos (solar hours) after the start of * the day, calculated according to the GRA using a day starting at * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link #getShaahZmanisGra()} after {@link #getSunrise() sunrise} or {@link - * #getElevationAdjustedSunrise() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the + * The calculation used is 9 * {@link #getShaahZmanisGra()} after {@link #getSunriseWithElevation() sunrise} or {@link + * #getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the * Mechaber and Mishna Berurah 232 and 249:2. * @@ -4298,7 +4296,7 @@ public Instant getTzais50() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSamuchLeMinchaKetanaGRA() { - return getSamuchLeMinchaKetana(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getSamuchLeMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 19f06be3..8cfd7274 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -39,8 +39,8 @@ * "https://www.worldcat.org/oclc/919472094">Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link - * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunrise()}, - * {@link #getSunset()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()} + * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunriseWithElevation()}, + * {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()} * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as * {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link @@ -88,8 +88,8 @@ public class ZmanimCalendar extends AstronomicalCalendar { * "https://www.worldcat.org/oclc/919472094">Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons * should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for * zmanim calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will - * impact sunrise and sunset based zmanim such as {@link #getSunrise()}, {@link #getSunset()}, - * {@link #getSofZmanShmaGRA()}, alos based zmanim such as {@link #getSofZmanShmaMGA()} that are based on a + * impact sunrise and sunset based zmanim such as {@link #getSofZmanShmaGRA()}, + * alos based zmanim such as {@link #getSofZmanShmaMGA()} that are based on a * fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as {@link * ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact * zmanim that are a degree based offset of sunrise and sunset, such as @@ -220,7 +220,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position below the horizon 72 minutes - * before {@link #getSunrise() sunrise} in Jerusalem around the equinox / equilux is * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @@ -240,7 +240,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the sun's position below the - * horizon 36 minutes after {@link #getSunset() sunset} in Jerusalem around the equinox / equilux, which * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible, @@ -259,39 +259,39 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the - * default), or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim + * default), or elevation adjusted {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. This allows relevant zmanim * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted - * {@link AstronomicalCalendar#getSunrise()} if it is true. - * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunrise() + * {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. + * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunriseWithElevation() */ - protected Instant getElevationAdjustedSunrise() { + protected Instant getSunriseBasedOnElevationSetting() { if (isUseElevation()) { - return super.getSunrise(); + return super.getSunriseWithElevation(); } return getSeaLevelSunrise(); } /** * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default), - * or elevation adjusted {@link AstronomicalCalendar#getSunrise()} if it is true. This allows relevant zmanim + * or elevation adjusted {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. This allows relevant zmanim * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted - * {@link AstronomicalCalendar#getSunset()} if it is true. - * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunset() + * {@link AstronomicalCalendar#getSunsetWithElevation()} if it is true. + * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunsetWithElevation() */ - protected Instant getElevationAdjustedSunset() { + protected Instant getSunsetBasedOnElevationSetting() { if (isUseElevation()) { - return super.getSunset(); + return super.getSunsetWithElevation(); } return getSeaLevelSunset(); } /** * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the - * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunset() sunset}, a time that Rabbi Meir + * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunsetWithElevation() sunset}, a time that Rabbi Meir * Posen in his the Ohr Meir calculated that 3 small * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant. * @@ -310,11 +310,11 @@ public Instant getTzais() { /** * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the - * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunrise() sunrise}. This is based on the + * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunriseWithElevation() sunrise}. This is based on the * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is * takes to walk 4 mil at * 18 minutes a mil (Rambam and others). The sun's position - * below the horizon 72 minutes before {@link #getSunrise() sunrise} in Jerusalem on the around the equinox / equilux is * 16.1° below {@link #GEOMETRIC_ZENITH}. * @@ -331,7 +331,7 @@ public Instant getAlosHashachar() { } /** - * Method to return alos (dawn) calculated as 72 minutes before {@link #getSunrise() sunrise} or + * Method to return alos (dawn) calculated as 72 minutes before {@link #getSunriseWithElevation() 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 @@ -345,7 +345,7 @@ public Instant getAlosHashachar() { * documentation. */ public Instant getAlos72() { - return getTimeOffset(getElevationAdjustedSunrise(), -72 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS); } /** @@ -425,9 +425,9 @@ public Instant getChatzosAsHalfDay() { * hours), and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of * the day. If {@link #isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be * based on 1/6 of the time between sunrise and {@link #getSunTransit() astronomical chatzos}. As an example, passing - * {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link #getSeaLevelSunrise() sea level sunrise} and {@link - * #getSeaLevelSunset() sea level sunset} to this method (or {@link #getElevationAdjustedSunrise()} and {@link - * #getElevationAdjustedSunset()} that is driven off the {@link #isUseElevation()} setting) will return sof zman krias + * {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() sea level sunrise} and {@link + * #getSeaLevelSunset() sea level sunset} to this method (or {@link #getSunriseBasedOnElevationSetting()} and {@link + * #getSunsetBasedOnElevationSetting()} that is driven off the {@link #isUseElevation()} setting) will return sof zman krias * shema according to the opinion of the GRA. In cases * where the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar * #getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees()} false should be passed to the synchronous parameter @@ -479,11 +479,11 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * - * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or + * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the + * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the * {@link #isUseElevation()} setting). * * @see #getSofZmanShma(Instant, Instant) @@ -496,7 +496,7 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { * of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanShmaGRA() { - return getSofZmanShma(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getSofZmanShma(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -504,7 +504,7 @@ public Instant 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 - * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() + * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * sunset} (depending on the {@link #isUseElevation()} setting). * * @return the Instant of the latest zman shema. If the calculation can't be computed such as in @@ -528,7 +528,7 @@ public Instant getSofZmanShmaMGA() { * 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. + * offset from either {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} is used. * * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @return the Instant representing 72 minutes after sunset. If the calculation can't be @@ -537,7 +537,7 @@ public Instant getSofZmanShmaMGA() { * {@link AstronomicalCalendar} documentation. */ public Instant getTzais72() { - return getTimeOffset(getElevationAdjustedSunset(), 72 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS); } /** @@ -565,7 +565,7 @@ public Instant getCandleLighting() { * 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 sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day. - * As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link #getSeaLevelSunrise() + * As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 zman tfilah according to the opinion of the GRA. This method's synchronous parameter indicates if the start @@ -621,11 +621,11 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunrise() sunrise} or + * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the + * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the * {@link #isUseElevation()} setting). * * @see #getSofZmanTfila(Instant, Instant) @@ -637,7 +637,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanTfilaGRA() { - return getSofZmanTfila(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getSofZmanTfila(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -645,7 +645,7 @@ public Instant 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 - * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunrise() sunrise} to {@link #getSunset() + * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * sunset} (depending on the {@link #isUseElevation()} setting). * * @return the Instant of the latest zman tfila. If the calculation can't be computed such as in @@ -665,7 +665,7 @@ public Instant getSofZmanTfilaMGA() { * 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 - * of the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link + * of the day. As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 gedola according to the opinion of the * GRA. Alternatively, this method uses {@link @@ -731,14 +731,14 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 * - * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or + * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according * to the GRA. Mincha gedola is the earliest * 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 #getSeaLevelSunset() sea level - * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} * setting). * @todo Consider adjusting this to calculate the time as half an hour zmaniyos after either {@link * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} @@ -754,7 +754,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaGedola() { - return getMinchaGedola(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getMinchaGedola(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -763,7 +763,7 @@ public Instant getMinchaGedola() { * 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 * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day. - * For example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link #getSeaLevelSunrise() sea + * For example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 samuch lemincha ketana according to the opinion of the * GRA. See the shaos zmaniyos (temporal hours), and * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link #getSeaLevelSunrise() sea + * example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 if the start @@ -881,12 +881,12 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { /** * This method returns mincha ketana,the preferred earliest time to pray mincha in the * opinion of the Rambam and others, that is 9.5 - * * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunrise() sunrise} or + * * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or * {@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 #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} * setting. * * @see #getMinchaKetana(Instant, Instant) @@ -899,7 +899,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaKetana() { - return getMinchaKetana(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -908,7 +908,7 @@ public Instant getMinchaKetana() { * the day passed to the method. * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link #getSeaLevelSunrise() sea level + * example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 plag mincha according to the opinion of the * GRA. This method's synchronous parameter indicates if the start @@ -962,11 +962,11 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { /** * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos} - * (solar hours) after {@link #getSunrise() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on + * (solar hours) after {@link #getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() sunset} (depending on the {@link #isUseElevation()} + * sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} * * @see #getPlagHamincha(Instant, Instant, boolean) * @see #getPlagHamincha(Instant, Instant) @@ -977,14 +977,14 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getPlagHamincha() { - return getPlagHamincha(getElevationAdjustedSunrise(), getElevationAdjustedSunset(), true); + return getPlagHamincha(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) 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 level - * sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunrise() sunrise} to {@link #getSunset() + * sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * 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 account for elevation. * @@ -998,16 +998,16 @@ public Instant getPlagHamincha() { * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() */ public long getShaahZmanisGra() { - return getTemporalHour(getElevationAdjustedSunrise(), getElevationAdjustedSunset()); + return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting()); } /** * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72-minute 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() + * tfila). Dawn for this calculation is 72 minutes before {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() * sea level sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link - * #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation + * #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation * setting). This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating * a shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComprehensiveZmanimCalendar}. * @@ -1071,7 +1071,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { /** * This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition. * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this - * class. Sunset is the classes current day's {@link #getElevationAdjustedSunset() elevation adjusted sunset} that observes the + * class. Sunset is the classes current day's {@link #getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. * * @param currentTime the current time @@ -1091,7 +1091,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr jewishCalendar.setInIsrael(inIsrael); - if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getElevationAdjustedSunset()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah + if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunsetBasedOnElevationSetting()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah return true; } @@ -1103,7 +1103,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr * 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 shaos zmaniyos passed to the * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Instant, Instant)} and cuts down on - * code replication. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} or {@link + * code replication. As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha * according to the opinion of the GRA. diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index d498431d..485df83b 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -1,7 +1,6 @@ package com.kosherjava.zmanim.hebrewcalendar; import com.kosherjava.zmanim.ComprehensiveZmanimCalendar; -import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import java.io.*; @@ -54,7 +53,7 @@ public static void main(String[] args) throws IOException { zcal.getAlos18Degrees(), zcal.getAlos19Degrees(), zcal.getAlos19Point8Degrees(), zcal.getAlos16Point1Degrees(), zcal.getMisheyakir11Point5Degrees(), zcal.getMisheyakir11Degrees(), zcal.getMisheyakir10Point2Degrees(), zcal.getMisheyakir7Point65Degrees(), - zcal.getMisheyakir9Point5Degrees(), zcal.getSunrise(), zcal.getSeaLevelSunrise(), + zcal.getMisheyakir9Point5Degrees(), zcal.getSunriseWithElevation(), zcal.getSeaLevelSunrise(), zcal.getSofZmanShmaMGA16Point1Degrees(), zcal.getSofZmanShmaMGA72Minutes(), zcal.getSofZmanShmaMGA72MinutesZmanis(), zcal.getSofZmanShmaMGA90Minutes(), zcal.getSofZmanShmaMGA90MinutesZmanis(), zcal.getSofZmanShmaMGA96Minutes(), From 61ae480dd4041471a6b17c14f8a2322134bea071 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 17 Mar 2026 13:09:06 -0400 Subject: [PATCH 017/121] Remove code duplication, minor documentation cleanup --- .../zmanim/AstronomicalCalendar.java | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 618f7336..30c98747 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -30,7 +30,7 @@ /** * A Java calendar that calculates astronomical times such as {@link #getSunriseWithElevation() sunrise}, {@link #getSunsetWithElevation() - * sunset} and twilight times. This class contains a {@link #getLocalDate() zonedDateTime} and can therefore use the standard + * sunset} and twilight times. This class contains a {@link #getLocalDate() LocalDate} and can therefore use the standard * Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be * changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with * the {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine @@ -61,8 +61,8 @@ * To get the time of sunrise, first set the date you want (if not set, the date will default to today): * *

- * ZonedDateTime dateTime = ZonedDateTime.of(1969, Month.FEBRUARY.getValue(), 8, 0, 0, 0, 0, location.getZoneId());
- * ac.setZonedDateTime(dateTime);
+ * LocalDate localDate = LocalDate.of(1969, Month.FEBRUARY, 8);
+ * ac.setLocalDate(localDate);
  * Instant sunrise = ac.getSunrise();
  * 
* @@ -95,7 +95,7 @@ public class AstronomicalCalendar implements Cloneable { public static final long HOUR_MILLIS = MINUTE_MILLIS * 60; /** - * The ZonedDateTime encapsulated by this class to track the current date used by the class + * The LocalDate encapsulated by this class to track the current date used by the class */ private LocalDate localDate; @@ -148,12 +148,7 @@ public Instant getSunriseWithElevation() { */ @Deprecated(forRemoval = false) public Instant getSunrise() { - double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); - if (Double.isNaN(sunrise)) { - return null; - } else { - return getInstantFromTime(sunrise, SolarEvent.SUNRISE); - } + return getSunriseWithElevation(); } /** @@ -217,7 +212,7 @@ public Instant getBeginAstronomicalTwilight() { } /** - * The getSunsetWithElevation method returns a Instant representing the + * The getSunsetWithElevation method returns an Instant 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 @@ -259,12 +254,7 @@ public Instant getSunsetWithElevation() { */ @Deprecated(forRemoval = false) public Instant getSunset() { - double sunset = getUTCSunset(GEOMETRIC_ZENITH); - if (Double.isNaN(sunset)) { - return null; - } else { - return getInstantFromTime(sunset, SolarEvent.SUNSET); - } + return getSunsetWithElevation(); } /** @@ -401,7 +391,7 @@ public Instant getSunsetOffsetByDegrees(double offsetZenith) { /** * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default - * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the ZonedDateTime to the current date. + * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the LocalDate to the current date. */ public AstronomicalCalendar() { this(new GeoLocation()); @@ -765,7 +755,7 @@ public Instant getLocalMeanTime(double hours) { } /** - * Adjusts the ZonedDateTime to deal with edge cases where the location crosses the antimeridian. + * Adjusts the LocalDate to deal with edge cases where the location crosses the antimeridian. * * @see GeoLocation#getAntimeridianAdjustment(Instant) * @return the adjusted Calendar @@ -893,18 +883,18 @@ public void setAstronomicalCalculator(AstronomicalCalculator astronomicalCalcula } /** - * returns the ZonedDateTime object encapsulated in this class. + * returns the LocalDate object encapsulated in this class. * - * @return Returns the ZonedDateTime. + * @return Returns the LocalDate. */ public LocalDate getLocalDate() { return this.localDate; } /** - * Sets the ZonedDateTime object for us in this class. + * Sets the LocalDate object for us in this class. * @param localDate - * The ZonedDateTime to set. + * The LocalDate to set. */ public void setLocalDate(LocalDate localDate) { this.localDate = localDate; @@ -927,7 +917,6 @@ public Object clone() { } if (clone != null) { clone.setGeoLocation((GeoLocation) getGeoLocation().clone()); - //clone.setZonedDateTime(getZonedDateTime().clone()); clone.setAstronomicalCalculator((AstronomicalCalculator) getAstronomicalCalculator().clone()); } return clone; From 8097ecacb27a8272b97cb396a43c9a9f289fb4ae Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 17 Mar 2026 21:47:03 -0400 Subject: [PATCH 018/121] Fix JewishCalendar.getMoladAsInstant() --- .../zmanim/hebrewcalendar/JewishCalendar.java | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index ddf05f3d..b2b49813 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -20,9 +20,8 @@ import java.time.Duration; import java.time.Instant; import java.time.LocalDate; -import java.time.ZoneOffset; +import java.time.ZoneId; import java.time.ZonedDateTime; -import java.time.temporal.ChronoUnit; import java.util.Calendar; /** @@ -1234,19 +1233,16 @@ public boolean isTishaBav() { public Instant getMoladAsInstant() { JewishDate molad = getMolad(); - // Har Habayis coordinates - //double latitude = 31.778; - double longitude = 35.2354; - // Standard time offset for Jerusalem: GMT+2 - ZoneOffset jerusalemStandardOffset = ZoneOffset.ofHours(2); + // The raw molad Date (point in time) must be generated using standard time. Using "Asia/Jerusalem" timezone will + // result in the time being incorrectly off by an hour in the summer due to DST. Proper adjustment for the actual + // time in DST will be done by the date formatter class used to display the Date. + ZoneId jerusalemStandardOffset = ZoneId.of("GMT+2"); - // Compute molad seconds from chalakim - double moladSeconds = molad.getMoladChalakim() * 10.0 / 3.0; + double moladSeconds = molad.getMoladChalakim() * 10.0 / 3.0; // Compute molad seconds from chalakim int seconds = (int) moladSeconds; - int millis = (int) ((moladSeconds - seconds) * 1000); + int nanos = (int) ((moladSeconds - seconds) * 1_000_000_000); // convert remainder to nanos - // Construct ZonedDateTime in standard time (GMT+2) ZonedDateTime moladZdt = ZonedDateTime.of( molad.getGregorianYear(), molad.getGregorianMonth() +1, // 1-based FIXME @@ -1254,18 +1250,17 @@ public Instant getMoladAsInstant() { molad.getMoladHours(), molad.getMoladMinutes(), seconds, - millis * 1_000_000, // nanos + nanos, jerusalemStandardOffset ); - // Compute local mean time offset in milliseconds (example: 20.94 minutes = 1256400 ms) - long localMeanOffsetMillis = (long) ((longitude - 35.0) * 4 * 60 * 1000); - - // Apply offset using ChronoUnit.MILLIS - moladZdt = moladZdt.minus(localMeanOffsetMillis, ChronoUnit.MILLIS); + // Har Habayis at a longitude of 35.2354 offset vs longitude 35 in standard time, so we subtract the time difference + // of 20.94 minutes (20 minutes and 56 seconds and 496 millis) to get to Standard time from local mean time + Duration jerusalemStandardTimeOffset = Duration.ofMinutes(20) + .plusSeconds(56) + .plusMillis(496); - // Return precise Instant - return moladZdt.toInstant(); + return moladZdt.toInstant().minus(jerusalemStandardTimeOffset); } /** From 889f1733755f945403b7664c5e93bd341f3f30b9 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 17 Mar 2026 23:49:14 -0400 Subject: [PATCH 019/121] JewishDate - slowly modernizing - Remove Instant constructors and methods - Rename setDate to setGregorianDate - Use LocalDate instead of ZonedDateTime where possible --- .../zmanim/hebrewcalendar/JewishDate.java | 71 ++++++------------- 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index d56ee85d..db74d09d 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -17,9 +17,7 @@ package com.kosherjava.zmanim.hebrewcalendar; import java.time.LocalDate; -import java.time.ZoneId; import java.time.ZonedDateTime; -import java.time.Instant; import java.util.Calendar; import java.util.GregorianCalendar; @@ -975,18 +973,6 @@ public JewishDate() { resetDate(); } - /** - * A constructor that initializes the date to the {@link java.util.Date Date} parameter. - * - * @param instant - * the Instant to set the calendar to - * @throws IllegalArgumentException - * if the date would fall prior to the January 1, 1 AD - */ - public JewishDate(Instant instant) { - setDate(instant); - } - /** * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. * @@ -996,7 +982,7 @@ public JewishDate(Instant instant) { * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ public JewishDate(ZonedDateTime zonedDateTime) { - setDate(zonedDateTime); + setGregorianDate(zonedDateTime); } /** @@ -1008,7 +994,7 @@ public JewishDate(ZonedDateTime zonedDateTime) { * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ public JewishDate(LocalDate localDate) { - setDate(localDate); + setGregorianDate(localDate); } /** @@ -1019,19 +1005,29 @@ public JewishDate(LocalDate localDate) { * @throws IllegalArgumentException * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ - public void setDate(ZonedDateTime zonedDateTime) { - int year = zonedDateTime.getYear(); + public void setGregorianDate(ZonedDateTime zonedDateTime) { + setGregorianDate(zonedDateTime.toLocalDate()); + } - if (year <= 0) { + /** + * Sets the date based on a {@link java.time.LocalDate LocalDate} object. Modifies the Jewish date as well. + * + * @param localDate + * the LocalDate to set the calendar to + * @throws IllegalArgumentException + * if the date would fall prior to the year 1 AD + */ + public void setGregorianDate(LocalDate localDate) { + if (localDate.getYear() <= 0) { throw new IllegalArgumentException( "Calendars with a BC era are not supported. The year " - + year + " BC is invalid." + + localDate.getYear() + " BC is invalid." ); } - gregorianYear = year; - gregorianMonth = zonedDateTime.getMonthValue(); // 1 = January - gregorianDayOfMonth = zonedDateTime.getDayOfMonth(); + gregorianYear = localDate.getYear(); + gregorianMonth = localDate.getMonth().getValue(); // FIXME + 1;// 1 = January + gregorianDayOfMonth = localDate.getDayOfMonth(); // initialize absolute date gregorianAbsDate = gregorianDateToAbsDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); @@ -1043,31 +1039,6 @@ public void setDate(ZonedDateTime zonedDateTime) { dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; } - /** - * Sets the date based on a {@link java.time.Instant Instant} object. Modifies the Jewish date as well. - * - * @param instant - * the Instant to set the calendar to - * @throws IllegalArgumentException - * if the date would fall prior to the year 1 AD - */ - public void setDate(Instant instant) { - setDate(instant.atZone(ZoneId.systemDefault())); - } - - /** - * Sets the date based on a {@link java.time.LocalDate LocalDate} object. Modifies the Jewish date as well. - * - * @param localDate - * the LocalDate to set the calendar to - * @throws IllegalArgumentException - * if the date would fall prior to the year 1 AD - */ - public void setDate(LocalDate localDate) { - ZonedDateTime zdt = localDate.atStartOfDay(ZoneId.systemDefault()); - setDate(zdt); - } - /** * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected * for January. @@ -1206,8 +1177,8 @@ public LocalDate getLocalDate() { * Resets this date to the current system date. */ public void resetDate() { - ZonedDateTime zdt = ZonedDateTime.now(); - setDate(zdt); + LocalDate localDate = LocalDate.now(); + setGregorianDate(localDate); } /** From ad86a42fb1dd4208e6624f29cd04280cba87bd4b Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 17 Mar 2026 23:50:42 -0400 Subject: [PATCH 020/121] JewishCalendar - slowly modernizing - Remove Instant constructor --- .../zmanim/hebrewcalendar/JewishCalendar.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index b2b49813..c2bd6960 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -253,16 +253,6 @@ public JewishCalendar() { super(); } - /** - * A constructor that initializes the date to the {@link java.util.Date Date} parameter. - * - * @param instant - * the Instant to set the calendar to - */ - public JewishCalendar(Instant instant) { - super(instant); - } - /** * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. * @@ -1245,7 +1235,7 @@ public Instant getMoladAsInstant() { ZonedDateTime moladZdt = ZonedDateTime.of( molad.getGregorianYear(), - molad.getGregorianMonth() +1, // 1-based FIXME + molad.getGregorianMonth() + 1, // 1-based FIXME molad.getGregorianDayOfMonth(), molad.getMoladHours(), molad.getMoladMinutes(), From 857e09c750a5d4055ad4954bf3f9a91eced2a902 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 17 Mar 2026 23:53:46 -0400 Subject: [PATCH 021/121] ComprehensiveZmanimCalendar - Simplify JewishCalendar Creation Pass LocalDate to JewishCalendar constructor --- .../zmanim/ComprehensiveZmanimCalendar.java | 74 +++++-------------- 1 file changed, 18 insertions(+), 56 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index fa2bbb43..5fdf35c3 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -3252,11 +3252,8 @@ public Instant getFixedLocalChatzos() { * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() */ public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - - + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); + // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in French // Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush Levana // will be on the 12th of the Teves. In the case of Anadyr, Russia on Jan, 2071, sof zman Kiddush Levana between the @@ -3355,11 +3352,8 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() { * @see JewishCalendar#getSofZmanKidushLevana15Days() */ public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { - JewishCalendar jewishCalendar = new JewishCalendar(); + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - // Do not calculate for impossible dates, but account for extreme cases. In the extreme case of Rapa Iti in // French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on Rosh Chodesh, the sof zman Kiddush // Levana will be on the 12th of the Teves. in the case of Anadyr, Russia on Jan, 2071, sof zman kiddush levana will @@ -3434,11 +3428,7 @@ public Instant getTchilasZmanKidushLevana3Days() { * @see JewishCalendar#getTchilasZmanKidushLevana3Days() */ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { - JewishCalendar jewishCalendar = new JewishCalendar(); - - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); // Do not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 3 days for // the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush Levana 3 days can be said on the evening @@ -3474,11 +3464,7 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { * @see JewishCalendar#getMoladAsInstant() */ public Instant getZmanMolad() { - JewishCalendar jewishCalendar = new JewishCalendar(); - - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); // Optimize to not calculate for impossible dates, but account for extreme cases. The molad in the extreme case of Rapa // Iti in French Polynesia on Dec 2027 occurs on the night of the 27th of Kislev. In the case of Anadyr, Russia on @@ -3519,9 +3505,7 @@ public Instant getZmanMolad() { * @see JewishCalendar#getTchilasZmanKidushLevana7Days() */ public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); // Optimize to not calculate for impossible dates, but account for extreme cases. Tchilas zman kiddush Levana 7 days for // the extreme case of Rapa Iti in French Polynesia on Jan 2028 (when kiddush Levana 3 days can be said on the evening @@ -3567,9 +3551,7 @@ public Instant getTchilasZmanKidushLevana7Days() { * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanAchilasChametzGRA() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaGRA(); @@ -3597,9 +3579,7 @@ public Instant getSofZmanAchilasChametzGRA() { * @see #getSofZmanTfilaMGA72Minutes() */ public Instant getSofZmanAchilasChametzMGA72Minutes() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA72Minutes(); @@ -3627,10 +3607,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { * @see #getSofZmanTfilaMGA72MinutesZmanis() */ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { - JewishCalendar jewishCalendar = new JewishCalendar(); - - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA72MinutesZmanis(); @@ -3657,10 +3634,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { * @see #getSofZmanTfilaMGA16Point1Degrees() */ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { - JewishCalendar jewishCalendar = new JewishCalendar(); - - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaMGA16Point1Degrees(); @@ -3683,9 +3657,7 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanBiurChametzGRA() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getSunriseBasedOnElevationSetting(), getShaahZmanisGra() * 5); @@ -3711,9 +3683,7 @@ public Instant getSofZmanBiurChametzGRA() { * @see #getAlos72() */ public Instant getSofZmanBiurChametzMGA72Minutes() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos72(), getShaahZmanisMGA() * 5); @@ -3739,9 +3709,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { * @see #getAlos72Zmanis() */ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 5); @@ -3769,10 +3737,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { * @see #getAlos16Point1Degrees() */ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 5); @@ -3945,10 +3910,8 @@ public Instant getSofZmanTfilaBaalHatanya() { * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanAchilasChametzBaalHatanya() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime - + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getSofZmanTfilaBaalHatanya(); } else { @@ -3968,9 +3931,8 @@ public Instant getSofZmanAchilasChametzBaalHatanya() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanBiurChametzBaalHatanya() { - JewishCalendar jewishCalendar = new JewishCalendar(); - LocalDate zdt = getLocalDate(); - jewishCalendar.setGregorianDate(zdt.getYear(), zdt.getMonthValue() - 1, zdt.getDayOfMonth()); //FIXME - the minus one needs adjustment when the JewishCalendar is changed to use ZonedDateTime + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { return getTimeOffset(getSunriseBaalHatanya(), getShaahZmanisBaalHatanya() * 5); } else { From 52506a7278bdc59f576c0ea6a5ca58ed9e8493bd Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Sun, 22 Mar 2026 01:01:56 -0400 Subject: [PATCH 022/121] 3 0 modernization (#257) * Migrate AstronomicalCalendar to use LocalDate - Fix Timezone Bug - Use correct SUNRISE enum in getInstantFromTime * Fix Javadocs * Rename getSunrise to getSunriseWithElevation. Fix javadoc on `isUseElevation` * Rename getElevationAdjustedSunset/rise to avoid further confusion. * Fix incorrect adjustment for getFixedLocalChatzos * Update date * revert * implement jewishdate * some eq changes * nuller * fix formaterr, etc. * more changes * configure addYears * more date changes * Fix molad * Modifying a JewishDate no longer resets the molad date * add est jewish month * Remove get local mean time fix. --- .../zmanim/ComprehensiveZmanimCalendar.java | 4 +- .../com/kosherjava/zmanim/ZmanimCalendar.java | 3 +- .../hebrewcalendar/HebrewDateFormatter.java | 2 +- .../zmanim/hebrewcalendar/JewishCalendar.java | 35 +- .../zmanim/hebrewcalendar/JewishDate.java | 2614 +++++++---------- .../zmanim/hebrewcalendar/TefilaRules.java | 2 +- .../YerushalmiYomiCalculator.java | 32 +- .../zmanim/hebrewcalendar/YomiCalculator.java | 24 +- .../RegressionTestFileWriter.java | 478 +-- .../UT_DaysInGregorianMonth.java | 96 - .../UT_GregorianDateNavigation.java | 283 +- .../UT_JewishDateNavigation.java | 33 +- 12 files changed, 1556 insertions(+), 2050 deletions(-) delete mode 100644 src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInGregorianMonth.java diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 5fdf35c3..d22cba56 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -3444,7 +3444,7 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { //Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) if (zman == null && jewishCalendar.getJewishDayOfMonth() == 30) { - jewishCalendar.forward(Calendar.MONTH, 1); + jewishCalendar.addMonths(1); zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true); } @@ -3476,7 +3476,7 @@ public Instant getZmanMolad() { // deal with molad that happens on the end of the previous month if (molad == null && jewishCalendar.getJewishDayOfMonth() > 26) { - jewishCalendar.forward(Calendar.MONTH, 1); + jewishCalendar.addMonths(1); molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); } return molad; diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 8cfd7274..2bb1f04a 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -1086,8 +1086,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { */ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsrael) { JewishCalendar jewishCalendar = new JewishCalendar(); - jewishCalendar.setGregorianDate(getLocalDate().getYear(), getLocalDate().getMonthValue(), - getLocalDate().getDayOfMonth()); + jewishCalendar.setGregorianDate(getLocalDate()); jewishCalendar.setInIsrael(inIsrael); diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 71fa8f12..13497b3d 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -654,7 +654,7 @@ public String formatDayOfWeek(JewishDate jewishDate) { return getTransliteratedShabbosDayOfWeek().substring(0,3); } } else { - return weekFormat.format(jewishDate.getGregorianCalendar().getTime()); + return weekFormat.format(jewishDate.getLocalDate()); } } } diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index c2bd6960..9541b27e 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -20,9 +20,10 @@ import java.time.Duration; import java.time.Instant; import java.time.LocalDate; +import java.time.LocalTime; import java.time.ZoneId; import java.time.ZonedDateTime; -import java.util.Calendar; +import java.util.Calendar; // We still use the old Calendar.WEEKDAY constants /** * The JewishCalendar extends the JewishDate class and adds calendar methods. @@ -506,12 +507,12 @@ public Parsha getUpcomingParshah() { JewishCalendar clone = (JewishCalendar) clone(); int daysToShabbos = (Calendar.SATURDAY - getDayOfWeek() + 7) % 7; if (getDayOfWeek() != Calendar.SATURDAY) { - clone.forward(Calendar.DATE, daysToShabbos); + clone.addDays(daysToShabbos); } else { - clone.forward(Calendar.DATE, 7); + clone.addDays( 7); } while(clone.getParshah() == Parsha.NONE) { //Yom Kippur / Sukkos or Pesach with 2 potential non-parsha Shabbosim in a row - clone.forward(Calendar.DATE, 7); + clone.addDays(7); } return clone.getParshah(); } @@ -1233,16 +1234,9 @@ public Instant getMoladAsInstant() { int seconds = (int) moladSeconds; int nanos = (int) ((moladSeconds - seconds) * 1_000_000_000); // convert remainder to nanos - ZonedDateTime moladZdt = ZonedDateTime.of( - molad.getGregorianYear(), - molad.getGregorianMonth() + 1, // 1-based FIXME - molad.getGregorianDayOfMonth(), - molad.getMoladHours(), - molad.getMoladMinutes(), - seconds, - nanos, - jerusalemStandardOffset - ); + LocalTime time = LocalTime.of(molad.getMoladHours(),molad.getMoladMinutes(),seconds,nanos); + + ZonedDateTime moladZdt = ZonedDateTime.of(molad.getLocalDate(),time,jerusalemStandardOffset); // Har Habayis at a longitude of 35.2354 offset vs longitude 35 in standard time, so we subtract the time difference // of 20.94 minutes (20 minutes and 56 seconds and 496 millis) to get to Standard time from local mean time @@ -1402,9 +1396,9 @@ public boolean equals(Object object) { if (this == object) { return true; } - if (!(object instanceof JewishCalendar)) { - return false; - } + if (object == null || getClass() != object.getClass()) { + return false; + } JewishCalendar jewishCalendar = (JewishCalendar) object; return getAbsDate() == jewishCalendar.getAbsDate() && getInIsrael() == jewishCalendar.getInIsrael(); } @@ -1414,9 +1408,8 @@ public boolean equals(Object object) { * @see Object#hashCode() */ public int hashCode() { - int result = 17; - result = 37 * result + getClass().hashCode(); // needed or this and subclasses will return identical hash - result += 37 * result + getAbsDate() + (getInIsrael() ? 1 : 3); - return result; + int result = Integer.hashCode(getAbsDate()); + result = 31 * result + Boolean.hashCode(getInIsrael()); + return result; } } diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index db74d09d..5a668f0f 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -17,9 +17,8 @@ package com.kosherjava.zmanim.hebrewcalendar; import java.time.LocalDate; +import java.time.YearMonth; import java.time.ZonedDateTime; -import java.util.Calendar; -import java.util.GregorianCalendar; /** * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar} @@ -32,21 +31,21 @@ * href="http://en.wikipedia.org/wiki/Hillel_II">Hillel II's (Hakatan's) calendar (4119 in the Jewish Calendar / 359 * CE Julian as recorded by Rav Hai Gaon) would be just an * approximation. - * + * * This open source Java code was written by Avrom Finkelstien from his C++ * code. It was refactored to fit the KosherJava Zmanim API with simplification of the code, enhancements and some bug * fixing. - * + * * Some of Avrom's original C++ code was translated from * C/C++ code in * Calendrical Calculations by Nachum Dershowitz and Edward M. * Reingold, Software-- Practice & Experience, vol. 20, no. 9 (September, 1990), pp. 899- 928. Any method with the mark * "ND+ER" indicates that the method was taken from this source with minor modifications. - * + * * If you are looking for a class that implements a Jewish calendar version of the Calendar class, one is available from * the ICU (International Components for Unicode) project, formerly part of * IBM's DeveloperWorks. - * + * * @see JewishCalendar * @see HebrewDateFormatter * @see java.util.Date @@ -55,1495 +54,1116 @@ * @author © Eliyahu Hershfeld 2011 - 2026 */ public class JewishDate implements Comparable, Cloneable { - /** - * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap - * year}) month of the year. - */ - public static final int NISSAN = 1; - - /** - * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap - * year}) month of the year. - */ - public static final int IYAR = 2; - - /** - * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap - * year}) month of the year. - */ - public static final int SIVAN = 3; - - /** - * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap - * year}) month of the year. - */ - public static final int TAMMUZ = 4; - - /** - * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year - * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year}) - * month of the year. - */ - public static final int AV = 5; - - /** - * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap - * year}) month of the year. - */ - public static final int ELUL = 6; - - /** - * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With - * the year starting at this month, it would actually be the 1st month of the year. - */ - public static final int TISHREI = 7; - - /** - * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish - * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year. - */ - public static final int CHESHVAN = 8; - - /** - * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year. - */ - public static final int KISLEV = 9; - - /** - * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the - * year starting at {@link #TISHREI}, it would actually be the 4th month of the year. - */ - public static final int TEVES = 10; - - /** - * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With - * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year. - */ - public static final int SHEVAT = 11; - - /** - * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth - * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually - * be the 6th month of the year. - */ - public static final int ADAR = 12; - - /** - * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric - * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11, - * 14, 17 and 19 of a 19-year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month - * of the year. - */ - public static final int ADAR_II = 13; - - /** - * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations. - * Day 1 is January 1, 0001 of the Gregorian calendar - */ - private static final int JEWISH_EPOCH = -1373429; - - /** The number of chalakim (18) in a minute.*/ - private static final int CHALAKIM_PER_MINUTE = 18; - /** The number of chalakim (1080) in an hour.*/ - private static final int CHALAKIM_PER_HOUR = 1080; - /** The number of chalakim (25,920) in a 24-hour day .*/ - private static final int CHALAKIM_PER_DAY = 25920; // 24 * 1080 - /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793 - * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim*/ - private static final long CHALAKIM_PER_MONTH = 765433; // (29 * 24 + 12) * 1080 + 793 - /** - * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = - * (24 + 5) * 1080 + 204 = 31524 - */ - private static final int CHALAKIM_MOLAD_TOHU = 31524; - - /** - * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days. - * - * @see #getCheshvanKislevKviah() - * @see HebrewDateFormatter#getFormattedKviah(int) - */ - public static final int CHASERIM = 0; - - /** - * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days. - * - * @see #getCheshvanKislevKviah() - * @see HebrewDateFormatter#getFormattedKviah(int) - */ - public static final int KESIDRAN = 1; - - /** - * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days. - * - * @see #getCheshvanKislevKviah() - * @see HebrewDateFormatter#getFormattedKviah(int) - */ - public static final int SHELAIMIM = 2; - - /** the internal Jewish month.*/ - private int jewishMonth; - /** the internal Jewish day.*/ - private int jewishDay; - /** the internal Jewish year.*/ - private int jewishYear; - /** the internal count of molad hours.*/ - private int moladHours; - /** the internal count of molad minutes.*/ - private int moladMinutes; - /** the internal count of molad chalakim.*/ - private int moladChalakim; - - /** - * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()}, - * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field - * populated. A regular JewishDate object will have this field set to 0. - * - * @return the molad hours - * @see #setMoladHours(int) - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - */ - public int getMoladHours() { - return moladHours; - } - - /** - * Sets the molad hours. - * - * @param moladHours - * the molad hours to set - * @see #getMoladHours() - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - * - */ - public void setMoladHours(int moladHours) { - this.moladHours = moladHours; - } - - /** - * Returns the molad minutes. Only an object populated with {@link #getMolad()}, - * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields - * populated. A regular JewishDate object will have this field set to 0. - * - * @return the molad minutes - * @see #setMoladMinutes(int) - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - */ - public int getMoladMinutes() { - return moladMinutes; - } - - /** - * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to - * minutes and {@link #setMoladChalakim(int) chalakim / parts} , so 793 (TaShTZaG) parts would have the minutes set to - * 44 and chalakim to 1. - * - * @param moladMinutes - * the molad minutes to set - * @see #getMoladMinutes() - * @see #setMoladChalakim(int) - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - * - */ - public void setMoladMinutes(int moladMinutes) { - this.moladMinutes = moladMinutes; - } - - /** - * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken - * out to {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and - * chalakim to 1. - * - * @param moladChalakim - * the molad chalakim / parts to set - * @see #getMoladChalakim() - * @see #setMoladMinutes(int) - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - * - */ - public void setMoladChalakim(int moladChalakim) { - this.moladChalakim = moladChalakim; - } - - /** - * Returns the molad chalakim / parts. Only an object populated with {@link #getMolad()}, - * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields - * populated. A regular JewishDate object will have this field set to 0. - * - * @return the molad chalakim / parts - * @see #setMoladChalakim(int) - * @see #getMolad() - * @see #setJewishDate(int, int, int, int, int, int) - */ - public int getMoladChalakim() { - return moladChalakim; - } - - /** - * Returns the last day in a gregorian month - * - * @param month - * the Gregorian month - * @return the last day of the Gregorian month - */ - int getLastDayOfGregorianMonth(int month) { - return getLastDayOfGregorianMonth(month, gregorianYear); - } - - /** - * Returns is the year passed in is a Gregorian leap year. - * @param year the Gregorian year - * @return if the year in question is a leap year. - */ - boolean isGregorianLeapYear(int year) { - return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); - } - - /** - * The month, where 1 == January, 2 == February, etc... Note that this is different than Java's Calendar class - * where January == 0. - */ - private int gregorianMonth; - - /** The day of the Gregorian month */ - private int gregorianDayOfMonth; - - /** The Gregorian year */ - private int gregorianYear; - - /** 1 == Sunday, 2 == Monday, etc... */ - private int dayOfWeek; - - /** Returns the absolute date (days since January 1, 0001 of the Gregorian calendar). - * @see #getAbsDate() - * @see #absDateToJewishDate() - */ - private int gregorianAbsDate; - - /** - * Returns the number of days in a given month in a given month and year. - * - * @param month - * the month. As with other cases in this class, this is 1-based, not zero-based. - * @param year - * the year (only impacts February) - * @return the number of days in the month in the given year - */ - private static int getLastDayOfGregorianMonth(int month, int year) { - switch (month) { - case 2: - if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { - return 29; - } else { - return 28; - } - case 4: - case 6: - case 9: - case 11: - return 30; - default: - return 31; - } - } - - /** - * Computes the Gregorian date from the absolute date. ND+ER - * @param absDate the absolute date - */ - private void absDateToDate(int absDate) { - int year = absDate / 366; // Search forward year by year from approximate year - while (absDate >= gregorianDateToAbsDate(year + 1, 1, 1)) { - year++; - } - - int month = 1; // Search forward month by month from January - while (absDate > gregorianDateToAbsDate(year, month, getLastDayOfGregorianMonth(month, year))) { - month++; - } - - int dayOfMonth = absDate - gregorianDateToAbsDate(year, month, 1) + 1; - setInternalGregorianDate(year, month, dayOfMonth); - } - - /** - * Returns the absolute date (days since January 1, 0001 of the Gregorian calendar). - * - * @return the number of days since January 1, 1 - */ - public int getAbsDate() { - return gregorianAbsDate; - } - - /** - * Computes the absolute date from a Gregorian date. ND+ER - * - * @param year - * the Gregorian year - * @param month - * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for - * January - * @param dayOfMonth - * the day of the month (1st, 2nd, etc...) - * @return the absolute Gregorian day - */ - private static int gregorianDateToAbsDate(int year, int month, int dayOfMonth) { - int absDate = dayOfMonth; - for (int m = month - 1; m > 0; m--) { - absDate += getLastDayOfGregorianMonth(m, year); // days in prior months of the year - } - return (absDate // days this year - + 365 * (year - 1) // days in previous years ignoring leap days - + (year - 1) / 4 // Julian leap days before this year - - (year - 1) / 100 // minus prior century years - + (year - 1) / 400); // plus prior years divisible by 400 - } - - /** - * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19-year cycle are leap years. - * - * @param year - * the Jewish year. - * @return true if it is a leap year - * @see #isJewishLeapYear() - */ - private static boolean isJewishLeapYear(int year) { - return ((7 * year) + 1) % 19 < 7; - } - - /** - * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19-year - * cycle are leap years. - * - * @return true if it is a leap year - * @see #isJewishLeapYear(int) - */ - public boolean isJewishLeapYear() { - return isJewishLeapYear(getJewishYear()); - } - - /** - * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year} - * or 13 on a leap year. - * - * @param year - * the Jewish year. - * @return 12 on a non leap year or 13 on a leap year - * @see #isJewishLeapYear(int) - */ - private static int getLastMonthOfJewishYear(int year) { - return isJewishLeapYear(year) ? ADAR_II : ADAR; - } - - /** - * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean - * conjunction of Tishri of the Jewish year. - * - * @param year - * the Jewish year - * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha = 5 - * hours and RaD = 204 chalakim / parts) prior to the start of the Jewish calendar, to - * the mean conjunction of Tishri of the Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 - * chalakim after sunset on Sunday evening). - */ - public static int getJewishCalendarElapsedDays(int year) { - long chalakimSince = getChalakimSinceMoladTohu(year, TISHREI); - int moladDay = (int) (chalakimSince / (long) CHALAKIM_PER_DAY); - int moladParts = (int) (chalakimSince - moladDay * (long) CHALAKIM_PER_DAY); - // delay Rosh Hashana for the 4 dechiyos - return addDechiyos(year, moladDay, moladParts); - } - - /** - * Adds the 4 dechiyos for molad Tishrei. These are: - *
    - *
  1. Lo ADU Rosh - Rosh Hashana can't fall on a Sunday, Wednesday or Friday. If the molad fell on one - * of these days, Rosh Hashana is delayed to the following day.
  2. - *
  3. Molad Zaken - If the molad of Tishrei falls after 12 noon, Rosh Hashana is delayed to the following - * day. If the following day is ADU, it will be delayed an additional day.
  4. - *
  5. GaTRaD - If on a non leap year the molad of Tishrei falls on a Tuesday (Ga) on or after 9 hours - * (T) and (RaD 204 chalakim it is delayed till Thursday (one day delay, plus one day for - * Lo ADU Rosh)
  6. - *
  7. BeTuTaKPaT - if the year following a leap year falls on a Monday (Be) on or after 15 hours - * (Tu) and 589 chalakim (TaKPaT) it is delayed till Tuesday
  8. - *
- * - * @param year the year - * @param moladDay the molad day - * @param moladParts the molad parts - * @return the number of elapsed days in the JewishCalendar adjusted for the 4 dechiyos. - */ - private static int addDechiyos(int year, int moladDay, int moladParts) { - int roshHashanaDay = moladDay; // if no dechiyos - // delay Rosh Hashana for the dechiyos of the Molad - new moon 1 - Molad Zaken, 2- GaTRaD 3- BeTuTaKPaT - if ((moladParts >= 19440) // Dechiya of Molad Zaken - molad is >= midday (18 hours * 1080 chalakim) - || (((moladDay % 7) == 2) // start Dechiya of GaTRaD - Ga = is a Tuesday - && (moladParts >= 9924) // TRaD = 9 hours, 204 parts or later (9 * 1080 + 204) - && !isJewishLeapYear(year)) // of a non-leap year - end Dechiya of GaTRaD - || (((moladDay % 7) == 1) // start Dechiya of BeTuTaKPaT - Be = is on a Monday - && (moladParts >= 16789) // TUTaKPaT part of BeTuTaKPaT = 15 hours, 589 parts or later (15 * 1080 + 589) - && (isJewishLeapYear(year - 1)))) { // in a year following a leap year - end Dechiya of BeTuTaKPaT - roshHashanaDay += 1; // Then postpone Rosh HaShanah one day - } - // start 4th Dechiya - Lo ADU Rosh - Rosh Hashana can't occur on A- sunday, D- Wednesday, U - Friday - if (((roshHashanaDay % 7) == 0)// If Rosh HaShanah would occur on Sunday, - || ((roshHashanaDay % 7) == 3) // or Wednesday, - || ((roshHashanaDay % 7) == 5)) { // or Friday - end 4th Dechiya - Lo ADU Rosh - roshHashanaDay = roshHashanaDay + 1; // Then postpone it one (more) day - } - return roshHashanaDay; - } - - /** - * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu - * to the year and month passed in. - * - * @param year - * the Jewish year - * @param month - * the Jewish month the Jewish month, with the month numbers starting from Nissan. Use the JewishDate - * constants such as {@link JewishDate#TISHREI}. - * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu - */ - private static long getChalakimSinceMoladTohu(int year, int month) { - // Jewish lunar month = 29 days, 12 hours and 793 chalakim - // chalakim since Molad Tohu BeHaRaD - 1 day, 5 hours and 204 chalakim - int monthOfYear = getJewishMonthOfYear(year, month); - int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19-year lunar (Metonic) cycles so far - + (12 * ((year - 1) % 19)) // Regular months in this cycle - + ((7 * ((year - 1) % 19) + 1) / 19) // Leap months this cycle - + (monthOfYear - 1); // add elapsed months till the start of the molad of the month - // return chalakim prior to BeHaRaD + number of chalakim since - return CHALAKIM_MOLAD_TOHU + (CHALAKIM_PER_MONTH * monthsElapsed); - } - - /** - * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu - * to the Jewish year and month that this Object is set to. - * - * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu - */ - public long getChalakimSinceMoladTohu() { - return getChalakimSinceMoladTohu(jewishYear, jewishMonth); - } - - /** - * Converts the {@link JewishDate#NISSAN} based constants used by this class to numeric month starting from - * {@link JewishDate#TISHREI}. This is required for molad calculations. - * - * @param year - * The Jewish year - * @param month - * The Jewish Month - * @return the Jewish month of the year starting with Tishrei - */ - private static int getJewishMonthOfYear(int year, int month) { - boolean isLeapYear = isJewishLeapYear(year); - return (month + (isLeapYear ? 6 : 5)) % (isLeapYear ? 13 : 12) + 1; - } - - /** - * Validates the components of a Jewish date for validity. It will throw an {@link IllegalArgumentException} if the Jewish - * date is earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a {@link #isJewishLeapYear(int) - * leap year}), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 or > 59 or - * chalakim < 0 or > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the - * chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the - * case of 793 / TaShTzaG). - * - * @param year - * the Jewish year to validate. It will reject any year <= 3761 (lower than the year 1 Gregorian). - * @param month - * the Jewish month to validate. It will reject a month < 1 or > 12 (or 13 on a leap year) . - * @param dayOfMonth - * the day of the Jewish month to validate. It will reject any value < 1 or > 30 TODO: check calling - * methods to see if there is any reason that the class can validate that 30 is invalid for some months. - * @param hours - * the hours (for molad calculations). It will reject an hour < 0 or > 23 - * @param minutes - * the minutes (for molad calculations). It will reject a minute < 0 or > 59 - * @param chalakim - * the chalakim / parts (for molad calculations). It will reject a chalakim < 0 or > - * 17. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim - * per minutes, so it would be 44 minutes and 1 chelek in the case of 793 / TaShTzaG) - * - * @throws IllegalArgumentException - * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a leap year), - * the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 or > 59 or chalakim - * < 0 or > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the - * chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek - * in the case of 793 (TaShTzaG). - */ - private static void validateJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { - if (month < NISSAN || month > getLastMonthOfJewishYear(year)) { - throw new IllegalArgumentException("The Jewish month has to be between 1 and 12 (or 13 on a leap year). " - + month + " is invalid for the year " + year + "."); - } - if (dayOfMonth < 1 || dayOfMonth > 30) { - throw new IllegalArgumentException("The Jewish day of month can't be < 1 or > 30. " + dayOfMonth - + " is invalid."); - } - // reject dates prior to 18 Teves, 3761 (1/1/1 AD). This restriction can be relaxed if the date coding is - // changed/corrected - if ((year < 3761) || (year == 3761 && (month >= TISHREI && month < TEVES)) - || (year == 3761 && month == TEVES && dayOfMonth < 18)) { - throw new IllegalArgumentException( - "A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian) can't be set. " + year + ", " + month - + ", " + dayOfMonth + " is invalid."); - } - if (hours < 0 || hours > 23) { - throw new IllegalArgumentException("Hours < 0 or > 23 can't be set. " + hours + " is invalid."); - } - - if (minutes < 0 || minutes > 59) { - throw new IllegalArgumentException("Minutes < 0 or > 59 can't be set. " + minutes + " is invalid."); - } - - if (chalakim < 0 || chalakim > 17) { - throw new IllegalArgumentException( - "Chalakim/parts < 0 or > 17 can't be set. " - + chalakim - + " is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)"); - } - } - - /** - * Validates the components of a Gregorian date for validity. It will throw an {@link IllegalArgumentException} if a - * year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in. - * - * @param year - * the Gregorian year to validate. It will reject any year < 1. - * @param month - * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a - * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0. - * @param dayOfMonth - * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31 - * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to - * see if there is any reason that the class needs days > the maximum. - * @throws IllegalArgumentException - * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in - * @see #validateGregorianYear(int) - * @see #validateGregorianMonth(int) - * @see #validateGregorianDayOfMonth(int) - */ - private static void validateGregorianDate(int year, int month, int dayOfMonth) { - validateGregorianMonth(month); - validateGregorianDayOfMonth(dayOfMonth); - validateGregorianYear(year); - } - - /** - * Validates a Gregorian month for validity. - * - * @param month - * the Gregorian month number to validate. It will enforce that the month is between 0 - 11 like a - * {@link GregorianCalendar}, where {@link Calendar#JANUARY} has a value of 0. - */ - private static void validateGregorianMonth(int month) { - if (month > 11 || month < 0) { - throw new IllegalArgumentException("The Gregorian month has to be between 0 - 11. " + month - + " is invalid."); - } - } - - /** - * Validates a Gregorian day of month for validity. - * - * @param dayOfMonth - * the day of the Gregorian month to validate. It will reject any value < 1, but will allow values > 31 - * since calling methods will simply set it to the maximum for that month. TODO: check calling methods to - * see if there is any reason that the class needs days > the maximum. - */ - private static void validateGregorianDayOfMonth(int dayOfMonth) { - if (dayOfMonth <= 0) { - throw new IllegalArgumentException("The day of month can't be less than 1. " + dayOfMonth + " is invalid."); - } - } - - /** - * Validates a Gregorian year for validity. - * - * @param year - * the Gregorian year to validate. It will reject any year < 1. - */ - private static void validateGregorianYear(int year) { - if (year < 1) { - throw new IllegalArgumentException("Years < 1 can't be calculated. " + year + " is invalid."); - } - } - - /** - * Returns the number of days for a given Jewish year. ND+ER - * - * @param year - * the Jewish year - * @return the number of days for a given Jewish year. - * @see #isCheshvanLong() - * @see #isKislevShort() - */ - public static int getDaysInJewishYear(int year) { - return getJewishCalendarElapsedDays(year + 1) - getJewishCalendarElapsedDays(year); - } - - /** - * Returns the number of days for the current year that the calendar is set to. - * - * @return the number of days for the Object's current Jewish year. - * @see #isCheshvanLong() - * @see #isKislevShort() - * @see #isJewishLeapYear() - */ - public int getDaysInJewishYear() { - return getDaysInJewishYear(getJewishYear()); - } - - /** - * Returns if Cheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered) - * year Cheshvan is short. ND+ER - * - * @param year - * the year - * @return true if Cheshvan is long in Jewish year. - * @see #isCheshvanLong() - * @see #getCheshvanKislevKviah() - */ - private static boolean isCheshvanLong(int year) { - return getDaysInJewishYear(year) % 10 == 5; - } - - /** - * Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method - * name isLong is done since in a Kesidran (ordered) year Cheshvan is short. - * - * @return true if Cheshvan is long for the current year that the calendar is set to - * @see #isCheshvanLong() - */ - public boolean isCheshvanLong() { - return isCheshvanLong(getJewishYear()); - } - - /** - * Returns if Kislev is short (29 days VS 30 days) in a given Jewish year. The method name isShort is done since in - * a Kesidran (ordered) year Kislev is long. ND+ER - * - * @param year - * the Jewish year - * @return true if Kislev is short for the given Jewish year. - * @see #isKislevShort() - * @see #getCheshvanKislevKviah() - */ - private static boolean isKislevShort(int year) { - return getDaysInJewishYear(year) % 10 == 3; - } - - /** - * Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a - * Kesidran (ordered) year Kislev is long. - * - * @return true if Kislev is short for the year that this class is set to - */ - public boolean isKislevShort() { - return isKislevShort(getJewishYear()); - } - - /** - * Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return - * {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev - * is 30 days and {@link #CHASERIM} if both are 29 days. - * - * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and - * Kislev is 30 days and {@link #CHASERIM} if both are 29 days. - * @see #isCheshvanLong() - * @see #isKislevShort() - */ - public int getCheshvanKislevKviah() { - if (isCheshvanLong() && !isKislevShort()) { - return SHELAIMIM; - } else if (!isCheshvanLong() && isKislevShort()) { - return CHASERIM; - } else { - return KESIDRAN; - } - } - - /** - * Returns the number of days of a Jewish month for a given month and year. - * - * @param month - * the Jewish month - * @param year - * the Jewish Year - * @return the number of days for a given Jewish month - */ - private static int getDaysInJewishMonth(int month, int year) { - if ((month == IYAR) || (month == TAMMUZ) || (month == ELUL) || ((month == CHESHVAN) && !(isCheshvanLong(year))) - || ((month == KISLEV) && isKislevShort(year)) || (month == TEVES) - || ((month == ADAR) && !(isJewishLeapYear(year))) || (month == ADAR_II)) { - return 29; - } else { - return 30; - } - } - - /** - * Returns the number of days of the Jewish month that the calendar is currently set to. - * - * @return the number of days for the Jewish month that the calendar is currently set to. - */ - public int getDaysInJewishMonth() { - return getDaysInJewishMonth(getJewishMonth(), getJewishYear()); - } - - /** - * Computes the Jewish date from the absolute date. - */ - private void absDateToJewishDate() { - // Approximation from below - jewishYear = (gregorianAbsDate - JEWISH_EPOCH) / 366; - // Search forward for year from the approximation - while (gregorianAbsDate >= jewishDateToAbsDate(jewishYear + 1, TISHREI, 1)) { - jewishYear++; - } - // Search forward for month from either Tishri or Nissan. - if (gregorianAbsDate < jewishDateToAbsDate(jewishYear, NISSAN, 1)) { - jewishMonth = TISHREI;// Start at Tishri - } else { - jewishMonth = NISSAN;// Start at Nissan - } - while (gregorianAbsDate > jewishDateToAbsDate(jewishYear, jewishMonth, getDaysInJewishMonth())) { - jewishMonth++; - } - // Calculate the day by subtraction - jewishDay = gregorianAbsDate - jewishDateToAbsDate(jewishYear, jewishMonth, 1) + 1; - } - - /** - * Returns the absolute date of Jewish date. ND+ER - * - * @param year - * the Jewish year. The year can't be negative - * @param month - * the Jewish month starting with Nissan. Nissan expects a value of 1 etc. until Adar with a value of 12. - * For a leap year, 13 will be the expected value for Adar II. Use the constants {@link JewishDate#NISSAN} - * etc. - * @param dayOfMonth - * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only - * has 29 days, the day will be set as 29. - * @return the absolute date of the Jewish date. - */ - private static int jewishDateToAbsDate(int year, int month, int dayOfMonth) { - int elapsed = getDaysSinceStartOfJewishYear(year, month, dayOfMonth); - // add elapsed days this year + Days in prior years + Days elapsed before absolute year 1 - return elapsed + getJewishCalendarElapsedDays(year) + JEWISH_EPOCH; - } - - /** - * Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad - * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() - * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This - * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5, - * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7. - * - * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours}, - * {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set. - */ - public JewishDate getMolad() { - JewishDate moladDate = new JewishDate(getChalakimSinceMoladTohu()); - if (moladDate.getMoladHours() >= 6) { - moladDate.forward(Calendar.DATE, 1); - } - moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24); - return moladDate; - } - - /** - * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in. - * - * @param chalakim - * the number of chalakim since the beginning of Sunday prior to BaHaRaD - * @return the number of days from the Jewish epoch - */ - private static int moladToAbsDate(long chalakim) { - return (int) (chalakim / CHALAKIM_PER_DAY) + JEWISH_EPOCH; - } - - /** - * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of - * chalakim / parts starting at the beginning of Sunday prior to the Molad Tohu BeHaRaD (Be = - * Monday, Ha = 5 hours and RaD = 204 chalakim / parts) - prior to the start of the Jewish - * calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday evening). - * - * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD - */ - public JewishDate(long molad) { - absDateToDate(moladToAbsDate(molad)); - int conjunctionDay = (int) (molad / (long) CHALAKIM_PER_DAY); - int conjunctionParts = (int) (molad - conjunctionDay * (long) CHALAKIM_PER_DAY); - setMoladTime(conjunctionParts); - } - - /** - * Sets the molad time (hours minutes and chalakim) based on the number of chalakim since the start of the day. - * - * @param chalakim - * the number of chalakim since the start of the day. - */ - private void setMoladTime(int chalakim) { - int adjustedChalakim = chalakim; - setMoladHours(adjustedChalakim / CHALAKIM_PER_HOUR); - adjustedChalakim = adjustedChalakim - (getMoladHours() * CHALAKIM_PER_HOUR); - setMoladMinutes(adjustedChalakim / CHALAKIM_PER_MINUTE); - setMoladChalakim(adjustedChalakim - moladMinutes * CHALAKIM_PER_MINUTE); - } - - /** - * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. - * - * @param year - * the Jewish year - * @param month - * the Jewish month - * @param dayOfMonth - * the day in the Jewish month - * @return the number of days - */ - private static int getDaysSinceStartOfJewishYear(int year, int month, int dayOfMonth) { - int elapsedDays = dayOfMonth; - // Before Tishrei (from Nissan to Tishrei), add days in prior months - if (month < TISHREI) { - // this year before and after Nissan. - for (int m = TISHREI; m <= getLastMonthOfJewishYear(year); m++) { - elapsedDays += getDaysInJewishMonth(m, year); - } - for (int m = NISSAN; m < month; m++) { - elapsedDays += getDaysInJewishMonth(m, year); - } - } else { // Add days in prior months this year - for (int m = TISHREI; m < month; m++) { - elapsedDays += getDaysInJewishMonth(m, year); - } - } - return elapsedDays; - } - - /** - * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. - * - * @return the number of days - */ - public int getDaysSinceStartOfJewishYear() { - return getDaysSinceStartOfJewishYear(getJewishYear(), getJewishMonth(), getJewishDayOfMonth()); - } - - /** - * Creates a Jewish date based on a Jewish year, month and day of month. - * - * @param jewishYear - * the Jewish year - * @param jewishMonth - * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the - * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any - * confusion. - * @param jewishDayOfMonth - * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR}, - * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month) - * will be set - * @throws IllegalArgumentException - * if the day of month is < 1 or > 30, or a year of < 0 is passed in. - */ - public JewishDate(int jewishYear, int jewishMonth, int jewishDayOfMonth) { - setJewishDate(jewishYear, jewishMonth, jewishDayOfMonth); - } - - /** - * Default constructor will set a default date to the current system date. - */ - public JewishDate() { - resetDate(); - } - - /** - * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. - * - * @param zonedDateTime - * the ZonedDateTime to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} - */ - public JewishDate(ZonedDateTime zonedDateTime) { - setGregorianDate(zonedDateTime); - } - - /** - * A constructor that initializes the date to the {@link java.time.LocalDate LocalDate} parameter. - * - * @param localDate - * the LocalDate to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} - */ - public JewishDate(LocalDate localDate) { - setGregorianDate(localDate); - } - - /** - * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. - * - * @param zonedDateTime - * the ZonedDateTime to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} - */ - public void setGregorianDate(ZonedDateTime zonedDateTime) { - setGregorianDate(zonedDateTime.toLocalDate()); - } - - /** - * Sets the date based on a {@link java.time.LocalDate LocalDate} object. Modifies the Jewish date as well. - * - * @param localDate - * the LocalDate to set the calendar to - * @throws IllegalArgumentException - * if the date would fall prior to the year 1 AD - */ - public void setGregorianDate(LocalDate localDate) { - if (localDate.getYear() <= 0) { - throw new IllegalArgumentException( - "Calendars with a BC era are not supported. The year " - + localDate.getYear() + " BC is invalid." - ); - } - - gregorianYear = localDate.getYear(); - gregorianMonth = localDate.getMonth().getValue(); // FIXME + 1;// 1 = January - gregorianDayOfMonth = localDate.getDayOfMonth(); - - // initialize absolute date - gregorianAbsDate = gregorianDateToAbsDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); - - // convert to Jewish date - absDateToJewishDate(); - - // day of week (same calculation as original) - dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; - } - - /** - * Sets the Gregorian Date, and updates the Jewish date accordingly. Like the Java Calendar A value of 0 is expected - * for January. - * - * @param year - * the Gregorian year - * @param month - * the Gregorian month. Like the Java Calendar, this class expects 0 for January - * @param dayOfMonth - * the Gregorian day of month. If this is > the number of days in the month/year, the last valid date of - * the month will be set - * @throws IllegalArgumentException - * if a year of < 1, a month < 0 or > 11 or a day of month < 1 is passed in - */ - public void setGregorianDate(int year, int month, int dayOfMonth) { - validateGregorianDate(year, month, dayOfMonth); - setInternalGregorianDate(year, month + 1, dayOfMonth); - } - - /** - * Sets the hidden internal representation of the Gregorian date , and updates the Jewish date accordingly. While - * public getters and setters have 0 based months matching the Java Calendar classes, This class internally - * represents the Gregorian month starting at 1. When this is called it will not adjust the month to match the Java - * Calendar classes. - * - * @param year the year - * @param month the month - * @param dayOfMonth the day of month - */ - private void setInternalGregorianDate(int year, int month, int dayOfMonth) { - // make sure date is a valid date for the given month, if not, set to last day of month - if (dayOfMonth > getLastDayOfGregorianMonth(month, year)) { - dayOfMonth = getLastDayOfGregorianMonth(month, year); - } - // init month, date, year - gregorianMonth = month; - gregorianDayOfMonth = dayOfMonth; - gregorianYear = year; - - gregorianAbsDate = gregorianDateToAbsDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); // init date - absDateToJewishDate(); - - dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; // set day of week - } - - /** - * Sets the Jewish Date and updates the Gregorian date accordingly. - * - * @param year - * the Jewish year. The year can't be negative - * @param month - * the Jewish month starting with Nissan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for - * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar - * II) to avoid any confusion. - * @param dayOfMonth - * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only - * has 29 days, the day will be set as 29. - * @throws IllegalArgumentException - * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a - * leap year) or the day of month is < 1 or > 30 is passed in - */ - public void setJewishDate(int year, int month, int dayOfMonth) { - setJewishDate(year, month, dayOfMonth, 0, 0, 0); - } - - /** - * Sets the Jewish Date and updates the Gregorian date accordingly. - * - * @param year - * the Jewish year. The year can't be negative - * @param month - * the Jewish month starting with Nissan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for - * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar - * II) to avoid any confusion. - * @param dayOfMonth - * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only - * has 29 days, the day will be set as 29. - * - * @param hours - * the hour of the day. Used for molad calculations - * @param minutes - * the minutes. Used for molad calculations - * @param chalakim - * the chalakim / parts. Used for molad calculations. The chalakim should not - * exceed 17. Minutes should be used for larger numbers. - * - * @throws IllegalArgumentException - * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a leap year), the day - * of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 > 17. For - * larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18 - * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG). - */ - public void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { - validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim); - - // if 30 is passed for a month that only has 29 days (for example by rolling the month from a month that had 30 - // days to a month that only has 29) set the date to 29th - if (dayOfMonth > getDaysInJewishMonth(month, year)) { - dayOfMonth = getDaysInJewishMonth(month, year); - } - - jewishMonth = month; - jewishDay = dayOfMonth; - jewishYear = year; - moladHours = hours; - moladMinutes = minutes; - moladChalakim = chalakim; - - gregorianAbsDate = jewishDateToAbsDate(jewishYear, jewishMonth, jewishDay); // reset Gregorian date - absDateToDate(gregorianAbsDate); - - dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; // reset day of week - } - - /** - * Returns this object's date as a {@link java.util.Calendar} object. - * - * @return The {@link java.util.Calendar} - */ - public Calendar getGregorianCalendar() { - Calendar calendar = Calendar.getInstance(); - calendar.set(getGregorianYear(), getGregorianMonth(), getGregorianDayOfMonth()); - return calendar; - } - - /** - * Returns this object's date as a {@link java.time.LocalDate} object. - * - * @return The {@link java.time.LocalDate} - */ - public LocalDate getLocalDate() { - return LocalDate.of(getGregorianYear(), getGregorianMonth() + 1, getGregorianDayOfMonth()); - } - - /** - * Resets this date to the current system date. - */ - public void resetDate() { - LocalDate localDate = LocalDate.now(); - setGregorianDate(localDate); - } - - /** - * Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more - * complex formatting, use the formatter classes. - * - * @return the Jewish date in the form "day Month, year" e.g. "21 Shevat, 5729" - * @see HebrewDateFormatter#format(JewishDate) - */ - public String toString() { - return new HebrewDateFormatter().format(this); - } - - /** - * Rolls the date, month or year forward by the amount passed in. It modifies both the Gregorian and Jewish dates accordingly. - * If manipulation beyond the fields supported here is required, use the {@link Calendar} class {@link Calendar#add(int, int)} - * or {@link Calendar#roll(int, int)} methods in the following manner. - * - *
-	 * 
-	 * 	Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
-	 * 	cal.add(Calendar.MONTH, 3); // add 3 Gregorian months
-	 * 	jewishDate.setDate(cal); // set the updated calendar back to this class
-	 * 
-	 * 
- * - * @param field the calendar field to be forwarded. The must be {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR} - * @param amount the positive amount to move forward - * @throws IllegalArgumentException if the field is anything besides {@link Calendar#DATE}, {@link Calendar#MONTH} or {@link Calendar#YEAR} - * or if the amount is less than 1 - * - * @see #back() - * @see Calendar#add(int, int) - * @see Calendar#roll(int, int) - */ - public void forward(int field, int amount) { //FIXME first param should be converted from the Calendar.DATE - if (field != Calendar.DATE && field != Calendar.MONTH && field != Calendar.YEAR) { - throw new IllegalArgumentException("Unsupported field was passed to Forward. Only Calendar.DATE, Calendar.MONTH or Calendar.YEAR are supported."); - } - if (amount < 1) { - throw new IllegalArgumentException("JewishDate.forward() does not support amounts less than 1. See JewishDate.back()"); - } - if (field == Calendar.DATE) { - // Change Gregorian date - for (int i = 0; i < amount; i++) { - if (gregorianDayOfMonth == getLastDayOfGregorianMonth(gregorianMonth, gregorianYear)) { - gregorianDayOfMonth = 1; - // if last day of year - if (gregorianMonth == 12) { - gregorianYear++; - gregorianMonth = 1; - } else { - gregorianMonth++; - } - } else { // if not last day of month - gregorianDayOfMonth++; - } - - // Change the Jewish Date - if (jewishDay == getDaysInJewishMonth()) { - // if it last day of elul (i.e. last day of Jewish year) - if (jewishMonth == ELUL) { - jewishYear++; - jewishMonth++; - jewishDay = 1; - } else if (jewishMonth == getLastMonthOfJewishYear(jewishYear)) { - // if it is the last day of Adar, or Adar II as case may be - jewishMonth = NISSAN; - jewishDay = 1; - } else { - jewishMonth++; - jewishDay = 1; - } - } else { // if not last date of month - jewishDay++; - } - - if (dayOfWeek == 7) { // if last day of week, loop back to Sunday - dayOfWeek = 1; - } else { - dayOfWeek++; - } - - gregorianAbsDate++; // increment the absolute date - } - } else if (field == Calendar.MONTH) { - forwardJewishMonth(amount); - } else { - setJewishYear(getJewishYear() + amount); - } - } - - /** - * Forward the Jewish date by the number of months passed in. - * FIXME: Deal with forwarding a date such as 30 Nissan by a month. 30 Iyar does not exist. This should be dealt with similar to - * the way that the Java Calendar behaves (not that simple since there is a difference between add() or roll(). - * - * @throws IllegalArgumentException if the amount is less than 1 - * @param amount the number of months to roll the month forward - */ - private void forwardJewishMonth(int amount) { - if (amount < 1) { - throw new IllegalArgumentException("the amount of months to forward has to be greater than zero."); - } - for (int i = 0; i < amount; i++) { - if (getJewishMonth() == ELUL) { - setJewishMonth(TISHREI); - setJewishYear(getJewishYear() + 1); - } else if ((! isJewishLeapYear() && getJewishMonth() == ADAR) - || (isJewishLeapYear() && getJewishMonth() == ADAR_II)){ - setJewishMonth(NISSAN); - } else { - setJewishMonth(getJewishMonth() + 1); - } - } - } - - /** - * Rolls the date back by 1 day. It modifies both the Gregorian and Jewish dates accordingly. The API does not - * currently offer the ability to forward more than one day at a time, or to forward by month or year. If such - * manipulation is required use the {@link Calendar} class {@link Calendar#add(int, int)} or - * {@link Calendar#roll(int, int)} methods in the following manner. - * - *
-	 * 
-	 * 	Calendar cal = jewishDate.getTime(); // get a java.util.Calendar representation of the JewishDate
-	 * 	cal.add(Calendar.MONTH, -3); // subtract 3 Gregorian months
-	 * 	jewishDate.setDate(cal); // set the updated calendar back to this class
-	 * 
-	 * 
- * - * @see #back() - * @see Calendar#add(int, int) - * @see Calendar#roll(int, int) - */ - public void back() { - // Change Gregorian date - if (gregorianDayOfMonth == 1) { // if first day of month - if (gregorianMonth == 1) { // if first day of year - gregorianMonth = 12; - gregorianYear--; - } else { - gregorianMonth--; - } - // change to last day of previous month - gregorianDayOfMonth = getLastDayOfGregorianMonth(gregorianMonth, gregorianYear); - } else { - gregorianDayOfMonth--; - } - // change Jewish date - if (jewishDay == 1) { // if first day of the Jewish month - if (jewishMonth == NISSAN) { - jewishMonth = getLastMonthOfJewishYear(jewishYear); - } else if (jewishMonth == TISHREI) { // if Rosh Hashana - jewishYear--; - jewishMonth--; - } else { - jewishMonth--; - } - jewishDay = getDaysInJewishMonth(); - } else { - jewishDay--; - } - - if (dayOfWeek == 1) { // if first day of week, loop back to Saturday - dayOfWeek = 7; - } else { - dayOfWeek--; - } - gregorianAbsDate--; // change the absolute date - } - - /** - * Indicates whether some other object is "equal to" this one. - * @see Object#equals(Object) - */ - public boolean equals(Object object) { - if (this == object) { - return true; - } - if (!(object instanceof JewishDate)) { - return false; - } - JewishDate jewishDate = (JewishDate) object; - return gregorianAbsDate == jewishDate.getAbsDate(); - } - - /** - * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this - * date is "less than" (before) the date, greater than 0 if this date is "greater than" (after) the date, or 0 if - * they are equal. - */ - public int compareTo(JewishDate jewishDate) { - return Integer.compare(gregorianAbsDate, jewishDate.getAbsDate()); - } - - /** - * Returns the Gregorian month (between 0-11). - * - * @return the Gregorian month (between 0-11). Like the java.util.Calendar, months are 0 based. - */ - public int getGregorianMonth() { - return gregorianMonth - 1; //FIXME - } - - /** - * Returns the Gregorian day of the month. - * - * @return the Gregorian day of the mont - */ - public int getGregorianDayOfMonth() { - return gregorianDayOfMonth; - } - - /** - * Returns the Gregorian year. - * - * @return the Gregorian year - */ - public int getGregorianYear() { - return gregorianYear; - } - - /** - * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nissan and goes to - * 13 for Adar II - * - * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nissan and - * goes to 13 for Adar II - */ - public int getJewishMonth() { - return jewishMonth; - } - - /** - * Returns the Jewish day of month. - * - * @return the Jewish day of the month - */ - public int getJewishDayOfMonth() { - return jewishDay; - } - - /** - * Returns the Jewish year. - * - * @return the Jewish year - */ - public int getJewishYear() { - return jewishYear; - } - - /** - * Returns the day of the week as a number between 1-7. - * - * @return the day of the week as a number between 1-7. - */ - public int getDayOfWeek() { - return dayOfWeek; - } - - /** - * Sets the Gregorian month. - * - * @param month - * the Gregorian month - * - * @throws IllegalArgumentException - * if a month < 0 or > 11 is passed in - */ - public void setGregorianMonth(int month) { - validateGregorianMonth(month); - setInternalGregorianDate(gregorianYear, month + 1, gregorianDayOfMonth); //FIXME - } - - /** - * sets the Gregorian year. - * - * @param year - * the Gregorian year. - * @throws IllegalArgumentException - * if a year of < 1 is passed in - */ - public void setGregorianYear(int year) { - validateGregorianYear(year); - setInternalGregorianDate(year, gregorianMonth, gregorianDayOfMonth); - } - - /** - * sets the Gregorian Day of month. - * - * @param dayOfMonth - * the Gregorian Day of month. - * @throws IllegalArgumentException - * if the day of month of < 1 is passed in - */ - public void setGregorianDayOfMonth(int dayOfMonth) { - validateGregorianDayOfMonth(dayOfMonth); - setInternalGregorianDate(gregorianYear, gregorianMonth, dayOfMonth); - } - - /** - * sets the Jewish month. - * - * @param month - * the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nissan - * and goes to 13 for Adar II - * @throws IllegalArgumentException - * if a month < 1 or > 12 (or 13 on a leap year) is passed in - */ - public void setJewishMonth(int month) { - setJewishDate(jewishYear, month, jewishDay); - } - - /** - * sets the Jewish year. - * - * @param year - * the Jewish year - * @throws IllegalArgumentException - * if a year of < 3761 is passed in. The same will happen if the year is 3761 and the month and day - * previously set are < 18 Teves (prior to Jan 1, 1 AD) - */ - public void setJewishYear(int year) { - setJewishDate(year, jewishMonth, jewishDay); - } - - /** - * sets the Jewish day of month. - * - * @param dayOfMonth - * the Jewish day of month - * @throws IllegalArgumentException - * if the day of month is < 1 or > 30 is passed in - */ - public void setJewishDayOfMonth(int dayOfMonth) { - setJewishDate(jewishYear, jewishMonth, dayOfMonth); - } - - /** - * A method that creates a deep copy of the object. - * - * @see Object#clone() - */ - public Object clone() { - JewishDate clone = null; - try { - clone = (JewishDate) super.clone(); - } catch (CloneNotSupportedException cnse) { - // Required by the compiler. Should never be reached since we implement clone() - } - if (clone != null) { - clone.setInternalGregorianDate(gregorianYear, gregorianMonth, gregorianDayOfMonth); - } - return clone; - } - - /** - * Overrides {@link Object#hashCode()}. - * @see Object#hashCode() - */ - public int hashCode() { - int result = 17; - result = 37 * result + getClass().hashCode(); // needed or this and subclasses will return identical hash - result += 37 * result + gregorianAbsDate; - return result; - } + /** + * Value of the month field indicating Nissan, the first numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 7th (or 8th in a {@link #isJewishLeapYear() leap + * year}) month of the year. + */ + public static final int NISSAN = 1; + + /** + * Value of the month field indicating Iyar, the second numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 8th (or 9th in a {@link #isJewishLeapYear() leap + * year}) month of the year. + */ + public static final int IYAR = 2; + + /** + * Value of the month field indicating Sivan, the third numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 9th (or 10th in a {@link #isJewishLeapYear() leap + * year}) month of the year. + */ + public static final int SIVAN = 3; + + /** + * Value of the month field indicating Tammuz, the fourth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 10th (or 11th in a {@link #isJewishLeapYear() leap + * year}) month of the year. + */ + public static final int TAMMUZ = 4; + + /** + * Value of the month field indicating Av, the fifth numeric month of the year in the Jewish calendar. With the year + * starting at {@link #TISHREI}, it would actually be the 11th (or 12th in a {@link #isJewishLeapYear() leap year}) + * month of the year. + */ + public static final int AV = 5; + + /** + * Value of the month field indicating Elul, the sixth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 12th (or 13th in a {@link #isJewishLeapYear() leap + * year}) month of the year. + */ + public static final int ELUL = 6; + + /** + * Value of the month field indicating Tishrei, the seventh numeric month of the year in the Jewish calendar. With + * the year starting at this month, it would actually be the 1st month of the year. + */ + public static final int TISHREI = 7; + + /** + * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish + * calendar. With the year starting at {@link #TISHREI}, it would actually be the 2nd month of the year. + */ + public static final int CHESHVAN = 8; + + /** + * Value of the month field indicating Kislev, the ninth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 3rd month of the year. + */ + public static final int KISLEV = 9; + + /** + * Value of the month field indicating Teves, the tenth numeric month of the year in the Jewish calendar. With the + * year starting at {@link #TISHREI}, it would actually be the 4th month of the year. + */ + public static final int TEVES = 10; + + /** + * Value of the month field indicating Shevat, the eleventh numeric month of the year in the Jewish calendar. With + * the year starting at {@link #TISHREI}, it would actually be the 5th month of the year. + */ + public static final int SHEVAT = 11; + + /** + * Value of the month field indicating Adar (or Adar I in a {@link #isJewishLeapYear() leap year}), the twelfth + * numeric month of the year in the Jewish calendar. With the year starting at {@link #TISHREI}, it would actually + * be the 6th month of the year. + */ + public static final int ADAR = 12; + + /** + * Value of the month field indicating Adar II, the leap (intercalary or embolismic) thirteenth (Undecimber) numeric + * month of the year added in Jewish {@link #isJewishLeapYear() leap year}). The leap years are years 3, 6, 8, 11, + * 14, 17 and 19 of a 19-year cycle. With the year starting at {@link #TISHREI}, it would actually be the 7th month + * of the year. + */ + public static final int ADAR_II = 13; + + /** + * the Jewish epoch using the RD (Rata Die/Fixed Date or Reingold Dershowitz) day used in Calendrical Calculations. + * Day 1 is January 1, 0001 of the Gregorian calendar + */ + private static final int JEWISH_EPOCH = -1373429; + + /** The number of chalakim (18) in a minute.*/ + private static final int CHALAKIM_PER_MINUTE = 18; + /** The number of chalakim (1080) in an hour.*/ + private static final int CHALAKIM_PER_HOUR = 1080; + /** The number of chalakim (25,920) in a 24-hour day .*/ + private static final int CHALAKIM_PER_DAY = 25920; // 24 * 1080 + /** The number of chalakim in an average Jewish month. A month has 29 days, 12 hours and 793 + * chalakim (44 minutes and 3.3 seconds) for a total of 765,433 chalakim*/ + private static final long CHALAKIM_PER_MONTH = 765433; // (29 * 24 + 12) * 1080 + 793 + /** + * Days from the beginning of Sunday till molad BaHaRaD. Calculated as 1 day, 5 hours and 204 chalakim = + * (24 + 5) * 1080 + 204 = 31524 + */ + private static final int CHALAKIM_MOLAD_TOHU = 31524; + + /** + * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days. + * + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) + */ + public static final int CHASERIM = 0; + + /** + * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days. + * + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) + */ + public static final int KESIDRAN = 1; + + /** + * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days. + * + * @see #getCheshvanKislevKviah() + * @see HebrewDateFormatter#getFormattedKviah(int) + */ + public static final int SHELAIMIM = 2; + + /** the internal Jewish month.*/ + private int jewishMonth; + /** the internal Jewish day.*/ + private int jewishDay; + /** the internal Jewish year.*/ + private int jewishYear; + /** the internal count of molad hours.*/ + private int moladHours; + /** the internal count of molad minutes.*/ + private int moladMinutes; + /** the internal count of molad chalakim.*/ + private int moladChalakim; + + /** + * Returns the molad hours. Only a JewishDate object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or {@link #setMoladHours(int)} will have this field + * populated. A regular JewishDate object will have this field set to 0. + * + * @return the molad hours + * @see #setMoladHours(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + */ + public int getMoladHours() { + return moladHours; + } + + /** + * Sets the molad hours. + * + * @param moladHours + * the molad hours to set + * @see #getMoladHours() + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * + */ + public void setMoladHours(int moladHours) { + this.moladHours = moladHours; + } + + /** + * Returns the molad minutes. Only an object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladMinutes(int)} will have these fields + * populated. A regular JewishDate object will have this field set to 0. + * + * @return the molad minutes + * @see #setMoladMinutes(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + */ + public int getMoladMinutes() { + return moladMinutes; + } + + /** + * Sets the molad minutes. The expectation is that the traditional minute-less chalakim will be broken out to + * minutes and {@link #setMoladChalakim(int) chalakim / parts} , so 793 (TaShTZaG) parts would have the minutes set to + * 44 and chalakim to 1. + * + * @param moladMinutes + * the molad minutes to set + * @see #getMoladMinutes() + * @see #setMoladChalakim(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * + */ + public void setMoladMinutes(int moladMinutes) { + this.moladMinutes = moladMinutes; + } + + /** + * Sets the molad chalakim/parts. The expectation is that the traditional minute-less chalakim will be broken + * out to {@link #setMoladMinutes(int) minutes} and chalakim, so 793 (TaShTZaG) parts would have the minutes set to 44 and + * chalakim to 1. + * + * @param moladChalakim + * the molad chalakim / parts to set + * @see #getMoladChalakim() + * @see #setMoladMinutes(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + * + */ + public void setMoladChalakim(int moladChalakim) { + this.moladChalakim = moladChalakim; + } + + /** + * Returns the molad chalakim / parts. Only an object populated with {@link #getMolad()}, + * {@link #setJewishDate(int, int, int, int, int, int)} or or {@link #setMoladChalakim(int)} will have these fields + * populated. A regular JewishDate object will have this field set to 0. + * + * @return the molad chalakim / parts + * @see #setMoladChalakim(int) + * @see #getMolad() + * @see #setJewishDate(int, int, int, int, int, int) + */ + public int getMoladChalakim() { + return moladChalakim; + } + + /** 1 == Sunday, 2 == Monday, etc... */ + private int dayOfWeek; + + /** Returns the absolute date (days since January 1, 0001 of the Gregorian calendar). + * @see #getAbsDate() + * @see #setJewishDateFromAbsDate() + */ + private int gregorianAbsDate; + + /** + * Returns the number of days in a given month in a given month and year. + * + * @param month + * the month. As with other cases in this class, this is 1-based, not zero-based. + * @param year + * the year (only impacts February) + * @return the number of days in the month in the given year + */ + private static int getLastDayOfGregorianMonth(int month, int year) { + return YearMonth.of(year, month).lengthOfMonth(); + } + + /** + * Computes the Gregorian date from the absolute date. ND+ER + * @param absDate the absolute date + */ + private static LocalDate absDateToDate(int absDate) { + int year = absDate / 366; // Search forward year by year from approximate year + while (absDate >= gregorianDateToAbsDate(year + 1, 1, 1)) { + year++; + } + + int month = 1; // Search forward month by month from January + while (absDate > gregorianDateToAbsDate(year, month, getLastDayOfGregorianMonth(month, year))) { + month++; + } + + int dayOfMonth = absDate - gregorianDateToAbsDate(year, month, 1) + 1; + return LocalDate.of(year, month, dayOfMonth); + } + + /** + * Returns the absolute date (days since January 1, 0001 of the Gregorian calendar). + * + * @return the number of days since January 1, 1 + */ + public int getAbsDate() { + return gregorianAbsDate; + } + + /** + * Computes the absolute date from a Gregorian date. ND+ER + * + * @param year + * the Gregorian year + * @param month + * the Gregorian month. Unlike the Java Calendar where January has the value of 0,This expects a 1 for + * January + * @param dayOfMonth + * the day of the month (1st, 2nd, etc...) + * @return the absolute Gregorian day + */ + private static int gregorianDateToAbsDate(int year, int month, int dayOfMonth) { + int absDate = dayOfMonth; + for (int m = month - 1; m > 0; m--) { + absDate += getLastDayOfGregorianMonth(m, year); // days in prior months of the year + } + return (absDate // days this year + + 365 * (year - 1) // days in previous years ignoring leap days + + (year - 1) / 4 // Julian leap days before this year + - (year - 1) / 100 // minus prior century years + + (year - 1) / 400); // plus prior years divisible by 400 + } + + /** + * Returns if the year is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19-year cycle are leap years. + * + * @param year + * the Jewish year. + * @return true if it is a leap year + * @see #isJewishLeapYear() + */ + private static boolean isJewishLeapYear(int year) { + return ((7 * year) + 1) % 19 < 7; + } + + /** + * Returns if the year the calendar is set to is a Jewish leap year. Years 3, 6, 8, 11, 14, 17 and 19 in the 19-year + * cycle are leap years. + * + * @return true if it is a leap year + * @see #isJewishLeapYear(int) + */ + public boolean isJewishLeapYear() { + return isJewishLeapYear(getJewishYear()); + } + + /** + * Returns the last month of a given Jewish year. This will be 12 on a non {@link #isJewishLeapYear(int) leap year} + * or 13 on a leap year. + * + * @param year + * the Jewish year. + * @return 12 on a non leap year or 13 on a leap year + * @see #isJewishLeapYear(int) + */ + private static int getLastMonthOfJewishYear(int year) { + return isJewishLeapYear(year) ? ADAR_II : ADAR; + } + + /** + * Returns the number of days elapsed from the Sunday prior to the start of the Jewish calendar to the mean + * conjunction of Tishri of the Jewish year. + * + * @param year + * the Jewish year + * @return the number of days elapsed from prior to the molad Tohu BaHaRaD (Be = Monday, Ha = 5 + * hours and RaD = 204 chalakim / parts) prior to the start of the Jewish calendar, to + * the mean conjunction of Tishri of the Jewish year. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 + * chalakim after sunset on Sunday evening). + */ + public static int getJewishCalendarElapsedDays(int year) { + long chalakimSince = getChalakimSinceMoladTohu(year, TISHREI); + int moladDay = (int) (chalakimSince / (long) CHALAKIM_PER_DAY); + int moladParts = (int) (chalakimSince - moladDay * (long) CHALAKIM_PER_DAY); + // delay Rosh Hashana for the 4 dechiyos + return addDechiyos(year, moladDay, moladParts); + } + + /** + * Adds the 4 dechiyos for molad Tishrei. These are: + *
    + *
  1. Lo ADU Rosh - Rosh Hashana can't fall on a Sunday, Wednesday or Friday. If the molad fell on one + * of these days, Rosh Hashana is delayed to the following day.
  2. + *
  3. Molad Zaken - If the molad of Tishrei falls after 12 noon, Rosh Hashana is delayed to the following + * day. If the following day is ADU, it will be delayed an additional day.
  4. + *
  5. GaTRaD - If on a non leap year the molad of Tishrei falls on a Tuesday (Ga) on or after 9 hours + * (T) and (RaD 204 chalakim it is delayed till Thursday (one day delay, plus one day for + * Lo ADU Rosh)
  6. + *
  7. BeTuTaKPaT - if the year following a leap year falls on a Monday (Be) on or after 15 hours + * (Tu) and 589 chalakim (TaKPaT) it is delayed till Tuesday
  8. + *
+ * + * @param year the year + * @param moladDay the molad day + * @param moladParts the molad parts + * @return the number of elapsed days in the JewishCalendar adjusted for the 4 dechiyos. + */ + private static int addDechiyos(int year, int moladDay, int moladParts) { + int roshHashanaDay = moladDay; // if no dechiyos + // delay Rosh Hashana for the dechiyos of the Molad - new moon 1 - Molad Zaken, 2- GaTRaD 3- BeTuTaKPaT + if ((moladParts >= 19440) // Dechiya of Molad Zaken - molad is >= midday (18 hours * 1080 chalakim) + || (((moladDay % 7) == 2) // start Dechiya of GaTRaD - Ga = is a Tuesday + && (moladParts >= 9924) // TRaD = 9 hours, 204 parts or later (9 * 1080 + 204) + && !isJewishLeapYear(year)) // of a non-leap year - end Dechiya of GaTRaD + || (((moladDay % 7) == 1) // start Dechiya of BeTuTaKPaT - Be = is on a Monday + && (moladParts >= 16789) // TUTaKPaT part of BeTuTaKPaT = 15 hours, 589 parts or later (15 * 1080 + 589) + && (isJewishLeapYear(year - 1)))) { // in a year following a leap year - end Dechiya of BeTuTaKPaT + roshHashanaDay += 1; // Then postpone Rosh HaShanah one day + } + // start 4th Dechiya - Lo ADU Rosh - Rosh Hashana can't occur on A- sunday, D- Wednesday, U - Friday + if (((roshHashanaDay % 7) == 0)// If Rosh HaShanah would occur on Sunday, + || ((roshHashanaDay % 7) == 3) // or Wednesday, + || ((roshHashanaDay % 7) == 5)) { // or Friday - end 4th Dechiya - Lo ADU Rosh + roshHashanaDay = roshHashanaDay + 1; // Then postpone it one (more) day + } + return roshHashanaDay; + } + + /** + * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu + * to the year and month passed in. + * + * @param year + * the Jewish year + * @param month + * the Jewish month the Jewish month, with the month numbers starting from Nissan. Use the JewishDate + * constants such as {@link JewishDate#TISHREI}. + * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu + */ + private static long getChalakimSinceMoladTohu(int year, int month) { + // Jewish lunar month = 29 days, 12 hours and 793 chalakim + // chalakim since Molad Tohu BeHaRaD - 1 day, 5 hours and 204 chalakim + int monthOfYear = getJewishMonthOfYear(year, month); + int monthsElapsed = (235 * ((year - 1) / 19)) // Months in complete 19-year lunar (Metonic) cycles so far + + (12 * ((year - 1) % 19)) // Regular months in this cycle + + ((7 * ((year - 1) % 19) + 1) / 19) // Leap months this cycle + + (monthOfYear - 1); // add elapsed months till the start of the molad of the month + // return chalakim prior to BeHaRaD + number of chalakim since + return CHALAKIM_MOLAD_TOHU + (CHALAKIM_PER_MONTH * monthsElapsed); + } + + /** + * Returns the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu + * to the Jewish year and month that this Object is set to. + * + * @return the number of chalakim (parts - 1080 to the hour) from the original hypothetical Molad Tohu + */ + public long getChalakimSinceMoladTohu() { + return getChalakimSinceMoladTohu(jewishYear, jewishMonth); + } + + /** + * Converts the {@link JewishDate#NISSAN} based constants used by this class to numeric month starting from + * {@link JewishDate#TISHREI}. This is required for molad calculations. + * + * @param year + * The Jewish year + * @param month + * The Jewish Month + * @return the Jewish month of the year starting with Tishrei + */ + private static int getJewishMonthOfYear(int year, int month) { + boolean isLeapYear = isJewishLeapYear(year); + return (month + (isLeapYear ? 6 : 5)) % (isLeapYear ? 13 : 12) + 1; + } + + /** + * Validates the components of a Jewish date for validity. It will throw an {@link IllegalArgumentException} if the Jewish + * date is earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a {@link #isJewishLeapYear(int) + * leap year}), the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 or > 59 or + * chalakim < 0 or > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the + * chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the + * case of 793 / TaShTzaG). + * + * @param year + * the Jewish year to validate. It will reject any year <= 3761 (lower than the year 1 Gregorian). + * @param month + * the Jewish month to validate. It will reject a month < 1 or > 12 (or 13 on a leap year) . + * @param dayOfMonth + * the day of the Jewish month to validate. It will reject any value < 1 or > 30 TODO: check calling + * methods to see if there is any reason that the class can validate that 30 is invalid for some months. + * @param hours + * the hours (for molad calculations). It will reject an hour < 0 or > 23 + * @param minutes + * the minutes (for molad calculations). It will reject a minute < 0 or > 59 + * @param chalakim + * the chalakim / parts (for molad calculations). It will reject a chalakim < 0 or > + * 17. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim + * per minutes, so it would be 44 minutes and 1 chelek in the case of 793 / TaShTzaG) + * + * @throws IllegalArgumentException + * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a leap year), + * the day of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 or > 59 or chalakim + * < 0 or > 17. For larger a larger number of chalakim such as 793 (TaShTzaG) break the + * chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek + * in the case of 793 (TaShTzaG). + */ + private static void validateJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { + if (month < NISSAN || month > getLastMonthOfJewishYear(year)) { + throw new IllegalArgumentException("The Jewish month has to be between 1 and 12 (or 13 on a leap year). " + + month + " is invalid for the year " + year + "."); + } + int monthLength = getDaysInJewishMonth(month, year); + if (dayOfMonth < 1 || dayOfMonth > monthLength) { + throw new IllegalArgumentException( + "The Jewish day of month can't be < 1 or > " + monthLength + + " for the month index " + monthLength + ". " + dayOfMonth + " is invalid."); + } + // reject dates prior to 18 Teves, 3761 (1/1/1 AD). This restriction can be relaxed if the date coding is + // changed/corrected + if ((year < 3761) || (year == 3761 && (month >= TISHREI && month < TEVES)) + || (year == 3761 && month == TEVES && dayOfMonth < 18)) { + throw new IllegalArgumentException( + "A Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian) can't be set. " + year + ", " + month + + ", " + dayOfMonth + " is invalid."); + } + if (hours < 0 || hours > 23) { + throw new IllegalArgumentException("Hours < 0 or > 23 can't be set. " + hours + " is invalid."); + } + + if (minutes < 0 || minutes > 59) { + throw new IllegalArgumentException("Minutes < 0 or > 59 can't be set. " + minutes + " is invalid."); + } + + if (chalakim < 0 || chalakim > 17) { + throw new IllegalArgumentException( + "Chalakim/parts < 0 or > 17 can't be set. " + + chalakim + + " is invalid. For larger numbers such as 793 (TaShTzaG) break the chalakim into minutes (18 chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG)"); + } + } + + /** + * Returns the number of days for a given Jewish year. ND+ER + * + * @param year + * the Jewish year + * @return the number of days for a given Jewish year. + * @see #isCheshvanLong() + * @see #isKislevShort() + */ + public static int getDaysInJewishYear(int year) { + return getJewishCalendarElapsedDays(year + 1) - getJewishCalendarElapsedDays(year); + } + + /** + * Returns the number of days for the current year that the calendar is set to. + * + * @return the number of days for the Object's current Jewish year. + * @see #isCheshvanLong() + * @see #isKislevShort() + * @see #isJewishLeapYear() + */ + public int getDaysInJewishYear() { + return getDaysInJewishYear(getJewishYear()); + } + + /** + * Returns if Cheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered) + * year Cheshvan is short. ND+ER + * + * @param year + * the year + * @return true if Cheshvan is long in Jewish year. + * @see #isCheshvanLong() + * @see #getCheshvanKislevKviah() + */ + private static boolean isCheshvanLong(int year) { + return getDaysInJewishYear(year) % 10 == 5; + } + + /** + * Returns if Cheshvan is long (30 days VS 29 days) for the current year that the calendar is set to. The method + * name isLong is done since in a Kesidran (ordered) year Cheshvan is short. + * + * @return true if Cheshvan is long for the current year that the calendar is set to + * @see #isCheshvanLong() + */ + public boolean isCheshvanLong() { + return isCheshvanLong(getJewishYear()); + } + + /** + * Returns if Kislev is short (29 days VS 30 days) in a given Jewish year. The method name isShort is done since in + * a Kesidran (ordered) year Kislev is long. ND+ER + * + * @param year + * the Jewish year + * @return true if Kislev is short for the given Jewish year. + * @see #isKislevShort() + * @see #getCheshvanKislevKviah() + */ + private static boolean isKislevShort(int year) { + return getDaysInJewishYear(year) % 10 == 3; + } + + /** + * Returns if the Kislev is short for the year that this class is set to. The method name isShort is done since in a + * Kesidran (ordered) year Kislev is long. + * + * @return true if Kislev is short for the year that this class is set to + */ + public boolean isKislevShort() { + return isKislevShort(getJewishYear()); + } + + /** + * Returns the Cheshvan and Kislev kviah (whether a Jewish year is short, regular or long). It will return + * {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and Kislev + * is 30 days and {@link #CHASERIM} if both are 29 days. + * + * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Cheshvan is 29 days and + * Kislev is 30 days and {@link #CHASERIM} if both are 29 days. + * @see #isCheshvanLong() + * @see #isKislevShort() + */ + public int getCheshvanKislevKviah() { + if (isCheshvanLong() && !isKislevShort()) { + return SHELAIMIM; + } else if (!isCheshvanLong() && isKislevShort()) { + return CHASERIM; + } else { + return KESIDRAN; + } + } + + /** + * Returns the number of days of a Jewish month for a given month and year. + * + * @param month + * the Jewish month + * @param year + * the Jewish Year + * @return the number of days for a given Jewish month + */ + private static int getDaysInJewishMonth(int month, int year) { + if ((month == IYAR) || (month == TAMMUZ) || (month == ELUL) || ((month == CHESHVAN) && !(isCheshvanLong(year))) + || ((month == KISLEV) && isKislevShort(year)) || (month == TEVES) + || ((month == ADAR) && !(isJewishLeapYear(year))) || (month == ADAR_II)) { + return 29; + } else { + return 30; + } + } + + /** + * Returns the number of days of the Jewish month that the calendar is currently set to. + * + * @return the number of days for the Jewish month that the calendar is currently set to. + */ + public int getDaysInJewishMonth() { + return getDaysInJewishMonth(getJewishMonth(), getJewishYear()); + } + + /** + * Computes and sets the Jewish date fields based on the provided absolute (Gregorian) date. + */ + private void setAbsDate(int gregorianAbsDate) { + if (gregorianAbsDate <= 0) { + throw new IllegalArgumentException("Dates in the BC era are not supported"); + } + this.gregorianAbsDate = gregorianAbsDate; + // Approximation from below + jewishYear = (gregorianAbsDate - JEWISH_EPOCH) / 366; + // Search forward for year from the approximation + while (gregorianAbsDate >= jewishDateToAbsDate(jewishYear + 1, TISHREI, 1)) { + jewishYear++; + } + // Search forward for month from either Tishri or Nissan. + if (gregorianAbsDate < jewishDateToAbsDate(jewishYear, NISSAN, 1)) { + jewishMonth = TISHREI;// Start at Tishri + } else { + jewishMonth = NISSAN;// Start at Nissan + } + while (gregorianAbsDate > jewishDateToAbsDate(jewishYear, jewishMonth, getDaysInJewishMonth())) { + jewishMonth++; + } + // Calculate the day by subtraction + jewishDay = gregorianAbsDate - jewishDateToAbsDate(jewishYear, jewishMonth, 1) + 1; + + // day of week (same calculation as original) + dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; + } + + /** + * Returns the absolute date of Jewish date. ND+ER + * + * @param year + * the Jewish year. The year can't be negative + * @param month + * the Jewish month starting with Nissan. Nissan expects a value of 1 etc. until Adar with a value of 12. + * For a leap year, 13 will be the expected value for Adar II. Use the constants {@link JewishDate#NISSAN} + * etc. + * @param dayOfMonth + * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only + * has 29 days, the day will be set as 29. + * @return the absolute date of the Jewish date. + */ + private static int jewishDateToAbsDate(int year, int month, int dayOfMonth) { + int elapsed = getDaysSinceStartOfJewishYear(year, month, dayOfMonth); + // add elapsed days this year + Days in prior years + Days elapsed before absolute year 1 + return elapsed + getJewishCalendarElapsedDays(year) + JEWISH_EPOCH; + } + + /** + * Returns the molad for a given year and month. Returns a JewishDate {@link Object} set to the date of the molad + * with the {@link #getMoladHours() hours}, {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() + * chalakim} set. In the current implementation, it sets the molad time based on a midnight date rollover. This + * means that Rosh Chodesh Adar II, 5771 with a molad of 7 chalakim past midnight on Shabbos 29 Adar I / March 5, + * 2011 12:00 AM and 7 chalakim, will have the following values: hours: 0, minutes: 0, Chalakim: 7. + * + * @return a JewishDate {@link Object} set to the date of the molad with the {@link #getMoladHours() hours}, + * {@link #getMoladMinutes() minutes} and {@link #getMoladChalakim() chalakim} set. + */ + public JewishDate getMolad() { + JewishDate moladDate = new JewishDate(getChalakimSinceMoladTohu()); + if (moladDate.getMoladHours() >= 6) { + moladDate.addDays(1); + } + moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24); + return moladDate; + } + + /** + * Returns the number of days from the Jewish epoch from the number of chalakim from the epoch passed in. + * + * @param chalakim + * the number of chalakim since the beginning of Sunday prior to BaHaRaD + * @return the number of days from the Jewish epoch + */ + private static int moladToAbsDate(long chalakim) { + return (int) (chalakim / CHALAKIM_PER_DAY) + JEWISH_EPOCH; + } + + /** + * Constructor that creates a JewishDate based on a molad passed in. The molad would be the number of + * chalakim / parts starting at the beginning of Sunday prior to the Molad Tohu BeHaRaD (Be = + * Monday, Ha = 5 hours and RaD = 204 chalakim / parts) - prior to the start of the Jewish + * calendar. BeHaRaD is 23:11:20 on Sunday night(5 hours 204/1080 chalakim after sunset on Sunday evening). + * + * @param molad the number of chalakim since the beginning of Sunday prior to BaHaRaD + */ + public JewishDate(long molad) { + setAbsDate(moladToAbsDate(molad)); + int conjunctionDay = (int) (molad / (long) CHALAKIM_PER_DAY); + int chalakim = (int) (molad - conjunctionDay * (long) CHALAKIM_PER_DAY); + setMoladHours(chalakim / CHALAKIM_PER_HOUR); + chalakim = chalakim - (getMoladHours() * CHALAKIM_PER_HOUR); + setMoladMinutes(chalakim / CHALAKIM_PER_MINUTE); + setMoladChalakim(chalakim - moladMinutes * CHALAKIM_PER_MINUTE); + } + + /** + * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. + * + * @param year + * the Jewish year + * @param month + * the Jewish month + * @param dayOfMonth + * the day in the Jewish month + * @return the number of days + */ + private static int getDaysSinceStartOfJewishYear(int year, int month, int dayOfMonth) { + int elapsedDays = dayOfMonth; + // Before Tishrei (from Nissan to Tishrei), add days in prior months + if (month < TISHREI) { + // this year before and after Nissan. + for (int m = TISHREI; m <= getLastMonthOfJewishYear(year); m++) { + elapsedDays += getDaysInJewishMonth(m, year); + } + for (int m = NISSAN; m < month; m++) { + elapsedDays += getDaysInJewishMonth(m, year); + } + } else { // Add days in prior months this year + for (int m = TISHREI; m < month; m++) { + elapsedDays += getDaysInJewishMonth(m, year); + } + } + return elapsedDays; + } + + /** + * returns the number of days from Rosh Hashana of the date passed in, to the full date passed in. + * + * @return the number of days + */ + public int getDaysSinceStartOfJewishYear() { + return getDaysSinceStartOfJewishYear(getJewishYear(), getJewishMonth(), getJewishDayOfMonth()); + } + + /** + * Creates a Jewish date based on a Jewish year, month and day of month. + * + * @param jewishYear + * the Jewish year + * @param jewishMonth + * the Jewish month. The method expects a 1 for Nissan ... 12 for Adar and 13 for Adar II. Use the + * constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar II) to avoid any + * confusion. + * @param jewishDayOfMonth + * the Jewish day of month. If 30 is passed in for a month with only 29 days (for example {@link #IYAR}, + * or {@link #KISLEV} in a year that {@link #isKislevShort()}), the 29th (last valid date of the month) + * will be set + * @throws IllegalArgumentException + * if the day of month is < 1 or > 30, or a year of < 0 is passed in. + */ + public JewishDate(int jewishYear, int jewishMonth, int jewishDayOfMonth) { + setJewishDate(jewishYear, jewishMonth, jewishDayOfMonth); + } + + /** + * Default constructor will set a default date to the current system date. + */ + public JewishDate() { + resetDate(); + } + + /** + * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. + * + * @param zonedDateTime + * the ZonedDateTime to set the calendar to + * @throws IllegalArgumentException + * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} + */ + public JewishDate(ZonedDateTime zonedDateTime) { + setGregorianDate(zonedDateTime); + } + + /** + * A constructor that initializes the date to the {@link java.time.LocalDate LocalDate} parameter. + * + * @param localDate + * the LocalDate to set the calendar to + * @throws IllegalArgumentException + * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} + */ + public JewishDate(LocalDate localDate) { + setGregorianDate(localDate); + } + + /** + * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. + * + * @param zonedDateTime + * the ZonedDateTime to set the calendar to + * @throws IllegalArgumentException + * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} + */ + public void setGregorianDate(ZonedDateTime zonedDateTime) { + setGregorianDate(zonedDateTime.toLocalDate()); + } + + /** + * Sets the date based on a {@link java.time.LocalDate LocalDate} object. Modifies the Jewish date as well. + * + * @param localDate + * the LocalDate to set the calendar to + * @throws IllegalArgumentException + * if the date would fall prior to the year 1 AD + */ + public void setGregorianDate(LocalDate localDate) { + int absDate = gregorianDateToAbsDate(localDate.getYear(), localDate.getMonth().getValue(), localDate.getDayOfMonth()); + + // convert to Jewish date + setAbsDate(absDate); + } + + /** + * Sets the Jewish Date and updates the Gregorian date accordingly. + * + * @param year + * the Jewish year. The year can't be negative + * @param month + * the Jewish month starting with Nissan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for + * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar + * II) to avoid any confusion. + * @param dayOfMonth + * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only + * has 29 days, the day will be set as 29. + * @throws IllegalArgumentException + * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a + * leap year) or the day of month is < 1 or > 30 is passed in + */ + public void setJewishDate(int year, int month, int dayOfMonth) { + setJewishDate(year, month, dayOfMonth, getMoladHours(), getMoladMinutes(), getMoladChalakim()); + } + + /** + * Sets the Jewish Date and updates the Gregorian date accordingly. + * + * @param year + * the Jewish year. The year can't be negative + * @param month + * the Jewish month starting with Nissan. A value of 1 is expected for Nissan ... 12 for Adar and 13 for + * Adar II. Use the constants {@link #NISSAN} ... {@link #ADAR} (or {@link #ADAR_II} for a leap year Adar + * II) to avoid any confusion. + * @param dayOfMonth + * the Jewish day of month. valid values are 1-30. If the day of month is set to 30 for a month that only + * has 29 days, the day will be set as 29. + * + * @param hours + * the hour of the day. Used for molad calculations + * @param minutes + * the minutes. Used for molad calculations + * @param chalakim + * the chalakim / parts. Used for molad calculations. The chalakim should not + * exceed 17. Minutes should be used for larger numbers. + * + * @throws IllegalArgumentException + * if a Jewish date earlier than 18 Teves, 3761 (1/1/1 Gregorian), a month < 1 or > 12 (or 13 on a leap year), the day + * of month is < 1 or > 30, an hour < 0 or > 23, a minute < 0 > 59 or chalakim < 0 > 17. For + * larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18 + * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG). + */ + public void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { + + validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim); + + jewishMonth = month; + jewishDay = dayOfMonth; + jewishYear = year; + moladHours = hours; + moladMinutes = minutes; + moladChalakim = chalakim; + + gregorianAbsDate = jewishDateToAbsDate(jewishYear, jewishMonth, jewishDay); // reset Gregorian date + + dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; // reset day of week + } + + public void setJewishDayOfMonth(int dayOfMonth){ + setJewishDate(getJewishYear(), getJewishMonth(), dayOfMonth); + } + + public void setJewishMonth(int month){ + int year = getJewishYear(); + int day = Math.min(getDaysInJewishMonth(month,year),getJewishDayOfMonth()); + setJewishDate(year, month, day); + } + + public void setJewishYear(int year){ + int month = Math.min(getJewishMonth(),getLastMonthOfJewishYear(year)); + int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,year)); + setJewishDate(year, month, day); + } + + + /** + * Returns this object's date as a {@link java.time.LocalDate} object. + * + * @return The {@link java.time.LocalDate} + */ + public LocalDate getLocalDate() { + return absDateToDate(getAbsDate()); + } + + /** + * Resets this date to the current system date. + */ + public void resetDate() { + LocalDate localDate = LocalDate.now(); + setGregorianDate(localDate); + } + + public void minusDays(int days){ + if (days < 1) { + throw new IllegalArgumentException("the amount of days to subtract has to be greater than zero."); + } + setAbsDate(getAbsDate() - days); + + } + public void addDays(int days){ + if (days < 1) { + throw new IllegalArgumentException("the amount of days to add has to be greater than zero."); + } + setAbsDate(getAbsDate() + days); + } + public void addMonths(int months){ + if (months < 1) { + throw new IllegalArgumentException("the amount of months to add has to be greater than zero."); + } + int year = getJewishYear(); + int month = getJewishMonth(); + for (int i = 0; i < months; i++) { + if (month == ELUL) { + month = TISHREI; + year++; + } else if ((! isJewishLeapYear(year) && month == ADAR) + || (isJewishLeapYear(year) && month == ADAR_II)){ + month = NISSAN; + } else { + month++; + } + } + int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,year)); + setJewishDate(year, month, day); + } + public void addYears(int years, boolean useAdarAlephForLeapYear){ + if (years < 1) { + throw new IllegalArgumentException("the amount of years to add has to be greater than zero."); + } + int targetYear = getJewishYear() + years; + // If we are in the month of Adar in a non-leap year and we are skipping + // to a year that is a leap year, we will use useAdarAlephInYear do + // decide which month to skip to. + int month; + if (getJewishMonth() == JewishDate.ADAR && !isJewishLeapYear(getJewishYear()) && isJewishLeapYear(targetYear)){ + if (useAdarAlephForLeapYear){ + month = JewishDate.ADAR; + }else{ + month = JewishDate.ADAR_II; + } + } else{ + // If we are in JewishDate.ADAR_II, this will clamp the month to 12 (JewishDate.ADAR) + month = Math.min(getJewishMonth(),getLastMonthOfJewishYear(targetYear)); + } + // Clamp to final day of the month + int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,targetYear)); + setJewishDate(targetYear, month, day); + } + + + + /** + * Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more + * complex formatting, use the formatter classes. + * + * @return the Jewish date in the form "day Month, year" e.g. "21 Shevat, 5729" + * @see HebrewDateFormatter#format(JewishDate) + */ + public String toString() { + return new HebrewDateFormatter().format(this); + } + + /** + * Indicates whether some other object is "equal to" this one. + * @see Object#equals(Object) + */ + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object == null || getClass() != object.getClass()) { + return false; + } + JewishDate jewishDate = (JewishDate) object; + return gregorianAbsDate == jewishDate.getAbsDate(); + } + + /** + * Compares two dates as per the compareTo() method in the Comparable interface. Returns a value less than 0 if this + * date is "less than" (before) the date, greater than 0 if this date is "greater than" (after) the date, or 0 if + * they are equal. + */ + public int compareTo(JewishDate jewishDate) { + return Integer.compare(gregorianAbsDate, jewishDate.getAbsDate()); + } + + /** + * Returns the Jewish month 1-12 (or 13 years in a leap year). The month count starts with 1 for Nissan and goes to + * 13 for Adar II + * + * @return the Jewish month from 1 to 12 (or 13 years in a leap year). The month count starts with 1 for Nissan and + * goes to 13 for Adar II + */ + public int getJewishMonth() { + return jewishMonth; + } + + /** + * Returns the Jewish day of month. + * + * @return the Jewish day of the month + */ + public int getJewishDayOfMonth() { + return jewishDay; + } + + /** + * Returns the Jewish year. + * + * @return the Jewish year + */ + public int getJewishYear() { + return jewishYear; + } + + /** + * Returns the day of the week as a number between 1-7. + * + * @return the day of the week as a number between 1-7. + */ + public int getDayOfWeek() { + return dayOfWeek; + } + + /** + * A method that creates a deep copy of the object. + * + * @see Object#clone() + */ + public Object clone() { + JewishDate clone = null; + try { + clone = (JewishDate) super.clone(); + } catch (CloneNotSupportedException cnse) { + // Required by the compiler. Should never be reached since we implement clone() + } + if (clone != null) { + clone.setAbsDate(getAbsDate()); + clone.setMoladHours(getMoladHours()); + clone.setMoladMinutes(getMoladMinutes()); + clone.setMoladChalakim(getMoladChalakim()); + } + return clone; + } + + /** + * Overrides {@link Object#hashCode()}. + * @see Object#hashCode() + */ + public int hashCode() { + return Integer.hashCode(gregorianAbsDate); + } } diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index 7e1c3b2b..0683bb95 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -215,7 +215,7 @@ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) { */ public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) { JewishCalendar tomorrow = (JewishCalendar) jewishCalendar.clone(); - tomorrow.forward(Calendar.DATE, 1); + tomorrow.addDays(1); if (! tachanunRecitedMinchaAllYear || jewishCalendar.getDayOfWeek() == Calendar.FRIDAY diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java index a1927404..e444b26f 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java @@ -15,8 +15,8 @@ */ package com.kosherjava.zmanim.hebrewcalendar; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.time.LocalDate; +import java.time.temporal.ChronoUnit; /** * This class calculates the Talmud Yerusalmi blatt/dafim) in Shas*/ private static final int WHOLE_SHAS_DAFS = 1554; @@ -56,8 +53,7 @@ public YerushalmiYomiCalculator() { * @return the daf. */ public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { - ZonedDateTime requested = jewishCalendar.getGregorianCalendar().toInstant() - .atZone(ZoneId.systemDefault()); + LocalDate requested = jewishCalendar.getLocalDate(); int masechta = 0; Daf dafYomi = null; @@ -73,8 +69,8 @@ public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { } // Initialize cycle dates - ZonedDateTime nextCycle = DAF_YOMI_START_DAY; - ZonedDateTime prevCycle = DAF_YOMI_START_DAY; + LocalDate nextCycle = DAF_YOMI_START_DAY; + LocalDate prevCycle = DAF_YOMI_START_DAY; // Loop through cycles until we reach the requested date while (requested.isAfter(nextCycle)) { @@ -107,10 +103,10 @@ public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { /** * Counts the number of "special days" (Yom Kippur, Tisha B’Av) between two ZonedDateTimes. * @param start the start date for the calculation - * @param end the start date for the calculatio + * @param end the start date for the calculation * @return the number of special days */ - private static int getNumOfSpecialDays(ZonedDateTime start, ZonedDateTime end) { + private static int getNumOfSpecialDays(LocalDate start, LocalDate end) { int startYear = new JewishCalendar(start).getJewishYear(); int endYear = new JewishCalendar(end).getJewishYear(); @@ -126,10 +122,8 @@ private static int getNumOfSpecialDays(ZonedDateTime start, ZonedDateTime end) { yomKippur.setJewishYear(year); tishaBeav.setJewishYear(year); - ZonedDateTime ykDate = yomKippur.getGregorianCalendar().toInstant() - .atZone(start.getZone()); - ZonedDateTime tbDate = tishaBeav.getGregorianCalendar().toInstant() - .atZone(start.getZone()); + LocalDate ykDate = yomKippur.getLocalDate(); + LocalDate tbDate = tishaBeav.getLocalDate(); if (isBetween(start, ykDate, end)) specialDays++; if (isBetween(start, tbDate, end)) specialDays++; @@ -145,7 +139,7 @@ private static int getNumOfSpecialDays(ZonedDateTime start, ZonedDateTime end) { * @param end the end ZonedDateTime * @return if the date is between the two dates */ - private static boolean isBetween(ZonedDateTime start, ZonedDateTime date, ZonedDateTime end) { + private static boolean isBetween(LocalDate start, LocalDate date, LocalDate end) { return start.isBefore(date) && end.isAfter(date); } @@ -155,7 +149,7 @@ private static boolean isBetween(ZonedDateTime start, ZonedDateTime date, ZonedD * @param end the end ZonedDateTime * @return the number of days between the dates. */ - private static long getDiffBetweenDays(ZonedDateTime start, ZonedDateTime end) { - return (end.toInstant().toEpochMilli() - start.toInstant().toEpochMilli()) / DAY_MILLIS; + private static long getDiffBetweenDays(LocalDate start, LocalDate end) { + return ChronoUnit.DAYS.between(start, end); } } diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java index 90ba0b8c..cbf7e877 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java @@ -15,6 +15,8 @@ */ package com.kosherjava.zmanim.hebrewcalendar; +import java.time.LocalDate; +import java.time.Month; import java.util.Calendar; import java.util.GregorianCalendar; @@ -30,14 +32,14 @@ public class YomiCalculator { /** * The start date of the first Daf Yomi Bavli cycle of September 11, 1923 / Rosh Hashana 5684. */ - private static final Calendar dafYomiStartDay = new GregorianCalendar(1923, Calendar.SEPTEMBER, 11); + private static final LocalDate dafYomiStartDay = LocalDate.of(1923, Month.SEPTEMBER,11); /** The start date of the first Daf Yomi Bavli cycle in the Julian calendar. Used internally for calculations.*/ private static final int dafYomiJulianStartDay = getJulianDay(dafYomiStartDay); /** * The date that the pagination for the Daf Yomi Maseches Shekalim changed to use the commonly used Vilna * Shas pagination from the no longer commonly available Zhitomir / Slavuta Shas used by Rabbi Meir Shapiro. */ - private static final Calendar shekalimChangeDay = new GregorianCalendar(1975, Calendar.JUNE, 24); + private static final LocalDate shekalimChangeDay = LocalDate.of(1975, Month.JUNE, 24); /** The Julian date that the cycle for Shekalim changed. * @see #getDafYomiBavli(JewishCalendar) for details. @@ -83,18 +85,18 @@ public static Daf getDafYomiBavli(JewishCalendar jewishCalendar) { */ int[] blattPerMasechta = { 64, 157, 105, 121, 22, 88, 56, 40, 35, 31, 32, 29, 27, 122, 112, 91, 66, 49, 90, 82, 119, 119, 176, 113, 24, 49, 76, 14, 120, 110, 142, 61, 34, 34, 28, 22, 4, 9, 5, 73 }; - Calendar calendar = jewishCalendar.getGregorianCalendar(); + LocalDate date = jewishCalendar.getLocalDate(); Daf dafYomi = null; - int julianDay = getJulianDay(calendar); + int julianDay = getJulianDay(date); int cycleNo; int dafNo; - if (calendar.before(dafYomiStartDay)) { + if (date.isBefore(dafYomiStartDay) ) { // TODO: should we return a null or throw an IllegalArgumentException? - throw new IllegalArgumentException(calendar + " is prior to organized Daf Yomi Bavli cycles that started on " + throw new IllegalArgumentException(date + " is prior to organized Daf Yomi Bavli cycles that started on " + dafYomiStartDay); } - if (calendar.equals(shekalimChangeDay) || calendar.after(shekalimChangeDay)) { + if (date.equals(shekalimChangeDay) || date.isAfter(shekalimChangeDay)) { cycleNo = 8 + ((julianDay - shekalimJulianChangeDay) / 2711); dafNo = ((julianDay - shekalimJulianChangeDay) % 2711); } else { @@ -140,10 +142,10 @@ public static Daf getDafYomiBavli(JewishCalendar jewishCalendar) { * The Java Calendar of the date to be calculated * @return the Julian day number corresponding to the date */ - private static int getJulianDay(Calendar calendar) { - int year = calendar.get(Calendar.YEAR); - int month = calendar.get(Calendar.MONTH) + 1; - int day = calendar.get(Calendar.DAY_OF_MONTH); + private static int getJulianDay(LocalDate localDate) { + int year = localDate.getYear(); + int month = localDate.getMonthValue() ; + int day = localDate.getDayOfMonth(); if (month <= 2) { year -= 1; month += 12; diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index 485df83b..afafa4b5 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -4,7 +4,9 @@ import com.kosherjava.zmanim.util.GeoLocation; import java.io.*; +import java.time.Instant; import java.time.LocalDate; +import java.time.ZoneId; import java.util.*; public class RegressionTestFileWriter { @@ -14,9 +16,9 @@ public static void main(String[] args) throws IOException { LocalDate end = LocalDate.of(9999, 1, 1); LocalDate current = start; JewishCalendar cal = new JewishCalendar(current); - GregorianCalendar gregorian = new GregorianCalendar(current.getYear(), current.getMonthValue() - 1, current.getDayOfMonth()); + LocalDate gregorian = LocalDate.of(current.getYear(), current.getMonthValue() , current.getDayOfMonth()); JewishDate date = new JewishDate(current); - ComprehensiveZmanimCalendar zcal = new ComprehensiveZmanimCalendar(new GeoLocation("Lakewood, NJ", 40.096, -74.222, 29.02, TimeZone.getTimeZone("America/New_York"))); + ComprehensiveZmanimCalendar zcal = new ComprehensiveZmanimCalendar(new GeoLocation("Lakewood, NJ", 40.096, -74.222, 29.02, ZoneId.of("America/New_York"))); List calendars = new ArrayList<>(); List zmanim = new ArrayList<>(); @@ -35,7 +37,7 @@ public static void main(String[] args) throws IOException { cal.isErevYomTov(), cal.isErevRoshChodesh(), cal.isYomKippurKatan(), cal.isBeHaB(), cal.isTaanis(), cal.isTaanisBechoros(), cal.getDayOfChanukah(), cal.isChanukah(), cal.isPurim(), cal.isRoshChodesh(), cal.isMacharChodesh(), cal.isShabbosMevorchim(), cal.getDayOfOmer(), - cal.isTishaBav(), cal.getMolad(), cal.getMoladAsDate(), cal.getTchilasZmanKidushLevana3Days(), + cal.isTishaBav(), cal.getMolad(), cal.getMoladAsInstant(), cal.getTchilasZmanKidushLevana3Days(), cal.getTchilasZmanKidushLevana7Days(), cal.getSofZmanKidushLevanaBetweenMoldos(), cal.getSofZmanKidushLevana15Days(), cal.getTekufasTishreiElapsedDays())); @@ -126,10 +128,10 @@ public static void main(String[] args) throws IOException { cal.isMoridHatalRecited();*/ current = current.plusDays(1L); - gregorian.roll(Calendar.DATE, true); - date.forward(Calendar.DATE, 1); - cal.setDate(current); - zcal.setCalendar(gregorian); + gregorian = gregorian.plusDays(1); + date.addDays(1); + cal.setGregorianDate(current); + zcal.setLocalDate(gregorian); } //write calendars to file: @@ -324,71 +326,71 @@ public String toString() { } public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degrees, - long getShaahZmanis26Degrees, long getShaahZmanis16Point1Degrees, long getShaahZmanis60Minutes, - long getShaahZmanis72Minutes, long getShaahZmanis72MinutesZmanis, long getShaahZmanis90Minutes, - long getShaahZmanis90MinutesZmanis, long getShaahZmanis96MinutesZmanis, long getShaahZmanisAteretTorah, - long getShaahZmanisAlos16Point1ToTzais3Point8, long getShaahZmanisAlos16Point1ToTzais3Point7, - long getShaahZmanis96Minutes, long getShaahZmanis120Minutes, long getShaahZmanis120MinutesZmanis, - Date getPlagHamincha120MinutesZmanis, Date getPlagHamincha120Minutes, Date getAlos60, - Date getAlos72Zmanis, Date getAlos96, Date getAlos90Zmanis, Date getAlos96Zmanis, Date getAlos90, - Date getAlos120, Date getAlos120Zmanis, Date getAlos26Degrees, Date getAlos18Degrees, - Date getAlos19Degrees, Date getAlos19Point8Degrees, Date getAlos16Point1Degrees, - Date getMisheyakir11Point5Degrees, Date getMisheyakir11Degrees, Date getMisheyakir10Point2Degrees, - Date getMisheyakir7Point65Degrees, Date getMisheyakir9Point5Degrees, - Date getSofZmanShmaMGA19Point8Degrees, Date getSofZmanShmaMGA16Point1Degrees, - Date getSofZmanShmaMGA18Degrees, Date getSofZmanShmaMGA72Minutes, Date getSofZmanShmaMGA72MinutesZmanis, - Date getSofZmanShmaMGA90Minutes, Date getSofZmanShmaMGA90MinutesZmanis, Date getSofZmanShmaMGA96Minutes, - Date getSofZmanShmaMGA96MinutesZmanis, Date getSofZmanShma3HoursBeforeChatzos, - Date getSofZmanShmaMGA120Minutes, Date getSofZmanShmaAlos16Point1ToSunset, - Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees, - Date getSofZmanTfilaMGA19Point8Degrees, Date getSofZmanTfilaMGA16Point1Degrees, - Date getSofZmanTfilaMGA18Degrees, Date getSofZmanTfilaMGA72Minutes, - Date getSofZmanTfilaMGA72MinutesZmanis, Date getSofZmanTfilaMGA90Minutes, - Date getSofZmanTfilaMGA90MinutesZmanis, Date getSofZmanTfilaMGA96Minutes, - Date getSofZmanTfilaMGA96MinutesZmanis, Date getSofZmanTfilaMGA120Minutes, - Date getSofZmanTfila2HoursBeforeChatzos, Date getMinchaGedola30Minutes, Date getMinchaGedola72Minutes, - Date getMinchaGedola16Point1Degrees, Date getMinchaGedolaAhavatShalom, - Date getMinchaGedolaGreaterThan30, Date getMinchaKetana16Point1Degrees, - Date getMinchaKetanaAhavatShalom, Date getMinchaKetana72Minutes, Date getPlagHamincha60Minutes, - Date getPlagHamincha72Minutes, Date getPlagHamincha90Minutes, Date getPlagHamincha96Minutes, - Date getPlagHamincha96MinutesZmanis, Date getPlagHamincha90MinutesZmanis, - Date getPlagHamincha72MinutesZmanis, Date getPlagHamincha16Point1Degrees, - Date getPlagHamincha19Point8Degrees, Date getPlagHamincha26Degrees, Date getPlagHamincha18Degrees, - Date getPlagAlosToSunset, Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees, - Date getPlagAhavatShalom, Date getBainHashmashosRT13Point24Degrees, - Date getBainHashmashosRT58Point5Minutes, Date getBainHashmashosRT13Point5MinutesBefore7Point083Degrees, - Date getBainHashmashosRT2Stars, Date getBainHashmashosYereim18Minutes, - Date getBainHashmashosYereim3Point05Degrees, Date getBainHashmashosYereim16Point875Minutes, - Date getBainHashmashosYereim2Point8Degrees, Date getBainHashmashosYereim13Point5Minutes, - Date getBainHashmashosYereim2Point1Degrees, Date getTzaisGeonim3Point7Degrees, - Date getTzaisGeonim3Point8Degrees, Date getTzaisGeonim5Point95Degrees, - Date getTzaisGeonim4Point61Degrees, Date getTzaisGeonim4Point37Degrees, - Date getTzaisGeonim5Point88Degrees, Date getTzaisGeonim4Point8Degrees, - Date getTzaisGeonim6Point45Degrees, Date getTzaisGeonim7Point083Degrees, - Date getTzaisGeonim7Point67Degrees, Date getTzaisGeonim8Point5Degrees, - Date getTzaisGeonim9Point3Degrees, Date getTzaisGeonim9Point75Degrees, Date getTzais60, - Date getTzaisAteretTorah, Date getSofZmanShmaAteretTorah, Date getSofZmanTfilahAteretTorah, - Date getMinchaGedolaAteretTorah, Date getMinchaKetanaAteretTorah, Date getPlagHaminchaAteretTorah, - Date getTzais72Zmanis, Date getTzais90Zmanis, Date getTzais96Zmanis, Date getTzais90, Date getTzais120, - Date getTzais120Zmanis, Date getTzais16Point1Degrees, Date getTzais26Degrees, Date getTzais18Degrees, - Date getTzais19Point8Degrees, Date getTzais96, Date getFixedLocalChatzos, - Date getSofZmanKidushLevanaBetweenMoldos, - Date getSofZmanKidushLevana15Days, Date getTchilasZmanKidushLevana3Days, Date getZmanMolad, - Date getTchilasZmanKidushLevana7Days, Date getSofZmanAchilasChametzGRA, - Date getSofZmanAchilasChametzMGA72Minutes, Date getSofZmanAchilasChametzMGA16Point1Degrees, - Date getSofZmanBiurChametzGRA, Date getSofZmanBiurChametzMGA72Minutes, - Date getSofZmanBiurChametzMGA16Point1Degrees, Date getSolarMidnight, long getShaahZmanisBaalHatanya, - Date getAlosBaalHatanya, Date getSofZmanShmaBaalHatanya, Date getSofZmanTfilaBaalHatanya, - Date getSofZmanAchilasChametzBaalHatanya, Date getSofZmanBiurChametzBaalHatanya, - Date getMinchaGedolaBaalHatanya, Date getMinchaGedolaBaalHatanyaGreaterThan30, - Date getMinchaKetanaBaalHatanya, Date getPlagHaminchaBaalHatanya, Date getTzaisBaalHatanya, - Date getSofZmanShmaMGA18DegreesToFixedLocalChatzos, - Date getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos, - Date getSofZmanShmaMGA90MinutesToFixedLocalChatzos, Date getSofZmanShmaMGA72MinutesToFixedLocalChatzos, - Date getSofZmanShmaGRASunriseToFixedLocalChatzos, Date getSofZmanTfilaGRASunriseToFixedLocalChatzos, - Date getMinchaGedolaGRAFixedLocalChatzos30Minutes, Date getMinchaKetanaGRAFixedLocalChatzosToSunset, - Date getPlagHaminchaGRAFixedLocalChatzosToSunset, Date getTzais50, Date getSamuchLeMinchaKetanaGRA, - Date getSamuchLeMinchaKetana16Point1Degrees, Date getSamuchLeMinchaKetana72Minutes) { + long getShaahZmanis26Degrees, long getShaahZmanis16Point1Degrees, long getShaahZmanis60Minutes, + long getShaahZmanis72Minutes, long getShaahZmanis72MinutesZmanis, long getShaahZmanis90Minutes, + long getShaahZmanis90MinutesZmanis, long getShaahZmanis96MinutesZmanis, long getShaahZmanisAteretTorah, + long getShaahZmanisAlos16Point1ToTzais3Point8, long getShaahZmanisAlos16Point1ToTzais3Point7, + long getShaahZmanis96Minutes, long getShaahZmanis120Minutes, long getShaahZmanis120MinutesZmanis, + Instant getPlagHamincha120MinutesZmanis, Instant getPlagHamincha120Minutes, Instant getAlos60, + Instant getAlos72Zmanis, Instant getAlos96, Instant getAlos90Zmanis, Instant getAlos96Zmanis, Instant getAlos90, + Instant getAlos120, Instant getAlos120Zmanis, Instant getAlos26Degrees, Instant getAlos18Degrees, + Instant getAlos19Degrees, Instant getAlos19Point8Degrees, Instant getAlos16Point1Degrees, + Instant getMisheyakir11Point5Degrees, Instant getMisheyakir11Degrees, Instant getMisheyakir10Point2Degrees, + Instant getMisheyakir7Point65Degrees, Instant getMisheyakir9Point5Degrees, + Instant getSofZmanShmaMGA19Point8Degrees, Instant getSofZmanShmaMGA16Point1Degrees, + Instant getSofZmanShmaMGA18Degrees, Instant getSofZmanShmaMGA72Minutes, Instant getSofZmanShmaMGA72MinutesZmanis, + Instant getSofZmanShmaMGA90Minutes, Instant getSofZmanShmaMGA90MinutesZmanis, Instant getSofZmanShmaMGA96Minutes, + Instant getSofZmanShmaMGA96MinutesZmanis, Instant getSofZmanShma3HoursBeforeChatzos, + Instant getSofZmanShmaMGA120Minutes, Instant getSofZmanShmaAlos16Point1ToSunset, + Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees, + Instant getSofZmanTfilaMGA19Point8Degrees, Instant getSofZmanTfilaMGA16Point1Degrees, + Instant getSofZmanTfilaMGA18Degrees, Instant getSofZmanTfilaMGA72Minutes, + Instant getSofZmanTfilaMGA72MinutesZmanis, Instant getSofZmanTfilaMGA90Minutes, + Instant getSofZmanTfilaMGA90MinutesZmanis, Instant getSofZmanTfilaMGA96Minutes, + Instant getSofZmanTfilaMGA96MinutesZmanis, Instant getSofZmanTfilaMGA120Minutes, + Instant getSofZmanTfila2HoursBeforeChatzos, Instant getMinchaGedola30Minutes, Instant getMinchaGedola72Minutes, + Instant getMinchaGedola16Point1Degrees, Instant getMinchaGedolaAhavatShalom, + Instant getMinchaGedolaGreaterThan30, Instant getMinchaKetana16Point1Degrees, + Instant getMinchaKetanaAhavatShalom, Instant getMinchaKetana72Minutes, Instant getPlagHamincha60Minutes, + Instant getPlagHamincha72Minutes, Instant getPlagHamincha90Minutes, Instant getPlagHamincha96Minutes, + Instant getPlagHamincha96MinutesZmanis, Instant getPlagHamincha90MinutesZmanis, + Instant getPlagHamincha72MinutesZmanis, Instant getPlagHamincha16Point1Degrees, + Instant getPlagHamincha19Point8Degrees, Instant getPlagHamincha26Degrees, Instant getPlagHamincha18Degrees, + Instant getPlagAlosToSunset, Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees, + Instant getPlagAhavatShalom, Instant getBainHashmashosRT13Point24Degrees, + Instant getBainHashmashosRT58Point5Minutes, Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees, + Instant getBainHashmashosRT2Stars, Instant getBainHashmashosYereim18Minutes, + Instant getBainHashmashosYereim3Point05Degrees, Instant getBainHashmashosYereim16Point875Minutes, + Instant getBainHashmashosYereim2Point8Degrees, Instant getBainHashmashosYereim13Point5Minutes, + Instant getBainHashmashosYereim2Point1Degrees, Instant getTzaisGeonim3Point7Degrees, + Instant getTzaisGeonim3Point8Degrees, Instant getTzaisGeonim5Point95Degrees, + Instant getTzaisGeonim4Point61Degrees, Instant getTzaisGeonim4Point37Degrees, + Instant getTzaisGeonim5Point88Degrees, Instant getTzaisGeonim4Point8Degrees, + Instant getTzaisGeonim6Point45Degrees, Instant getTzaisGeonim7Point083Degrees, + Instant getTzaisGeonim7Point67Degrees, Instant getTzaisGeonim8Point5Degrees, + Instant getTzaisGeonim9Point3Degrees, Instant getTzaisGeonim9Point75Degrees, Instant getTzais60, + Instant getTzaisAteretTorah, Instant getSofZmanShmaAteretTorah, Instant getSofZmanTfilahAteretTorah, + Instant getMinchaGedolaAteretTorah, Instant getMinchaKetanaAteretTorah, Instant getPlagHaminchaAteretTorah, + Instant getTzais72Zmanis, Instant getTzais90Zmanis, Instant getTzais96Zmanis, Instant getTzais90, Instant getTzais120, + Instant getTzais120Zmanis, Instant getTzais16Point1Degrees, Instant getTzais26Degrees, Instant getTzais18Degrees, + Instant getTzais19Point8Degrees, Instant getTzais96, Instant getFixedLocalChatzos, + Instant getSofZmanKidushLevanaBetweenMoldos, + Instant getSofZmanKidushLevana15Days, Instant getTchilasZmanKidushLevana3Days, Instant getZmanMolad, + Instant getTchilasZmanKidushLevana7Days, Instant getSofZmanAchilasChametzGRA, + Instant getSofZmanAchilasChametzMGA72Minutes, Instant getSofZmanAchilasChametzMGA16Point1Degrees, + Instant getSofZmanBiurChametzGRA, Instant getSofZmanBiurChametzMGA72Minutes, + Instant getSofZmanBiurChametzMGA16Point1Degrees, Instant getSolarMidnight, long getShaahZmanisBaalHatanya, + Instant getAlosBaalHatanya, Instant getSofZmanShmaBaalHatanya, Instant getSofZmanTfilaBaalHatanya, + Instant getSofZmanAchilasChametzBaalHatanya, Instant getSofZmanBiurChametzBaalHatanya, + Instant getMinchaGedolaBaalHatanya, Instant getMinchaGedolaBaalHatanyaGreaterThan30, + Instant getMinchaKetanaBaalHatanya, Instant getPlagHaminchaBaalHatanya, Instant getTzaisBaalHatanya, + Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos, + Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos, + Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos, Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos, + Instant getSofZmanShmaGRASunriseToFixedLocalChatzos, Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos, + Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes, Instant getMinchaKetanaGRAFixedLocalChatzosToSunset, + Instant getPlagHaminchaGRAFixedLocalChatzosToSunset, Instant getTzais50, Instant getSamuchLeMinchaKetanaGRA, + Instant getSamuchLeMinchaKetana16Point1Degrees, Instant getSamuchLeMinchaKetana72Minutes) { this.getShaahZmanis19Point8Degrees = getShaahZmanis19Point8Degrees; this.getShaahZmanis18Degrees = getShaahZmanis18Degrees; this.getShaahZmanis26Degrees = getShaahZmanis26Degrees; @@ -567,176 +569,176 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre public final long getShaahZmanis96Minutes; public final long getShaahZmanis120Minutes; public final long getShaahZmanis120MinutesZmanis; - public final Date getPlagHamincha120MinutesZmanis; - public final Date getPlagHamincha120Minutes; - public final Date getAlos60; - public final Date getAlos72Zmanis; - public final Date getAlos96; - public final Date getAlos90Zmanis; - public final Date getAlos96Zmanis; - public final Date getAlos90; - public final Date getAlos120; - public final Date getAlos120Zmanis; - public final Date getAlos26Degrees; - public final Date getAlos18Degrees; - public final Date getAlos19Degrees; - public final Date getAlos19Point8Degrees; - public final Date getAlos16Point1Degrees; - public final Date getMisheyakir11Point5Degrees; - public final Date getMisheyakir11Degrees; - public final Date getMisheyakir10Point2Degrees; - public final Date getMisheyakir7Point65Degrees; - public final Date getMisheyakir9Point5Degrees; - public final Date getSofZmanShmaMGA19Point8Degrees; - public final Date getSofZmanShmaMGA16Point1Degrees; - public final Date getSofZmanShmaMGA18Degrees; - public final Date getSofZmanShmaMGA72Minutes; - public final Date getSofZmanShmaMGA72MinutesZmanis; - public final Date getSofZmanShmaMGA90Minutes; - public final Date getSofZmanShmaMGA90MinutesZmanis; - public final Date getSofZmanShmaMGA96Minutes; - public final Date getSofZmanShmaMGA96MinutesZmanis; - public final Date getSofZmanShma3HoursBeforeChatzos; - public final Date getSofZmanShmaMGA120Minutes; - public final Date getSofZmanShmaAlos16Point1ToSunset; - public final Date getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees; - public final Date getSofZmanTfilaMGA19Point8Degrees; - public final Date getSofZmanTfilaMGA16Point1Degrees; - public final Date getSofZmanTfilaMGA18Degrees; - public final Date getSofZmanTfilaMGA72Minutes; - public final Date getSofZmanTfilaMGA72MinutesZmanis; - public final Date getSofZmanTfilaMGA90Minutes; - public final Date getSofZmanTfilaMGA90MinutesZmanis; - public final Date getSofZmanTfilaMGA96Minutes; - public final Date getSofZmanTfilaMGA96MinutesZmanis; - public final Date getSofZmanTfilaMGA120Minutes; - public final Date getSofZmanTfila2HoursBeforeChatzos; - public final Date getMinchaGedola30Minutes; - public final Date getMinchaGedola72Minutes; - public final Date getMinchaGedola16Point1Degrees; - public final Date getMinchaGedolaAhavatShalom; - public final Date getMinchaGedolaGreaterThan30; - public final Date getMinchaKetana16Point1Degrees; - public final Date getMinchaKetanaAhavatShalom; - public final Date getMinchaKetana72Minutes; - public final Date getPlagHamincha60Minutes; - public final Date getPlagHamincha72Minutes; - public final Date getPlagHamincha90Minutes; - public final Date getPlagHamincha96Minutes; - public final Date getPlagHamincha96MinutesZmanis; - public final Date getPlagHamincha90MinutesZmanis; - public final Date getPlagHamincha72MinutesZmanis; - public final Date getPlagHamincha16Point1Degrees; - public final Date getPlagHamincha19Point8Degrees; - public final Date getPlagHamincha26Degrees; - public final Date getPlagHamincha18Degrees; - public final Date getPlagAlosToSunset; - public final Date getPlagAlos16Point1ToTzaisGeonim7Point083Degrees; - public final Date getPlagAhavatShalom; - public final Date getBainHashmashosRT13Point24Degrees; - public final Date getBainHashmashosRT58Point5Minutes; - public final Date getBainHashmashosRT13Point5MinutesBefore7Point083Degrees; - public final Date getBainHashmashosRT2Stars; - public final Date getBainHashmashosYereim18Minutes; - public final Date getBainHashmashosYereim3Point05Degrees; - public final Date getBainHashmashosYereim16Point875Minutes; - public final Date getBainHashmashosYereim2Point8Degrees; - public final Date getBainHashmashosYereim13Point5Minutes; - public final Date getBainHashmashosYereim2Point1Degrees; - public final Date getTzaisGeonim3Point7Degrees; - public final Date getTzaisGeonim3Point8Degrees; - public final Date getTzaisGeonim5Point95Degrees; - public final Date getTzaisGeonim4Point61Degrees; - public final Date getTzaisGeonim4Point37Degrees; - public final Date getTzaisGeonim5Point88Degrees; - public final Date getTzaisGeonim4Point8Degrees; - public final Date getTzaisGeonim6Point45Degrees; - public final Date getTzaisGeonim7Point083Degrees; - public final Date getTzaisGeonim7Point67Degrees; - public final Date getTzaisGeonim8Point5Degrees; - public final Date getTzaisGeonim9Point3Degrees; - public final Date getTzaisGeonim9Point75Degrees; - public final Date getTzais60; - public final Date getTzaisAteretTorah; - public final Date getSofZmanShmaAteretTorah; - public final Date getSofZmanTfilahAteretTorah; - public final Date getMinchaGedolaAteretTorah; - public final Date getMinchaKetanaAteretTorah; - public final Date getPlagHaminchaAteretTorah; - public final Date getTzais72Zmanis; - public final Date getTzais90Zmanis; - public final Date getTzais96Zmanis; - public final Date getTzais90; - public final Date getTzais120; - public final Date getTzais120Zmanis; - public final Date getTzais16Point1Degrees; - public final Date getTzais26Degrees; - public final Date getTzais18Degrees; - public final Date getTzais19Point8Degrees; - public final Date getTzais96; - public final Date getFixedLocalChatzos; - public final Date getSofZmanKidushLevanaBetweenMoldos; - public final Date getSofZmanKidushLevana15Days; - public final Date getTchilasZmanKidushLevana3Days; - public final Date getZmanMolad; - public final Date getTchilasZmanKidushLevana7Days; - public final Date getSofZmanAchilasChametzGRA; - public final Date getSofZmanAchilasChametzMGA72Minutes; - public final Date getSofZmanAchilasChametzMGA16Point1Degrees; - public final Date getSofZmanBiurChametzGRA; - public final Date getSofZmanBiurChametzMGA72Minutes; - public final Date getSofZmanBiurChametzMGA16Point1Degrees; - public final Date getSolarMidnight; + public final Instant getPlagHamincha120MinutesZmanis; + public final Instant getPlagHamincha120Minutes; + public final Instant getAlos60; + public final Instant getAlos72Zmanis; + public final Instant getAlos96; + public final Instant getAlos90Zmanis; + public final Instant getAlos96Zmanis; + public final Instant getAlos90; + public final Instant getAlos120; + public final Instant getAlos120Zmanis; + public final Instant getAlos26Degrees; + public final Instant getAlos18Degrees; + public final Instant getAlos19Degrees; + public final Instant getAlos19Point8Degrees; + public final Instant getAlos16Point1Degrees; + public final Instant getMisheyakir11Point5Degrees; + public final Instant getMisheyakir11Degrees; + public final Instant getMisheyakir10Point2Degrees; + public final Instant getMisheyakir7Point65Degrees; + public final Instant getMisheyakir9Point5Degrees; + public final Instant getSofZmanShmaMGA19Point8Degrees; + public final Instant getSofZmanShmaMGA16Point1Degrees; + public final Instant getSofZmanShmaMGA18Degrees; + public final Instant getSofZmanShmaMGA72Minutes; + public final Instant getSofZmanShmaMGA72MinutesZmanis; + public final Instant getSofZmanShmaMGA90Minutes; + public final Instant getSofZmanShmaMGA90MinutesZmanis; + public final Instant getSofZmanShmaMGA96Minutes; + public final Instant getSofZmanShmaMGA96MinutesZmanis; + public final Instant getSofZmanShma3HoursBeforeChatzos; + public final Instant getSofZmanShmaMGA120Minutes; + public final Instant getSofZmanShmaAlos16Point1ToSunset; + public final Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees; + public final Instant getSofZmanTfilaMGA19Point8Degrees; + public final Instant getSofZmanTfilaMGA16Point1Degrees; + public final Instant getSofZmanTfilaMGA18Degrees; + public final Instant getSofZmanTfilaMGA72Minutes; + public final Instant getSofZmanTfilaMGA72MinutesZmanis; + public final Instant getSofZmanTfilaMGA90Minutes; + public final Instant getSofZmanTfilaMGA90MinutesZmanis; + public final Instant getSofZmanTfilaMGA96Minutes; + public final Instant getSofZmanTfilaMGA96MinutesZmanis; + public final Instant getSofZmanTfilaMGA120Minutes; + public final Instant getSofZmanTfila2HoursBeforeChatzos; + public final Instant getMinchaGedola30Minutes; + public final Instant getMinchaGedola72Minutes; + public final Instant getMinchaGedola16Point1Degrees; + public final Instant getMinchaGedolaAhavatShalom; + public final Instant getMinchaGedolaGreaterThan30; + public final Instant getMinchaKetana16Point1Degrees; + public final Instant getMinchaKetanaAhavatShalom; + public final Instant getMinchaKetana72Minutes; + public final Instant getPlagHamincha60Minutes; + public final Instant getPlagHamincha72Minutes; + public final Instant getPlagHamincha90Minutes; + public final Instant getPlagHamincha96Minutes; + public final Instant getPlagHamincha96MinutesZmanis; + public final Instant getPlagHamincha90MinutesZmanis; + public final Instant getPlagHamincha72MinutesZmanis; + public final Instant getPlagHamincha16Point1Degrees; + public final Instant getPlagHamincha19Point8Degrees; + public final Instant getPlagHamincha26Degrees; + public final Instant getPlagHamincha18Degrees; + public final Instant getPlagAlosToSunset; + public final Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees; + public final Instant getPlagAhavatShalom; + public final Instant getBainHashmashosRT13Point24Degrees; + public final Instant getBainHashmashosRT58Point5Minutes; + public final Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees; + public final Instant getBainHashmashosRT2Stars; + public final Instant getBainHashmashosYereim18Minutes; + public final Instant getBainHashmashosYereim3Point05Degrees; + public final Instant getBainHashmashosYereim16Point875Minutes; + public final Instant getBainHashmashosYereim2Point8Degrees; + public final Instant getBainHashmashosYereim13Point5Minutes; + public final Instant getBainHashmashosYereim2Point1Degrees; + public final Instant getTzaisGeonim3Point7Degrees; + public final Instant getTzaisGeonim3Point8Degrees; + public final Instant getTzaisGeonim5Point95Degrees; + public final Instant getTzaisGeonim4Point61Degrees; + public final Instant getTzaisGeonim4Point37Degrees; + public final Instant getTzaisGeonim5Point88Degrees; + public final Instant getTzaisGeonim4Point8Degrees; + public final Instant getTzaisGeonim6Point45Degrees; + public final Instant getTzaisGeonim7Point083Degrees; + public final Instant getTzaisGeonim7Point67Degrees; + public final Instant getTzaisGeonim8Point5Degrees; + public final Instant getTzaisGeonim9Point3Degrees; + public final Instant getTzaisGeonim9Point75Degrees; + public final Instant getTzais60; + public final Instant getTzaisAteretTorah; + public final Instant getSofZmanShmaAteretTorah; + public final Instant getSofZmanTfilahAteretTorah; + public final Instant getMinchaGedolaAteretTorah; + public final Instant getMinchaKetanaAteretTorah; + public final Instant getPlagHaminchaAteretTorah; + public final Instant getTzais72Zmanis; + public final Instant getTzais90Zmanis; + public final Instant getTzais96Zmanis; + public final Instant getTzais90; + public final Instant getTzais120; + public final Instant getTzais120Zmanis; + public final Instant getTzais16Point1Degrees; + public final Instant getTzais26Degrees; + public final Instant getTzais18Degrees; + public final Instant getTzais19Point8Degrees; + public final Instant getTzais96; + public final Instant getFixedLocalChatzos; + public final Instant getSofZmanKidushLevanaBetweenMoldos; + public final Instant getSofZmanKidushLevana15Days; + public final Instant getTchilasZmanKidushLevana3Days; + public final Instant getZmanMolad; + public final Instant getTchilasZmanKidushLevana7Days; + public final Instant getSofZmanAchilasChametzGRA; + public final Instant getSofZmanAchilasChametzMGA72Minutes; + public final Instant getSofZmanAchilasChametzMGA16Point1Degrees; + public final Instant getSofZmanBiurChametzGRA; + public final Instant getSofZmanBiurChametzMGA72Minutes; + public final Instant getSofZmanBiurChametzMGA16Point1Degrees; + public final Instant getSolarMidnight; public final long getShaahZmanisBaalHatanya; - public final Date getAlosBaalHatanya; - public final Date getSofZmanShmaBaalHatanya; - public final Date getSofZmanTfilaBaalHatanya; - public final Date getSofZmanAchilasChametzBaalHatanya; - public final Date getSofZmanBiurChametzBaalHatanya; - public final Date getMinchaGedolaBaalHatanya; - public final Date getMinchaGedolaBaalHatanyaGreaterThan30; - public final Date getMinchaKetanaBaalHatanya; - public final Date getPlagHaminchaBaalHatanya; - public final Date getTzaisBaalHatanya; - public final Date getSofZmanShmaMGA18DegreesToFixedLocalChatzos; - public final Date getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos; - public final Date getSofZmanShmaMGA90MinutesToFixedLocalChatzos; - public final Date getSofZmanShmaMGA72MinutesToFixedLocalChatzos; - public final Date getSofZmanShmaGRASunriseToFixedLocalChatzos; - public final Date getSofZmanTfilaGRASunriseToFixedLocalChatzos; - public final Date getMinchaGedolaGRAFixedLocalChatzos30Minutes; - public final Date getMinchaKetanaGRAFixedLocalChatzosToSunset; - public final Date getPlagHaminchaGRAFixedLocalChatzosToSunset; - public final Date getTzais50; - public final Date getSamuchLeMinchaKetanaGRA; - public final Date getSamuchLeMinchaKetana16Point1Degrees; - public final Date getSamuchLeMinchaKetana72Minutes; + public final Instant getAlosBaalHatanya; + public final Instant getSofZmanShmaBaalHatanya; + public final Instant getSofZmanTfilaBaalHatanya; + public final Instant getSofZmanAchilasChametzBaalHatanya; + public final Instant getSofZmanBiurChametzBaalHatanya; + public final Instant getMinchaGedolaBaalHatanya; + public final Instant getMinchaGedolaBaalHatanyaGreaterThan30; + public final Instant getMinchaKetanaBaalHatanya; + public final Instant getPlagHaminchaBaalHatanya; + public final Instant getTzaisBaalHatanya; + public final Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos; + public final Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos; + public final Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos; + public final Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos; + public final Instant getSofZmanShmaGRASunriseToFixedLocalChatzos; + public final Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos; + public final Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes; + public final Instant getMinchaKetanaGRAFixedLocalChatzosToSunset; + public final Instant getPlagHaminchaGRAFixedLocalChatzosToSunset; + public final Instant getTzais50; + public final Instant getSamuchLeMinchaKetanaGRA; + public final Instant getSamuchLeMinchaKetana16Point1Degrees; + public final Instant getSamuchLeMinchaKetana72Minutes; } /*static class FullAstronomicalCalculator { - Date getSunrise - Date getSeaLevelSunrise - Date getBeginCivilTwilight - Date getBeginNauticalTwilight - Date getBeginAstronomicalTwilight - Date getSunset - Date getSeaLevelSunset - Date getEndCivilTwilight - Date getEndNauticalTwilight - Date getEndAstronomicalTwilight - Date getTimeOffset - Date getTimeOffset - Date getSunriseOffsetByDegrees - Date getSunsetOffsetByDegrees + Instant getSunrise + Instant getSeaLevelSunrise + Instant getBeginCivilTwilight + Instant getBeginNauticalTwilight + Instant getBeginAstronomicalTwilight + Instant getSunset + Instant getSeaLevelSunset + Instant getEndCivilTwilight + Instant getEndNauticalTwilight + Instant getEndAstronomicalTwilight + Instant getTimeOffset + Instant getTimeOffset + Instant getSunriseOffsetByDegrees + Instant getSunsetOffsetByDegrees double getUTCSunrise double getUTCSeaLevelSunrise double getUTCSunset double getUTCSeaLevelSunset long getTemporalHour long getTemporalHour - Date getSunTransit - Date getSunTransit - Date getDateFromTime + Instant getSunTransit + Instant getSunTransit + Instant getDateFromTime double getSunriseSolarDipFromOffset double getSunsetSolarDipFromOffset Calendar getAdjustedCalendar @@ -847,14 +849,14 @@ public String toString() { private final int dayOfOmer; private final boolean tishaBav; private final JewishDate molad; - private final Date moladAsDate; - private final Date tchilasZmanKidushLevana3Days; - private final Date tchilasZmanKidushLevana7Days; - private final Date sofZmanKidushLevanaBetweenMoldos; - private final Date sofZmanKidushLevana15Days; + private final Instant moladAsDate; + private final Instant tchilasZmanKidushLevana3Days; + private final Instant tchilasZmanKidushLevana7Days; + private final Instant sofZmanKidushLevanaBetweenMoldos; + private final Instant sofZmanKidushLevana15Days; private final int tekufasTishreiElapsedDays; - public FullCalendar(LocalDate current, JewishDate currentJewishDate, int yomTovIndex, Daf dafYomiBavli, Daf dafYomiYerushalmi, boolean isruChag, boolean birkasHachamah, JewishCalendar.Parsha parshah, JewishCalendar.Parsha upcomingParshah, JewishCalendar.Parsha specialShabbos, boolean yomTov, boolean yomTovAssurBemelacha, boolean assurBemelacha, boolean hasCandleLighting, boolean tomorrowShabbosOrYomTov, boolean erevYomTovSheni, boolean aseresYemeiTeshuva, boolean pesach, boolean cholHamoedPesach, boolean shavuos, boolean roshHashana, boolean yomKippur, boolean succos, boolean hoshanaRabba, boolean shminiAtzeres, boolean simchasTorah, boolean cholHamoedSuccos, boolean cholHamoed, boolean erevYomTov, boolean erevRoshChodesh, boolean yomKippurKatan, boolean beHaB, boolean taanis, boolean taanisBechoros, int dayOfChanukah, boolean chanukah, boolean purim, boolean roshChodesh, boolean macharChodesh, boolean shabbosMevorchim, int dayOfOmer, boolean tishaBav, JewishDate molad, Date moladAsDate, Date tchilasZmanKidushLevana3Days, Date tchilasZmanKidushLevana7Days, Date sofZmanKidushLevanaBetweenMoldos, Date sofZmanKidushLevana15Days, int tekufasTishreiElapsedDays) { + public FullCalendar(LocalDate current, JewishDate currentJewishDate, int yomTovIndex, Daf dafYomiBavli, Daf dafYomiYerushalmi, boolean isruChag, boolean birkasHachamah, JewishCalendar.Parsha parshah, JewishCalendar.Parsha upcomingParshah, JewishCalendar.Parsha specialShabbos, boolean yomTov, boolean yomTovAssurBemelacha, boolean assurBemelacha, boolean hasCandleLighting, boolean tomorrowShabbosOrYomTov, boolean erevYomTovSheni, boolean aseresYemeiTeshuva, boolean pesach, boolean cholHamoedPesach, boolean shavuos, boolean roshHashana, boolean yomKippur, boolean succos, boolean hoshanaRabba, boolean shminiAtzeres, boolean simchasTorah, boolean cholHamoedSuccos, boolean cholHamoed, boolean erevYomTov, boolean erevRoshChodesh, boolean yomKippurKatan, boolean beHaB, boolean taanis, boolean taanisBechoros, int dayOfChanukah, boolean chanukah, boolean purim, boolean roshChodesh, boolean macharChodesh, boolean shabbosMevorchim, int dayOfOmer, boolean tishaBav, JewishDate molad, Instant moladAsDate, Instant tchilasZmanKidushLevana3Days, Instant tchilasZmanKidushLevana7Days, Instant sofZmanKidushLevanaBetweenMoldos, Instant sofZmanKidushLevana15Days, int tekufasTishreiElapsedDays) { this.current = current; this.currentJewishDate = currentJewishDate; this.yomTovIndex = yomTovIndex; diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInGregorianMonth.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInGregorianMonth.java deleted file mode 100644 index 4dd5ac87..00000000 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInGregorianMonth.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2011. Jay R. Gindin - */ - -package com.kosherjava.zmanim.hebrewcalendar; - -import org.junit.*; - -import java.util.Calendar; - -/** - * Verify the calculation of the number of days in a month. Not too hard...just the rules about when February - * has 28 or 29 days... - */ -@SuppressWarnings({ "MagicNumber" }) -public class UT_DaysInGregorianMonth { - - - @Test - public void testDaysInMonth() { - - JewishDate hebrewDate = new JewishDate(); - - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2011); - cal.set(Calendar.MONTH, Calendar.JANUARY); - hebrewDate.setDate(cal); - - assertDaysInMonth(false, hebrewDate); - } - - - - @Test - public void testDaysInMonthLeapYear() { - - JewishDate hebrewDate = new JewishDate(); - - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2012); - cal.set(Calendar.MONTH, Calendar.JANUARY); - hebrewDate.setDate(cal); - - assertDaysInMonth(true, hebrewDate); - } - - - @Test - public void testDaysInMonth100Year() { - - JewishDate hebrewDate = new JewishDate(); - - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2100); - cal.set(Calendar.MONTH, Calendar.JANUARY); - hebrewDate.setDate(cal); - - assertDaysInMonth(false, hebrewDate); - } - - - @Test - public void testDaysInMonth400Year() { - - JewishDate hebrewDate = new JewishDate(); - - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2000); - cal.set(Calendar.MONTH, Calendar.JANUARY); - hebrewDate.setDate(cal); - - assertDaysInMonth(true, hebrewDate); - } - - - private void assertDaysInMonth( - boolean febIsLeap, - JewishDate hebrewDate - ) { - - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(1)); - Assert.assertEquals(febIsLeap ? 29 : 28, hebrewDate.getLastDayOfGregorianMonth(2)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(3)); - Assert.assertEquals(30, hebrewDate.getLastDayOfGregorianMonth(4)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(5)); - Assert.assertEquals(30, hebrewDate.getLastDayOfGregorianMonth(6)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(7)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(8)); - Assert.assertEquals(30, hebrewDate.getLastDayOfGregorianMonth(9)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(10)); - Assert.assertEquals(30, hebrewDate.getLastDayOfGregorianMonth(11)); - Assert.assertEquals(31, hebrewDate.getLastDayOfGregorianMonth(12)); - } - - -} // End of UT_DaysInGregorianMonth class diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java index 6feb7e38..1b53934a 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java @@ -6,7 +6,8 @@ import org.junit.*; -import java.util.Calendar; +import java.time.LocalDate; +import java.time.Month; /** * Checks that we can roll forward & backward the gregorian dates... @@ -17,125 +18,111 @@ public class UT_GregorianDateNavigation { @Test public void gregorianForwardMonthToMonth() { - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2011); - cal.set(Calendar.MONTH, Calendar.JANUARY); - cal.set(Calendar.DATE, 31); + LocalDate localDate = LocalDate.of(2011, Month.JANUARY,31); - JewishDate hebrewDate = new JewishDate(cal); + JewishDate hebrewDate = new JewishDate(localDate); Assert.assertEquals(5771, hebrewDate.getJewishYear()); Assert.assertEquals(11, hebrewDate.getJewishMonth()); Assert.assertEquals(26, hebrewDate.getJewishDayOfMonth()); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(1, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + hebrewDate.addDays(1); + Assert.assertEquals(2, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(11, hebrewDate.getJewishMonth()); Assert.assertEquals(27, hebrewDate.getJewishDayOfMonth()); - - cal.set(Calendar.MONTH, Calendar.FEBRUARY); - cal.set(Calendar.DATE, 28); - hebrewDate.setDate(cal); - Assert.assertEquals(1, hebrewDate.getGregorianMonth()); - Assert.assertEquals(28, hebrewDate.getGregorianDayOfMonth()); + + localDate = LocalDate.of(2011, Month.FEBRUARY,28); + hebrewDate = new JewishDate(localDate); + Assert.assertEquals(2, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(28, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(12, hebrewDate.getJewishMonth()); Assert.assertEquals(24, hebrewDate.getJewishDayOfMonth()); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(2, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + hebrewDate.addDays(1); + Assert.assertEquals(3, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(12, hebrewDate.getJewishMonth()); Assert.assertEquals(25, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.MARCH); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(3, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.MARCH,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(4, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(13, hebrewDate.getJewishMonth()); Assert.assertEquals(26, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.APRIL); - cal.set(Calendar.DATE, 30); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(4, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.APRIL,30); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(5, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(1, hebrewDate.getJewishMonth()); Assert.assertEquals(27, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.MAY); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(5, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.MAY,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(6, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(2, hebrewDate.getJewishMonth()); Assert.assertEquals(28, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.JUNE); - cal.set(Calendar.DATE, 30); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(6, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.JUNE,30); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(7, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(3, hebrewDate.getJewishMonth()); Assert.assertEquals(29, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.JULY); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(7, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.JULY,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(8, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5, hebrewDate.getJewishMonth()); Assert.assertEquals(1, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.AUGUST); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(8, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.AUGUST,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(9, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(6, hebrewDate.getJewishMonth()); Assert.assertEquals(2, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.SEPTEMBER); - cal.set(Calendar.DATE, 30); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(9, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.SEPTEMBER,30); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(10, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(7, hebrewDate.getJewishMonth()); Assert.assertEquals(3, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.OCTOBER); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(10, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.OCTOBER,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(11, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5772, hebrewDate.getJewishYear()); Assert.assertEquals(8, hebrewDate.getJewishMonth()); Assert.assertEquals(4, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.NOVEMBER); - cal.set(Calendar.DATE, 30); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(11, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.NOVEMBER,30); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(12, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(9, hebrewDate.getJewishMonth()); Assert.assertEquals(5, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.MONTH, Calendar.DECEMBER); - cal.set(Calendar.DATE, 31); - hebrewDate.setDate(cal); - hebrewDate.forward(Calendar.DATE, 1); - Assert.assertEquals(2012, hebrewDate.getGregorianYear()); - Assert.assertEquals(0, hebrewDate.getGregorianMonth()); - Assert.assertEquals(1, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2011, Month.DECEMBER,31); + hebrewDate = new JewishDate(localDate); + hebrewDate.addDays(1); + Assert.assertEquals(2012, hebrewDate.getLocalDate().getYear()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(10, hebrewDate.getJewishMonth()); Assert.assertEquals(6, hebrewDate.getJewishDayOfMonth()); } @@ -144,117 +131,101 @@ public void gregorianForwardMonthToMonth() { @Test public void gregorianBackwardMonthToMonth() { - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.YEAR, 2011); - cal.set(Calendar.MONTH, Calendar.JANUARY); - cal.set(Calendar.DATE, 1); - - JewishDate hebrewDate = new JewishDate(cal); - hebrewDate.back(); - Assert.assertEquals(2010, hebrewDate.getGregorianYear()); - Assert.assertEquals(11, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + LocalDate localDate = LocalDate.of(2011, Month.JANUARY, 1); + JewishDate hebrewDate = new JewishDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(2010, hebrewDate.getLocalDate().getYear()); + Assert.assertEquals(12, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(10, hebrewDate.getJewishMonth()); Assert.assertEquals(24, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.DECEMBER); - cal.set(Calendar.YEAR, 2010); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(10, hebrewDate.getGregorianMonth()); - Assert.assertEquals(30, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.DECEMBER, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(11, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(30, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(9, hebrewDate.getJewishMonth()); Assert.assertEquals(23, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.NOVEMBER); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(9, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.NOVEMBER, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(10, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(8, hebrewDate.getJewishMonth()); Assert.assertEquals(23, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.OCTOBER); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(8, hebrewDate.getGregorianMonth()); - Assert.assertEquals(30, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.OCTOBER, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(9, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(30, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(7, hebrewDate.getJewishMonth()); Assert.assertEquals(22, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.SEPTEMBER); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(7, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.SEPTEMBER, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(8, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5770, hebrewDate.getJewishYear()); Assert.assertEquals(6, hebrewDate.getJewishMonth()); Assert.assertEquals(21, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.AUGUST); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(6, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.AUGUST, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(7, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5, hebrewDate.getJewishMonth()); Assert.assertEquals(20, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.JULY); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(5, hebrewDate.getGregorianMonth()); - Assert.assertEquals(30, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.JULY, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(6, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(30, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(4, hebrewDate.getJewishMonth()); Assert.assertEquals(18, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.JUNE); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(4, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.JUNE, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(5, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(3, hebrewDate.getJewishMonth()); Assert.assertEquals(18, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.MAY); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(3, hebrewDate.getGregorianMonth()); - Assert.assertEquals(30, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.MAY, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(4, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(30, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(2, hebrewDate.getJewishMonth()); Assert.assertEquals(16, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.APRIL); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(2, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.APRIL, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(3, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(1, hebrewDate.getJewishMonth()); Assert.assertEquals(16, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.MARCH); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(1, hebrewDate.getGregorianMonth()); - Assert.assertEquals(28, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.MARCH, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(2, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(28, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(12, hebrewDate.getJewishMonth()); Assert.assertEquals(14, hebrewDate.getJewishDayOfMonth()); - cal.set(Calendar.DATE, 1); - cal.set(Calendar.MONTH, Calendar.FEBRUARY); - hebrewDate.setDate(cal); - hebrewDate.back(); - Assert.assertEquals(0, hebrewDate.getGregorianMonth()); - Assert.assertEquals(31, hebrewDate.getGregorianDayOfMonth()); + localDate = LocalDate.of(2010, Month.FEBRUARY, 1); + hebrewDate.setGregorianDate(localDate); + hebrewDate.minusDays(1); + Assert.assertEquals(1, hebrewDate.getLocalDate().getMonthValue()); + Assert.assertEquals(31, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(11, hebrewDate.getJewishMonth()); Assert.assertEquals(16, hebrewDate.getJewishDayOfMonth()); diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java index 2a0d6e66..eb177267 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java @@ -6,6 +6,7 @@ import org.junit.*; +import java.time.LocalDate; import java.util.Calendar; /** @@ -20,9 +21,10 @@ public void jewishForwardMonthToMonth() { JewishDate jewishDate = new JewishDate(); jewishDate.setJewishDate(5771, 1, 1); - Assert.assertEquals(5, jewishDate.getGregorianDayOfMonth()); - Assert.assertEquals(3, jewishDate.getGregorianMonth()); - Assert.assertEquals(2011, jewishDate.getGregorianYear()); + LocalDate localDate = jewishDate.getLocalDate(); + Assert.assertEquals(5, localDate.getDayOfMonth()); + Assert.assertEquals(3, localDate.getMonthValue()); + Assert.assertEquals(2011, localDate.getYear()); } @@ -33,9 +35,28 @@ public void computeRoshHashana5771() { JewishDate jewishDate = new JewishDate(); jewishDate.setJewishDate(5771, 7, 1); - Assert.assertEquals(9, jewishDate.getGregorianDayOfMonth()); - Assert.assertEquals(8, jewishDate.getGregorianMonth()); - Assert.assertEquals(2010, jewishDate.getGregorianYear()); + LocalDate localDate = jewishDate.getLocalDate(); + Assert.assertEquals(9, localDate.getDayOfMonth()); + Assert.assertEquals(8, localDate.getMonthValue()); + Assert.assertEquals(2010, localDate.getYear()); + } + + @Test + public void addYearsUsesConfiguredAdarMonthWhenMovingToLeapYear() { + + JewishDate adarAlephDate = new JewishDate(); + adarAlephDate.setJewishDate(5783, JewishDate.ADAR, 10); + adarAlephDate.addYears(1, true); + Assert.assertEquals(5784, adarAlephDate.getJewishYear()); + Assert.assertEquals(JewishDate.ADAR, adarAlephDate.getJewishMonth()); + Assert.assertEquals(10, adarAlephDate.getJewishDayOfMonth()); + + JewishDate adarBeisDate = new JewishDate(); + adarBeisDate.setJewishDate(5783, JewishDate.ADAR, 10); + adarBeisDate.addYears(1, false); + Assert.assertEquals(5784, adarBeisDate.getJewishYear()); + Assert.assertEquals(JewishDate.ADAR_II, adarBeisDate.getJewishMonth()); + Assert.assertEquals(10, adarBeisDate.getJewishDayOfMonth()); } From b4b0edfd98f50cc35dc40eca78307ed610752d50 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 01:14:11 -0400 Subject: [PATCH 023/121] Replace SimpleDateFormat with DateTimeFormatter in HebrewDateFormatter --- .../zmanim/hebrewcalendar/HebrewDateFormatter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 13497b3d..2c18bf1b 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -15,7 +15,7 @@ */ package com.kosherjava.zmanim.hebrewcalendar; -import java.text.SimpleDateFormat; +import java.time.format.DateTimeFormatter; import java.util.EnumMap; /** @@ -69,7 +69,7 @@ public class HebrewDateFormatter { /** * The internal DateFormat.  See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. */ - private SimpleDateFormat weekFormat = null; + private DateTimeFormatter weekFormat = null; /** * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method @@ -122,7 +122,7 @@ public class HebrewDateFormatter { * Default constructor sets the {@link EnumMap}s of Hebrew and default transliterated parshiyos. */ public HebrewDateFormatter() { - weekFormat = new SimpleDateFormat("EEEE"); + weekFormat = DateTimeFormatter.ofPattern("EEEE"); transliteratedParshaMap = new EnumMap<>(JewishCalendar.Parsha.class); transliteratedParshaMap.put(JewishCalendar.Parsha.NONE, ""); transliteratedParshaMap.put(JewishCalendar.Parsha.BERESHIS, "Bereshis"); @@ -294,9 +294,9 @@ public boolean isLongWeekFormat() { public void setLongWeekFormat(boolean longWeekFormat) { this.longWeekFormat = longWeekFormat; if (longWeekFormat) { - weekFormat = new SimpleDateFormat("EEEE"); + weekFormat = DateTimeFormatter.ofPattern("EEEE"); } else { - weekFormat = new SimpleDateFormat("EEE"); + weekFormat = DateTimeFormatter.ofPattern("EEE"); } } From 9e9131ed69e83eaf36054f836f920f49c23ffb05 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 01:35:11 -0400 Subject: [PATCH 024/121] getMinchaGedolaGreaterThan30() now takes in a minchaGedola param - This creates a generic the getMinchaGedolaGreaterThan30(Instant) from what had been a generically named one that returned mincha gedolaGRA and another one for the Baal Hatanya. This now works for any mincha gedola passed in. - Also removed two unused import statements. --- .../zmanim/ComprehensiveZmanimCalendar.java | 33 +++---------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index d22cba56..d11bbf49 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -15,8 +15,6 @@ */ package com.kosherjava.zmanim; -import java.time.LocalDate; -import java.util.Calendar; // FIXME remove once FORWARD can be refactored. import java.time.Instant; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; @@ -1921,12 +1919,12 @@ public Instant getMinchaGedolaAhavatShalom() { * @see #isUseAstronomicalChatzos() * */ - public Instant getMinchaGedolaGreaterThan30() { - if (getMinchaGedola30Minutes() == null || getMinchaGedola() == null) { + public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) { + if (getMinchaGedola30Minutes() == null || minchaGedola == null) { return null; } else { - return getMinchaGedola30Minutes().compareTo(getMinchaGedola()) > 0 ? getMinchaGedola30Minutes() - : getMinchaGedola(); + return getMinchaGedola30Minutes().compareTo(minchaGedola) > 0 ? getMinchaGedola30Minutes() + : minchaGedola; } } @@ -3966,29 +3964,6 @@ public Instant getMinchaGedolaBaalHatanya() { return getMinchaGedola(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } - /** - * 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 - * {@link #getMinchaGedolaBaalHatanya()} will be returned. - * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos minutes after either {@link - * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} - * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. - * @return the Instant of the later of {@link #getMinchaGedolaBaalHatanya()} and {@link #getMinchaGedola30Minutes()}. - * 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 {@link AstronomicalCalendar} documentation. - */ - public Instant getMinchaGedolaBaalHatanyaGreaterThan30() { - if (getMinchaGedola30Minutes() == null || getMinchaGedolaBaalHatanya() == null) { - return null; - } else { - return getMinchaGedola30Minutes().compareTo(getMinchaGedolaBaalHatanya()) > 0 ? getMinchaGedola30Minutes() - : getMinchaGedolaBaalHatanya(); - } - } - /** * This method returns the time of mincha ketana. This is the preferred earliest time to pray * mincha in the opinion of the Rambam and others. From bd4eb776805a9b6f8066a19dd20c9c072eb78f77 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 01:46:20 -0400 Subject: [PATCH 025/121] Update Javadocs for getMinchaGedolaGreaterThan30(Instant) --- .../zmanim/ComprehensiveZmanimCalendar.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index d11bbf49..c49f08f7 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -1903,13 +1903,15 @@ public Instant getMinchaGedolaAhavatShalom() { /** * 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()} - * will be returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah - * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha time - * may be affected by {@link #isUseAstronomicalChatzos()}. - * + * This is a convenience method that returns the later of the minchaGedola passed in 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 the minchaGedola passed in will be + * returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah + * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha + * time may be affected by {@link #isUseAstronomicalChatzos()}. + * + * @param minchaGedola + * the mincha gedola to be compared to {@link #getMinchaGedola30Minutes()}. * @return the Instant of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}. * 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 From b2f0a0f6541c475183271037adf468a025f79c5c Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 01:51:49 -0400 Subject: [PATCH 026/121] =?UTF-8?q?Update=20=C2=A9=20credits=20in=20Jewish?= =?UTF-8?q?Date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks @dickermoshe for the extensive set of changes --- .../java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 5a668f0f..67dc3340 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -2,6 +2,7 @@ * Zmanim Java API * Copyright (C) 2011 - 2026 Eliyahu Hershfeld * Copyright (C) September 2002 Avrom Finkelstien + * Copyright (C) 2026 Moshe Dicker * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -51,6 +52,7 @@ * @see java.util.Date * @see java.util.Calendar * @author © Avrom Finkelstien 2002 + * @author © Moshe Dicker 2026 * @author © Eliyahu Hershfeld 2011 - 2026 */ public class JewishDate implements Comparable, Cloneable { From 27a2fc8e8f625d810121d61b36c640da9ac39081 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 01:52:34 -0400 Subject: [PATCH 027/121] =?UTF-8?q?Update=20=C2=A9=20credits=20in=20Jewish?= =?UTF-8?q?Calendar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks @dickermoshe for the extensive set of changes --- .../com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index 9541b27e..86b9bb10 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -3,6 +3,7 @@ * Copyright (C) 2011 - 2026 Eliyahu Hershfeld * Copyright (C) September 2002 Avrom Finkelstien * Copyright (C) 2019 - 2022 Y Paritcher + * Copyright (C) 2026 Moshe Dicker * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -43,6 +44,7 @@ * @see java.util.Calendar * @author © Y. Paritcher 2019 - 2022 * @author © Avrom Finkelstien 2002 + * @author © Moshe Dicker 2026 * @author © Eliyahu Hershfeld 2011 - 2026 */ public class JewishCalendar extends JewishDate { From 6e18397f8732e89ac33c5ed0fe2dc29d365f8299 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 14:16:48 -0400 Subject: [PATCH 028/121] Minor Javadoc tweaks to AstronomicalCalculator --- .../kosherjava/zmanim/util/AstronomicalCalculator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index 68645b9e..6cb25406 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -186,8 +186,8 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the * horizon. Not corrected for altitude. * - * @param localDate - * time of calculation + * @param zonedDateTime + * the ZonedDateTime of the time of calculation * @param geoLocation * The location information * @return solar elevation in degrees. The horizon (calculated in a vacuum using the solar radius as the point) @@ -201,8 +201,8 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation * horizontal coordinate system at the given location at the given time. Not corrected for altitude. True south is 180 * degrees. * - * @param localDate - * time of calculation + * @param zonedDateTime + * The ZonedDateTime of the time of calculation. * @param geoLocation * The location information * @return the solar azimuth in degrees. Astronomical midday would be 180 in the norther hemosphere and 0 in the From 77bdea88d83078f117e566c99ded9b9541d04d9a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 14:22:12 -0400 Subject: [PATCH 029/121] Fix Javadoc issues in AstronomicalCalendar --- src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 30c98747..96d43774 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -768,7 +768,6 @@ private LocalDate getAdjustedLocalDate(){ /** * Used by Molad based zmanim to determine if zmanim occur during the current day. * This is also used as the anchor for current timezone-offset calculations. - * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) * @return midnight at the start of the current local date in the configured timezone */ protected ZonedDateTime getMidnightLastNight() { @@ -777,7 +776,6 @@ protected ZonedDateTime getMidnightLastNight() { /** * Used by Molad based zmanim to determine if zmanim occur during the current day. - * @see #getMoladBasedTime(Instant, Instant, Instant, boolean) * @return following midnight */ protected ZonedDateTime getMidnightTonight() { From 476bbc37cc3047e00f0d3d2de54adbc4a3332198 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 14:28:06 -0400 Subject: [PATCH 030/121] Minor Javadoc fixes for ComprehensiveZmanimCalendar --- .../kosherjava/zmanim/ComprehensiveZmanimCalendar.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index c49f08f7..1d0dab17 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -1793,7 +1793,7 @@ public Instant getSofZmanTfila2HoursBeforeChatzos() { * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See - * {@link #getMinchaGedolaGreaterThan30()} for a convenience method that returns the later of the 2 calculations. One + * {@link #getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}. * See Shulchan Aruch Orach Chayim 234:1 and * the Shaar Hatziyon seif katan ches. Since this calculation is a fixed 30 minutes of regular clock time after @@ -1806,7 +1806,7 @@ public Instant getSofZmanTfila2HoursBeforeChatzos() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * @see #getMinchaGedola() - * @see #getMinchaGedolaGreaterThan30() + * @see #getMinchaGedolaGreaterThan30(Instant) * @see #getChatzos() * @see #isUseAstronomicalChatzos() * @see #isUseAstronomicalChatzosForOtherZmanim() @@ -1877,8 +1877,8 @@ public Instant getMinchaGedola16Point1Degrees() { * 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()} - * (though that calculation is based on mincha gedola GRA). + * The later of this time or 30 clock minutes after chatzos is returned. See {@link + * #getMinchaGedolaGreaterThan30(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola. * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}. * Since calculation of this zman involves chatzos that is offset from the center of the astronomical day, * {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here. @@ -1890,7 +1890,7 @@ public Instant getMinchaGedola16Point1Degrees() { * @see #getAlos16Point1Degrees() * @see #getTzaisGeonim3Point7Degrees() * @see #getShaahZmanisAlos16Point1ToTzais3Point7() - * @see #getMinchaGedolaGreaterThan30() + * @see #getMinchaGedolaGreaterThan30(Instant) */ public Instant getMinchaGedolaAhavatShalom() { if (getChatzos() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) { From c1b9a6e8e3b80a661b37d07c81e739137974b691 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 14:31:52 -0400 Subject: [PATCH 031/121] Javadoc tweaks to ZmanimFormatter.java --- src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index 342886fc..f5e6ea02 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -274,8 +274,8 @@ public String format(Time time) { * * @param instant * the Instant to format - * @param zonedDateTime - * the {@link java.time.ZonedDateTime ZonedDateTime} used to help format based on the ZonedDateTime DST and other + * @param zoneId + * the {@link java.time.ZoneId ZoneId} used to help format based on the Instant's DST and other * settings. * @return the formatted String */ From aa693f6dbccc7da7e49a8f9b99bbbdd68f6cfcde Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 22 Mar 2026 18:46:01 -0400 Subject: [PATCH 032/121] Javadoc improvements for JewishDate.java There will be more to follow --- .../zmanim/hebrewcalendar/JewishDate.java | 81 ++++++++++++++----- 1 file changed, 62 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 67dc3340..855df10a 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -22,7 +22,7 @@ import java.time.ZonedDateTime; /** - * The JewishDate is the base calendar class, that supports maintenance of a {@link java.util.GregorianCalendar} + * The JewishDate is the base calendar class, that supports maintenance of a {@link LocalDate} * instance along with the corresponding Jewish date. This class can use the standard Java Date and Calendar * classes for setting and maintaining the dates, but it does not subclass these classes or use them internally * in any calculations. This class also does not have a concept of a time (which the Date class does). Please @@ -296,7 +296,7 @@ public int getMoladChalakim() { /** Returns the absolute date (days since January 1, 0001 of the Gregorian calendar). * @see #getAbsDate() - * @see #setJewishDateFromAbsDate() + * @see #setAbsDate(int) */ private int gregorianAbsDate; @@ -316,6 +316,7 @@ private static int getLastDayOfGregorianMonth(int month, int year) { /** * Computes the Gregorian date from the absolute date. ND+ER * @param absDate the absolute date + * @return the Localdate. */ private static LocalDate absDateToDate(int absDate) { int year = absDate / 366; // Search forward year by year from approximate year @@ -698,6 +699,7 @@ public int getDaysInJewishMonth() { /** * Computes and sets the Jewish date fields based on the provided absolute (Gregorian) date. + * @param gregorianAbsDate the Gregorian absolute date. */ private void setAbsDate(int gregorianAbsDate) { if (gregorianAbsDate <= 0) { @@ -861,43 +863,37 @@ public JewishDate() { } /** - * A constructor that initializes the date to the {@link java.util.Calendar Calendar} parameter. + * A constructor that initializes the date to the {@link ZonedDateTime} parameter. * * @param zonedDateTime * the ZonedDateTime to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ public JewishDate(ZonedDateTime zonedDateTime) { setGregorianDate(zonedDateTime); } /** - * A constructor that initializes the date to the {@link java.time.LocalDate LocalDate} parameter. + * A constructor that initializes the date to the {@link LocalDate} parameter. * * @param localDate * the LocalDate to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} */ public JewishDate(LocalDate localDate) { setGregorianDate(localDate); } /** - * Sets the date based on a {@link java.util.Calendar Calendar} object. Modifies the Jewish date as well. + * Sets the date based on a {@link ZonedDateTime} object. Modifies the Jewish date as well. * * @param zonedDateTime - * the ZonedDateTime to set the calendar to - * @throws IllegalArgumentException - * if the {@link Calendar#ERA} is {@link GregorianCalendar#BC} + * the {@link ZonedDateTime} to set the calendar to */ public void setGregorianDate(ZonedDateTime zonedDateTime) { setGregorianDate(zonedDateTime.toLocalDate()); } /** - * Sets the date based on a {@link java.time.LocalDate LocalDate} object. Modifies the Jewish date as well. + * Sets the date based on a {@link LocalDate} object. Modifies the Jewish date as well. * * @param localDate * the LocalDate to set the calendar to @@ -906,9 +902,7 @@ public void setGregorianDate(ZonedDateTime zonedDateTime) { */ public void setGregorianDate(LocalDate localDate) { int absDate = gregorianDateToAbsDate(localDate.getYear(), localDate.getMonth().getValue(), localDate.getDayOfMonth()); - - // convert to Jewish date - setAbsDate(absDate); + setAbsDate(absDate); // convert to Jewish date } /** @@ -974,16 +968,38 @@ public void setJewishDate(int year, int month, int dayOfMonth, int hours, int mi dayOfWeek = Math.abs(gregorianAbsDate % 7) + 1; // reset day of week } + /** + * Setter for the Jewish day of the month that will be clamped to the lesser of the number passed in or the max number of days in the month. + * @param dayOfMonth the day of the month to set the date to. + */ public void setJewishDayOfMonth(int dayOfMonth){ setJewishDate(getJewishYear(), getJewishMonth(), dayOfMonth); } + /** + * Setter for the Jewish month that is passed in. If the day of month is currently the 30th and the month is being set to + * a month that only has 29 days, the day of month will be clamped to the 29th of the month. + * @param month the month to be set + */ public void setJewishMonth(int month){ int year = getJewishYear(); int day = Math.min(getDaysInJewishMonth(month,year),getJewishDayOfMonth()); setJewishDate(year, month, day); } + /** + * Setter for the Jewish year of the passed in that will clamp the day to the month to the lesser of the current day and the max number of days in the month (if set + * to the 30th). + * + * Note that if you are using this for a yahrzeit (or any other reason)on the 30th of the month that will not always have + * 30 days, such as {@link #CHESHVAN} or {@link #KISLEV} or {@link #ADAR ADAR I} on a leap year and the next year is a + * non-leap year, you must clone your date or once it is set to the 29th, the next time you forward it to a year that has + * 30 days, the calendar will incorrectly be forwarded a year from the 29th to the 29th and not the 30th that you may expect. + * @param year teh year to set. + */ public void setJewishYear(int year){ int month = Math.min(getJewishMonth(),getLastMonthOfJewishYear(year)); int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,year)); @@ -992,9 +1008,9 @@ public void setJewishYear(int year){ /** - * Returns this object's date as a {@link java.time.LocalDate} object. + * Returns this object's date as a {@link LocalDate} object. * - * @return The {@link java.time.LocalDate} + * @return The {@link LocalDate} */ public LocalDate getLocalDate() { return absDateToDate(getAbsDate()); @@ -1008,6 +1024,10 @@ public void resetDate() { setGregorianDate(localDate); } + /** + * Subtracts the number of days passed in from the currently set date. + * @param days the number of days to subtract. + */ public void minusDays(int days){ if (days < 1) { throw new IllegalArgumentException("the amount of days to subtract has to be greater than zero."); @@ -1015,12 +1035,22 @@ public void minusDays(int days){ setAbsDate(getAbsDate() - days); } + + /** + * Add the number of days passed in to the currently set date. + * @param days the number of days to add. + */ public void addDays(int days){ if (days < 1) { throw new IllegalArgumentException("the amount of days to add has to be greater than zero."); } setAbsDate(getAbsDate() + days); } + + /** + * Add the number of months passed in to the currently set date. + * @param months the number of months to add. + */ public void addMonths(int months){ if (months < 1) { throw new IllegalArgumentException("the amount of months to add has to be greater than zero."); @@ -1041,9 +1071,22 @@ public void addMonths(int months){ int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,year)); setJewishDate(year, month, day); } + + /** + * Add the number of years passed in to the currently set date. If the current month is Adar on a non-leap year, + * passing true to the useAdarAlephForLeapYear parameter will set te month to Adar I, and passing + * false will forward it to Adar II. The useAdarAlephForLeapYear will be ignored if the current month + * is not Adar on a non-leap year. If the current year is a leap year and it is currently Adar I or Adar II and the + * year it is being increased to is also a leap year, the same Adar will be used. If it is being increased to a + * non-leap year, the month will be set to Adar. + * @param years the number of years to add + * @param useAdarAlephForLeapYear if set to true and the current month is Adar on a non-leap year and it is being moved + * forward to a leap year, it will be set to Adar I, and if set to false it will set to Adar II. This will be + * ignored if the month is not set to Adar on a non-leap year. + */ public void addYears(int years, boolean useAdarAlephForLeapYear){ if (years < 1) { - throw new IllegalArgumentException("the amount of years to add has to be greater than zero."); + throw new IllegalArgumentException("the amount of years to add has to be greater than zero. Use minusYears(int, boolean)"); } int targetYear = getJewishYear() + years; // If we are in the month of Adar in a non-leap year and we are skipping From 0d88687329b9a9690317b4d3a67a3d30242d2062 Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:07:46 -0400 Subject: [PATCH 033/121] Various bug fixes and improvements to the 3.0 migration. (#261) * Migrate AstronomicalCalendar to use LocalDate - Fix Timezone Bug - Use correct SUNRISE enum in getInstantFromTime * Fix Javadocs * Rename getSunrise to getSunriseWithElevation. Fix javadoc on `isUseElevation` * Rename getElevationAdjustedSunset/rise to avoid further confusion. * Fix incorrect adjustment for getFixedLocalChatzos * Update date * revert * implement jewishdate * some eq changes * nuller * fix formaterr, etc. * more changes * configure addYears * more date changes * Fix molad * Modifying a JewishDate no longer resets the molad date * add est jewish month * Remove get local mean time fix. * Fix RegressionTestFileWriter - Remove zmanim which are no longer in KJ - Pass correct args to `getMinchaGedolaGreaterThan30` * Fix Geolocation - Update docs on `getLocalMeanTimeOffset` to reflect changes made in earlier commits. We now return the actual offset instead the "Standard Offset" - `setLongitude` was not validating the correct variable. This has been fixes. - Remove unnecessary variable instantiation. - Remove timezone offset from toXML and toString. - Use the dedicated methods for Long.hashCode. - Remove unnecessary casting. * Add .class files to the.gitignore. * Remove unnecessary variable instantiation on HebrewDateFormatter. * Fixes for Zman class. - Use dedicated Long.compare instead of hand-rolled comparator. - Add null checking to toXML and to toString. * Fixed Time class - `getTime` will properly return a negative time. * Simplify TefilaRules - Automated code fixes by IntelliJ to simplify the return values. * Improvements to AstronomicalCalculator - Remove unnecessary variables. - Implement hashCode and equal method. * Remove unnecessary imports from YomiCalculator * Improvements to ZmanimFormatter Most of these improvements were automated by IntelliJ. - Mark final fields with the `final` keyword. - Removed unused commented code. - Format negative times properly. - Use the modern for loop. - Remove unnecessary casting. - Convert integer values to long before casting. - Break out duplicated if checks into variables. * Improvements to AstronomicalCalendar. - Fix the off-by-a-second bug. - Fix getLocalMeanTime to use a local time class instead of a double. - No longer use getInstantFromTime in getLocalMeanTime. - Implement strict equals on the `equal` function. - Equality and hashCode now properly take into account the various fields of the calendar. * Remove unnecessary variables from NOAACalculator * Improve AstronomicalCalculator - Use `Double.hashCode` instead of complex alternatives. * Improve ComprehensiveZmanimCalendar - Update `getFixedLocalChatzos` to use the correct arguments for getLocalMeanTime - Remove unnecessary variable instantiations. * Improve ZmanimCalendar - Remove unnecessary and variable instantiations. - Implement hashCode and equals properly. * Fix Zman class. - Use the correct variable names in duration comparator. - Set a time zone for the DateTimeFormatter in toXML. * Fix JewishDate tests. * Add various regression tests * Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .gitignore | 3 +- .../zmanim/AstronomicalCalendar.java | 40 ++-- .../zmanim/ComprehensiveZmanimCalendar.java | 29 ++- .../com/kosherjava/zmanim/ZmanimCalendar.java | 31 ++- .../hebrewcalendar/HebrewDateFormatter.java | 2 +- .../zmanim/hebrewcalendar/JewishDate.java | 6 +- .../zmanim/hebrewcalendar/TefilaRules.java | 97 ++++----- .../zmanim/hebrewcalendar/YomiCalculator.java | 2 - .../zmanim/util/AstronomicalCalculator.java | 31 ++- .../kosherjava/zmanim/util/GeoLocation.java | 52 ++--- .../zmanim/util/NOAACalculator.java | 6 +- .../java/com/kosherjava/zmanim/util/Time.java | 3 +- .../java/com/kosherjava/zmanim/util/Zman.java | 35 +-- .../zmanim/util/ZmanimFormatter.java | 202 +++++++++--------- .../AstronomicalCalendarRegressionTest.java | 46 ++++ .../CalendarEqualityRegressionTest.java | 57 +++++ .../RegressionTestFileWriter.java | 11 +- .../UT_JewishDateNavigation.java | 5 +- .../util/SerializationRegressionTest.java | 59 +++++ 19 files changed, 473 insertions(+), 244 deletions(-) create mode 100644 src/test/java/com/kosherjava/zmanim/AstronomicalCalendarRegressionTest.java create mode 100644 src/test/java/com/kosherjava/zmanim/CalendarEqualityRegressionTest.java create mode 100644 src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java diff --git a/.gitignore b/.gitignore index fdadea96..28c4c146 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ target/ zmanim.iml .gradle build -local.properties \ No newline at end of file +local.properties +*.class \ No newline at end of file diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 96d43774..93015c49 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -23,6 +23,7 @@ import java.time.LocalTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.util.Objects; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; @@ -643,7 +644,7 @@ protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { date = date.minusDays(1); } } - LocalDateTime dateTime = date.atStartOfDay().plusSeconds((long) (time*3600)); + LocalDateTime dateTime = date.atStartOfDay().plusNanos(Math.round(time * HOUR_MILLIS) * 1_000_000L); // The computed time is in UTC fractional hours; anchor in UTC before converting. return ZonedDateTime.of(dateTime, ZoneOffset.UTC).toInstant(); @@ -727,7 +728,7 @@ public double getSunsetSolarDipFromOffset(double minutes) { /** * A method that returns local mean time (LMT) time - * converted to regular clock time for the number of hours (0.0 to 23.999...) passed to this method. This time is + * converted to regular clock time for the local wall-clock time passed to this method. This time is * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm. * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is @@ -735,23 +736,15 @@ public double getSunsetSolarDipFromOffset(double minutes) { * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT. * - * @param hours - * the hour (such as 12.0 for noon and 0.0 for midnight) to calculate as LMT. Valid values are in the range of - * 0.0 to 23.999.... An IllegalArgumentException will be thrown if the value does not fit in the expected range. - * @return the Instant representing the local mean time (LMT) for the number of hours passed in. In Lakewood, - * NJ, passing 12 (noon) will return 11:56:50am. + * @param localTime + * the local wall-clock time (such as 12:00 for noon and 00:00 for midnight) to calculate as LMT. + * @return the Instant representing the local mean time (LMT) for the time passed in. In Lakewood, + * NJ, passing noon will return 11:56:50am. * @see GeoLocation#getLocalMeanTimeOffset(Instant) */ - public Instant getLocalMeanTime(double hours) { - if (hours < 0 || hours >= 24) { - throw new IllegalArgumentException("Hours must be between 0 and 23.9999..."); - } - - double rawOffset = getGeoLocation().getZoneId().getRules().getOffset(getMidnightLastNight().toInstant()).getTotalSeconds() * 1000; - double utcTime = hours - rawOffset / (double) HOUR_MILLIS; - Instant instant = getInstantFromTime(utcTime, SolarEvent.SUNRISE); - - return getTimeOffset(instant, -getGeoLocation().getLocalMeanTimeOffset(getMidnightLastNight().toInstant())); + public Instant getLocalMeanTime(LocalTime localTime) { + Instant civilTime = ZonedDateTime.of(getLocalDate(), localTime, getGeoLocation().getZoneId()).toInstant(); + return getTimeOffset(civilTime, -getGeoLocation().getLocalMeanTimeOffset(civilTime)); } /** @@ -813,12 +806,13 @@ public boolean equals(Object object) { if (this == object) { return true; } - if (!(object instanceof AstronomicalCalendar)) { + if (object == null || getClass() != object.getClass()) { return false; } AstronomicalCalendar aCal = (AstronomicalCalendar) object; - return getLocalDate().equals(aCal.getLocalDate()) && getGeoLocation().equals(aCal.getGeoLocation()) - && getAstronomicalCalculator().equals(aCal.getAstronomicalCalculator()); + return Objects.equals(getLocalDate(), aCal.getLocalDate()) + && Objects.equals(getGeoLocation(), aCal.getGeoLocation()) + && Objects.equals(getAstronomicalCalculator(), aCal.getAstronomicalCalculator()); } /** @@ -827,9 +821,9 @@ public boolean equals(Object object) { public int hashCode() { int result = 17; result = 37 * result + getClass().hashCode(); // needed or this and subclasses will return identical hash - result += 37 * result + getLocalDate().hashCode(); - result += 37 * result + getGeoLocation().hashCode(); - result += 37 * result + getAstronomicalCalculator().hashCode(); + result += 37 * result + Objects.hashCode(getLocalDate()); + result += 37 * result + Objects.hashCode(getGeoLocation()); + result += 37 * result + Objects.hashCode(getAstronomicalCalculator()); return result; } diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 1d0dab17..4fc34a0e 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -16,6 +16,7 @@ package com.kosherjava.zmanim; import java.time.Instant; +import java.time.LocalTime; import com.kosherjava.zmanim.util.AstronomicalCalculator; import com.kosherjava.zmanim.util.GeoLocation; import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; @@ -3221,10 +3222,10 @@ public Instant getTzais96() { * * @return the Instant representing the local chatzos * @see GeoLocation#getLocalMeanTimeOffset(Instant) - * @see AstronomicalCalendar#getLocalMeanTime(double) + * @see AstronomicalCalendar#getLocalMeanTime(LocalTime) */ public Instant getFixedLocalChatzos() { - return getLocalMeanTime(12.0); + return getLocalMeanTime(LocalTime.NOON); } /** @@ -4279,4 +4280,28 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() { public Instant getSamuchLeMinchaKetana72Minutes() { return getSamuchLeMinchaKetana(getAlos72(), getTzais72(), true); } + + /** + * @see java.lang.Object#equals(Object) + */ + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object == null || getClass() != object.getClass()) { + return false; + } + if (!super.equals(object)) { + return false; + } + ComprehensiveZmanimCalendar that = (ComprehensiveZmanimCalendar) object; + return ateretTorahSunsetOffset == that.ateretTorahSunsetOffset; + } + + /** + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + return 37 * super.hashCode() + Double.hashCode(ateretTorahSunsetOffset); + } } diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 2bb1f04a..c3a42f78 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -17,6 +17,7 @@ import java.time.Instant; import java.time.LocalDate; +import java.util.Objects; import com.kosherjava.zmanim.hebrewcalendar.JewishCalendar; import com.kosherjava.zmanim.util.AstronomicalCalculator; @@ -1147,7 +1148,7 @@ public Instant getShaahZmanisBasedZman(Instant startOfDay, Instant endOfDay, dou public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) { Instant seaLevelSunrise = getSeaLevelSunrise(); Instant seaLevelSunset = getSeaLevelSunset(); - Instant twilight = null; + Instant twilight; if (sunset) { twilight = getSunsetOffsetByDegrees(GEOMETRIC_ZENITH + degrees); } else { @@ -1231,4 +1232,32 @@ public long getHalfDayBasedShaahZmanis(Instant startOfHalfDay, Instant endOfHalf } return (endOfHalfDay.toEpochMilli() - startOfHalfDay.toEpochMilli()) / 6; } + + /** + * @see java.lang.Object#equals(Object) + */ + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object == null || getClass() != object.getClass()) { + return false; + } + if (!super.equals(object)) { + return false; + } + ZmanimCalendar that = (ZmanimCalendar) object; + return useElevation == that.useElevation + && useAstronomicalChatzos == that.useAstronomicalChatzos + && useAstronomicalChatzosForOtherZmanim == that.useAstronomicalChatzosForOtherZmanim + && candleLightingOffset == that.candleLightingOffset; + } + + /** + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + return Objects.hash(super.hashCode(), useElevation, useAstronomicalChatzos, + useAstronomicalChatzosForOtherZmanim, Double.hashCode(candleLightingOffset)); + } } diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 2c18bf1b..413f6cfb 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -69,7 +69,7 @@ public class HebrewDateFormatter { /** * The internal DateFormat.  See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. */ - private DateTimeFormatter weekFormat = null; + private DateTimeFormatter weekFormat; /** * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 855df10a..33798b73 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -316,7 +316,7 @@ private static int getLastDayOfGregorianMonth(int month, int year) { /** * Computes the Gregorian date from the absolute date. ND+ER * @param absDate the absolute date - * @return the Localdate. + * @return the LocalDate. */ private static LocalDate absDateToDate(int absDate) { int year = absDate / 366; // Search forward year by year from approximate year @@ -998,7 +998,7 @@ public void setJewishMonth(int month){ * 30 days, such as {@link #CHESHVAN} or {@link #KISLEV} or {@link #ADAR ADAR I} on a leap year and the next year is a * non-leap year, you must clone your date or once it is set to the 29th, the next time you forward it to a year that has * 30 days, the calendar will incorrectly be forwarded a year from the 29th to the 29th and not the 30th that you may expect. - * @param year teh year to set. + * @param year the year to set. */ public void setJewishYear(int year){ int month = Math.min(getJewishMonth(),getLastMonthOfJewishYear(year)); @@ -1074,7 +1074,7 @@ public void addMonths(int months){ /** * Add the number of years passed in to the currently set date. If the current month is Adar on a non-leap year, - * passing true to the useAdarAlephForLeapYear parameter will set te month to Adar I, and passing + * passing true to the useAdarAlephForLeapYear parameter will set the month to Adar I, and passing * false will forward it to Adar II. The useAdarAlephForLeapYear will be ignored if the current month * is not Adar on a non-leap year. If the current year is a leap year and it is currently Adar I or Adar II and the * year it is being increased to is also a leap year, the same Adar will be used. If it is being increased to a diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index 0683bb95..7cf88b55 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -177,34 +177,31 @@ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) { int day = jewishCalendar.getJewishDayOfMonth(); int month = jewishCalendar.getJewishMonth(); - if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY - || (! tachanunRecitedSundays && jewishCalendar.getDayOfWeek() == Calendar.SUNDAY) - || (! tachanunRecitedFridays && jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) - || month == JewishDate.NISSAN - || (month == JewishDate.TISHREI && ((! tachanunRecitedEndOfTishrei && day > 8) - || (tachanunRecitedEndOfTishrei && (day > 8 && day < 22)))) - || (month == JewishDate.SIVAN && (tachanunRecitedWeekAfterShavuos && day < 7 - || ! tachanunRecitedWeekAfterShavuos && day < (! jewishCalendar.getInIsrael() - && ! tachanunRecited13SivanOutOfIsrael ? 14: 13))) - || jewishCalendar.isErevYomTov() || (jewishCalendar.isYomTov() && (! jewishCalendar.isTaanis() //FIXME logic needs review for 15 shevat - || (! tachanunRecitedPesachSheni && holidayIndex == JewishCalendar.PESACH_SHENI))) - || (! jewishCalendar.getInIsrael() && ! tachanunRecitedPesachSheni && ! tachanunRecited15IyarOutOfIsrael - && jewishCalendar.getJewishMonth() == JewishDate.IYAR && day == 15) - || holidayIndex == JewishCalendar.TISHA_BEAV || jewishCalendar.isIsruChag() - || jewishCalendar.isRoshChodesh() - || (! tachanunRecitedShivasYemeiHamiluim && - ((! jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR) - || (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 22) - || (! tachanunRecitedWeekOfPurim && - ((! jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR) - || (jewishCalendar.isJewishLeapYear() && month == JewishDate.ADAR_II)) && day > 10 && day < 18) - || (jewishCalendar.isUseModernHolidays() - && (holidayIndex == JewishCalendar.YOM_HAATZMAUT || holidayIndex == JewishCalendar.YOM_YERUSHALAYIM)) - || (! tachanunRecitedWeekOfHod && month == JewishDate.IYAR && day > 13 && day < 21)) { - return false; - } - return true; - } + return jewishCalendar.getDayOfWeek() != Calendar.SATURDAY + && (tachanunRecitedSundays || jewishCalendar.getDayOfWeek() != Calendar.SUNDAY) + && (tachanunRecitedFridays || jewishCalendar.getDayOfWeek() != Calendar.FRIDAY) + && month != JewishDate.NISSAN + && (month != JewishDate.TISHREI || ((tachanunRecitedEndOfTishrei || day <= 8) + && (!tachanunRecitedEndOfTishrei || (day <= 8 || day >= 22)))) + && (month != JewishDate.SIVAN || ((!tachanunRecitedWeekAfterShavuos || day >= 7) + && (tachanunRecitedWeekAfterShavuos || day >= (!jewishCalendar.getInIsrael() + && !tachanunRecited13SivanOutOfIsrael ? 14 : 13)))) + && !jewishCalendar.isErevYomTov() && (!jewishCalendar.isYomTov() || (jewishCalendar.isTaanis() //FIXME logic needs review for 15 shevat + && (tachanunRecitedPesachSheni || holidayIndex != JewishCalendar.PESACH_SHENI))) + && (jewishCalendar.getInIsrael() || tachanunRecitedPesachSheni || tachanunRecited15IyarOutOfIsrael + || jewishCalendar.getJewishMonth() != JewishDate.IYAR || day != 15) + && holidayIndex != JewishCalendar.TISHA_BEAV && !jewishCalendar.isIsruChag() + && !jewishCalendar.isRoshChodesh() + && (tachanunRecitedShivasYemeiHamiluim || + ((jewishCalendar.isJewishLeapYear() || month != JewishDate.ADAR) + && (!jewishCalendar.isJewishLeapYear() || month != JewishDate.ADAR_II)) || day <= 22) + && (tachanunRecitedWeekOfPurim || + ((jewishCalendar.isJewishLeapYear() || month != JewishDate.ADAR) + && (!jewishCalendar.isJewishLeapYear() || month != JewishDate.ADAR_II)) || day <= 10 || day >= 18) + && (!jewishCalendar.isUseModernHolidays() + || (holidayIndex != JewishCalendar.YOM_HAATZMAUT && holidayIndex != JewishCalendar.YOM_YERUSHALAYIM)) + && (tachanunRecitedWeekOfHod || month != JewishDate.IYAR || day <= 13 || day >= 21); + } /** * Returns if tachanun is recited during mincha on the day in question. @@ -216,19 +213,16 @@ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) { public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) { JewishCalendar tomorrow = (JewishCalendar) jewishCalendar.clone(); tomorrow.addDays(1); - - if (! tachanunRecitedMinchaAllYear - || jewishCalendar.getDayOfWeek() == Calendar.FRIDAY - || ! isTachanunRecitedShacharis(jewishCalendar) - || (! isTachanunRecitedShacharis(tomorrow) && - !(tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA) && - !(tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR) && - !(tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI)) - || ! tachanunRecitedMinchaErevLagBaomer && tomorrow.getYomTovIndex() == JewishCalendar.LAG_BAOMER) { - return false; - } - return true; - } + + return tachanunRecitedMinchaAllYear + && jewishCalendar.getDayOfWeek() != Calendar.FRIDAY + && isTachanunRecitedShacharis(jewishCalendar) + && (isTachanunRecitedShacharis(tomorrow) || + tomorrow.getYomTovIndex() == JewishCalendar.EREV_ROSH_HASHANA || + tomorrow.getYomTovIndex() == JewishCalendar.EREV_YOM_KIPPUR || + tomorrow.getYomTovIndex() == JewishCalendar.PESACH_SHENI) + && (tachanunRecitedMinchaErevLagBaomer || tomorrow.getYomTovIndex() != JewishCalendar.LAG_BAOMER); + } /** * Returns if it is the Jewish day (starting the evening before) to start reciting Vesein Tal Umatar Livracha @@ -446,12 +440,8 @@ public boolean isHallelShalemRecited(JewishCalendar jewishCalendar) { int month = jewishCalendar.getJewishMonth(); boolean inIsrael = jewishCalendar.getInIsrael(); if (isHallelRecited(jewishCalendar)) { - if ((jewishCalendar.isRoshChodesh() && ! jewishCalendar.isChanukah()) - || (month == JewishDate.NISSAN && ((inIsrael && day > 15) || (! inIsrael && day > 16)))) { - return false; - } else { - return true; - } + return (!jewishCalendar.isRoshChodesh() || jewishCalendar.isChanukah()) + && (month != JewishDate.NISSAN || ((!inIsrael || day <= 15) && (inIsrael || day <= 16))); } return false; } @@ -503,14 +493,11 @@ public boolean isMizmorLesodaRecited(JewishCalendar jewishCalendar) { } int holidayIndex = jewishCalendar.getYomTovIndex(); - if (! isMizmorLesodaRecitedErevYomKippurAndPesach() - && (holidayIndex == JewishCalendar.EREV_YOM_KIPPUR - || holidayIndex == JewishCalendar.EREV_PESACH - || jewishCalendar.isCholHamoedPesach())) { - return false; - } - return true; - } + return isMizmorLesodaRecitedErevYomKippurAndPesach() + || (holidayIndex != JewishCalendar.EREV_YOM_KIPPUR + && holidayIndex != JewishCalendar.EREV_PESACH + && !jewishCalendar.isCholHamoedPesach()); + } /** * Is tachanun set to be recited during the week of Purim, from the 11th through the 17th of {@link diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java index cbf7e877..08c8c591 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java @@ -17,8 +17,6 @@ import java.time.LocalDate; import java.time.Month; -import java.util.Calendar; -import java.util.GregorianCalendar; /** * This class calculates the Daf Yomi Bavli page (daf) for a given date. To calculate Daf Yomi Yerushalmi diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index 6cb25406..9125e7cf 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -237,8 +237,7 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation * @return the adjusted zenith */ double getElevationAdjustment(double elevation) { - double elevationAdjustment = Math.toDegrees(Math.acos(earthRadius / (earthRadius + (elevation / 1000)))); - return elevationAdjustment; + return Math.toDegrees(Math.acos(earthRadius / (earthRadius + (elevation / 1000)))); } /** @@ -340,6 +339,34 @@ public void setSolarRadius(double solarRadius) { this.solarRadius = solarRadius; } + /** + * @see java.lang.Object#equals(Object) + */ + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object == null || getClass() != object.getClass()) { + return false; + } + AstronomicalCalculator calculator = (AstronomicalCalculator) object; + return Double.doubleToLongBits(getEarthRadius()) == Double.doubleToLongBits(calculator.getEarthRadius()) + && Double.doubleToLongBits(getRefraction()) == Double.doubleToLongBits(calculator.getRefraction()) + && Double.doubleToLongBits(getSolarRadius()) == Double.doubleToLongBits(calculator.getSolarRadius()); + } + + /** + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + int result = 17; + result = 37 * result + getClass().hashCode(); + result = 37 * result + Double.hashCode(getEarthRadius()); + result = 37 * result + Double.hashCode(getRefraction()); + result = 37 * result + Double.hashCode(getSolarRadius()); + return result; + } + /** * @see java.lang.Object#clone() * @since 1.1 diff --git a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java index 3b43c3b2..6d6ae4a4 100644 --- a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java +++ b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java @@ -160,7 +160,7 @@ public GeoLocation(String name, double latitude, double longitude, double elevat setLatitude(latitude); setLongitude(longitude); setElevation(elevation); - this.setZoneId(zoneId); + setZoneId(zoneId); } /** @@ -265,7 +265,7 @@ public void setLongitude(double longitude) { */ public void setLongitude(int degrees, int minutes, double seconds, String direction) { double longTemp = degrees + ((minutes + (seconds / 60.0)) / 60.0); - if (longTemp > 180 || this.longitude < 0 || Double.isNaN(longTemp)) { //FIXME An exception should be thrown if degrees, minutes or seconds are negative + if (longTemp > 180 || longitude < 0 || Double.isNaN(longTemp)) { //FIXME An exception should be thrown if degrees, minutes or seconds are negative throw new IllegalArgumentException("Longitude must be between 0 and 180. Use a direction of W instead of negative."); } if (direction.equals("W")) { @@ -324,21 +324,21 @@ public void setZoneId(ZoneId zoneId) { } /** - * A method that will return the location's local mean time offset in milliseconds from local standard time. The globe is split into 360°, with + * A method that will return the location's local mean time offset in milliseconds from the local clock time defined + * by the time zone offset in effect for the supplied Instant. The globe is split into 360°, with * 15° per hour of the day. For a local that is at a longitude that is evenly divisible by 15 (longitude % 15 == * 0), at solar {@link com.kosherjava.zmanim.AstronomicalCalendar#getSunTransit() noon} (with adjustment for the equation of time) the sun should be directly overhead, - * so a user who is 1° west of this will have noon at 4 minutes after standard time noon, and conversely, a user - * who is 1° east of the 15° longitude will have noon at 11:56 AM. Lakewood, N.J., whose longitude is - * -74.222, is 0.778 away from the closest multiple of 15 at -75°. This is multiplied by 4 to yield 3 minutes - * and 10 seconds earlier than standard time. The offset returned does not account for the Daylight saving time offset since this class is - * unaware of dates. + * so a user who is 1° west of this will have noon at 4 minutes after local clock noon, and conversely, a user + * who is 1° east of the 15° longitude will have noon at 11:56 AM local clock time. Lakewood, N.J., whose + * longitude is -74.222, is 0.778 away from the closest multiple of 15 at -75°. This is multiplied by 4 to + * yield 3 minutes and 10 seconds earlier than the local clock time derived from the zone offset in effect for the + * supplied instant, including any applicable Daylight saving time adjustment. * @param instant * the Instant used to claculate the local mean offset for the date in question. - * @return the offset in milliseconds not accounting for Daylight saving time. A positive value will be returned - * East of the 15° timezone line, and a negative value West of it. + * @return the offset in milliseconds relative to the time zone offset in effect at the supplied instant. A + * positive value will be returned East of the 15° timezone line, and a negative value West of it. */ public long getLocalMeanTimeOffset(Instant instant) { ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(instant, zoneId); @@ -447,14 +447,14 @@ private GeoLocation vincentyDirectFormulaDestination(double initialBearing, doub double eq_p1_ang_dist = Math.atan2(tanU1, cosAzimuth1); // eq_p1_ang_dist = angular distance on the sphere from the equator to P1 double sinAzimuth = cosU1 * sinAzimuth1; //azimuth of the geodesic at the equator double cosSqAzimuth = 1 - sinAzimuth*sinAzimuth; - double uSq = cosSqAzimuth * (Math.pow(major_semi_axis, 2) - Math.pow(minor_semi_axis, 2) / Math.pow(minor_semi_axis, 2)); + double uSq = cosSqAzimuth * (Math.pow(major_semi_axis, 2) - 1.0); double a = 1 + uSq/16384*(4096 + uSq *(-768 + uSq *(320 - 175 * uSq))); double b = uSq / 1024 * (256 + uSq *(-128 + uSq * (74-47 * uSq))); double p1_p2_ang_dist = distance / (minor_semi_axis * a); //p1_p2_ang_dist = angular distance P1 P2 on the sphere - double sinSigma = Double.NaN; - double cosSigma = Double.NaN; - double cos2_eq_mid_ang_distance = Double.NaN; // # eq_mid_ang_distance = angular distance on the sphere from the equator to the midpoint of the line - double a_prime = Double.NaN; + double sinSigma ; + double cosSigma ; + double cos2_eq_mid_ang_distance; // # eq_mid_ang_distance = angular distance on the sphere from the equator to the midpoint of the line + double a_prime; int iterations = 0; do { @@ -511,7 +511,7 @@ private double vincentyInverseFormula(GeoLocation location, int formula) { double sinSigma = 0; double cosSigma = 0; double sigma = 0; - double sinAlpha = 0; + double sinAlpha; double cosSqAlpha = 0; double cos2SigmaM = 0; double C; @@ -620,8 +620,6 @@ public double getRhumbLineDistance(GeoLocation location) { * <Elevation>0 Meters</Elevation> * <TimezoneName>America/New_York</TimezoneName> * <TimeZoneDisplayName>Eastern Standard Time</TimeZoneDisplayName> - * <TimezoneGMTOffset>-5</TimezoneGMTOffset> - * <TimezoneDSTOffset>1</TimezoneDSTOffset> * </GeoLocation> * * @@ -635,9 +633,6 @@ public String toXML() { "\t" + getElevation() + " Meters" + "\n" + "\t" + getZoneId().getId() + "\n" + "\t" + getZoneId().getDisplayName(TextStyle.FULL, Locale.ENGLISH) + "\n" + - /*"\n" + - "\t" + getTimeZone().getDSTSavings() / HOUR_MILLIS + - "\n" +*/ // FIXME ""; } @@ -666,9 +661,9 @@ public int hashCode() { long latLong = Double.doubleToLongBits(this.latitude); long lonLong = Double.doubleToLongBits(this.longitude); long elevLong = Double.doubleToLongBits(this.elevation); - int latInt = (int) (latLong ^ (latLong >>> 32)); - int lonInt = (int) (lonLong ^ (lonLong >>> 32)); - int elevInt = (int) (elevLong ^ (elevLong >>> 32)); + int latInt = Long.hashCode(latLong); + int lonInt = Long.hashCode(lonLong); + int elevInt = Long.hashCode(elevLong); result = 37 * result + getClass().hashCode(); result += 37 * result + latInt; result += 37 * result + lonInt; @@ -687,8 +682,7 @@ public String toString() { "\nLongitude:\t\t\t" + getLongitude() + "\u00B0" + "\nElevation:\t\t\t" + getElevation() + " Meters" + "\nTimezone ID:\t\t\t" + getZoneId().getId() + - "\nTimezone Display Name:\t\t" + getZoneId().getDisplayName(TextStyle.FULL, Locale.ENGLISH);// + - //"\nTimezone DST Offset:\t\t" + getZoneId().getDSTSavings() / HOUR_MILLIS; // FIXME + "\nTimezone Display Name:\t\t" + getZoneId().getDisplayName(TextStyle.FULL, Locale.ENGLISH); } /** @@ -707,7 +701,7 @@ public Object clone() { //Required by the compiler. Should never be reached since we implement clone() } if (clone != null) { - clone.zoneId = (ZoneId) getZoneId(); + clone.zoneId = getZoneId(); clone.locationName = getLocationName(); } return clone; diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index fe445bf7..7de0d6db 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -209,8 +209,7 @@ private static double getSunTrueLongitude(double julianCenturies) { private static double getSunApparentLongitude(double julianCenturies) { double sunTrueLongitude = getSunTrueLongitude(julianCenturies); double omega = 125.04 - 1934.136 * julianCenturies; - double lambda = sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(Math.toRadians(omega)); - return lambda; + return sunTrueLongitude - 0.00569 - 0.00478 * Math.sin(Math.toRadians(omega)); } /** @@ -255,8 +254,7 @@ private static double getSunDeclination(double julianCenturies) { double obliquityCorrection = getObliquityCorrection(julianCenturies); double lambda = getSunApparentLongitude(julianCenturies); double sint = Math.sin(Math.toRadians(obliquityCorrection)) * Math.sin(Math.toRadians(lambda)); - double theta = Math.toDegrees(Math.asin(sint)); - return theta; + return Math.toDegrees(Math.asin(sint)); } /** diff --git a/src/main/java/com/kosherjava/zmanim/util/Time.java b/src/main/java/com/kosherjava/zmanim/util/Time.java index a79acb95..9b45ad0d 100644 --- a/src/main/java/com/kosherjava/zmanim/util/Time.java +++ b/src/main/java/com/kosherjava/zmanim/util/Time.java @@ -201,8 +201,9 @@ public void setMilliseconds(int milliseconds) { * @return the time in milliseconds */ public double getTime() { - return this.hours * HOUR_MILLIS + this.minutes * MINUTE_MILLIS + this.seconds * SECOND_MILLIS + double time = this.hours * HOUR_MILLIS + this.minutes * MINUTE_MILLIS + this.seconds * SECOND_MILLIS + this.milliseconds; + return isNegative() ? -time : time; } /** diff --git a/src/main/java/com/kosherjava/zmanim/util/Zman.java b/src/main/java/com/kosherjava/zmanim/util/Zman.java index 8e486f78..cd94e654 100644 --- a/src/main/java/com/kosherjava/zmanim/util/Zman.java +++ b/src/main/java/com/kosherjava/zmanim/util/Zman.java @@ -16,6 +16,7 @@ package com.kosherjava.zmanim.util; import java.time.Instant; +import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Comparator; @@ -229,11 +230,11 @@ public void setDescription(String description) { */ public static final Comparator DATE_ORDER = new Comparator() { public int compare(Zman zman1, Zman zman2) { - long firstTime = (zman1 == null || zman1.getZman() == null) ? Long.MAX_VALUE : zman1.getZman().toEpochMilli(); - long secondTime = (zman2 == null || zman2.getZman() == null) ? Long.MAX_VALUE : zman2.getZman().toEpochMilli(); - return Long.valueOf(firstTime).compareTo(Long.valueOf(secondTime)); + long firstTime = (zman1 == null || zman1.getZman() == null) ? Long.MAX_VALUE : zman1.getZman().toEpochMilli(); + long secondTime = (zman2 == null || zman2.getZman() == null) ? Long.MAX_VALUE : zman2.getZman().toEpochMilli(); + return Long.compare(firstTime, secondTime); } - }; + }; /** * A {@link Comparator} that will compare and sort zmanim by zmanim label order. Compares its two arguments by the zmanim label @@ -244,11 +245,11 @@ public int compare(Zman zman1, Zman zman2) { */ public static final Comparator NAME_ORDER = new Comparator() { public int compare(Zman zman1, Zman zman2) { - String firstLabel = (zman1 == null || zman1.getLabel() == null) ? "" : zman1.getLabel(); - String secondLabel = (zman2 == null || zman2.getLabel() == null) ? "" : zman2.getLabel(); - return firstLabel.compareTo(secondLabel); + String firstLabel = (zman1 == null || zman1.getLabel() == null) ? "" : zman1.getLabel(); + String secondLabel = (zman2 == null || zman2.getLabel() == null) ? "" : zman2.getLabel(); + return firstLabel.compareTo(secondLabel); } - }; + }; /** * A {@link Comparator} that will compare and sort duration based zmanim such as @@ -262,9 +263,9 @@ public int compare(Zman zman1, Zman zman2) { public int compare(Zman zman1, Zman zman2) { long firstDuration = zman1 == null ? Long.MAX_VALUE : zman1.getDuration(); long secondDuration = zman2 == null ? Long.MAX_VALUE : zman2.getDuration(); - return firstDuration == secondDuration ? 0 : firstDuration > secondDuration ? 1 : -1; + return Long.compare(firstDuration, secondDuration); } - }; + }; /** * A method that returns an XML formatted String representing the serialized Object. Very @@ -288,12 +289,15 @@ public int compare(Zman zman1, Zman zman2) { * @return The XML formatted String. */ public String toXML() { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS"); + ZoneId zoneId = getGeoLocation() == null ? ZoneId.of("UTC") : getGeoLocation().getZoneId(); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS").withZone(zoneId); StringBuilder sb = new StringBuilder(); sb.append("\n"); sb.append("\t\n"); sb.append("\t").append(getZman() == null ? "": formatter.format(getZman())).append("\n"); - sb.append("\t" + getGeoLocation().toXML().replaceAll("\n", "\n\t")); + if (getGeoLocation() != null) { + sb.append("\t").append(getGeoLocation().toXML().replaceAll("\n", "\n\t")); + } sb.append("\n\t").append(getDuration()).append("\n"); sb.append("\t").append(getDescription()).append("\n"); sb.append(""); @@ -307,7 +311,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("\nLabel:\t").append(this.getLabel()); sb.append("\nZman:\t").append(getZman()); - sb.append("\nGeoLocation:\t").append(getGeoLocation().toString().replaceAll("\n", "\n\t")); + sb.append("\nGeoLocation:\t"); + if (getGeoLocation() == null) { + sb.append("null"); + } else { + sb.append(getGeoLocation().toString().replaceAll("\n", "\n\t")); + } sb.append("\nDuration:\t").append(getDuration()); sb.append("\nDescription:\t").append(getDescription()); return sb.toString(); diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index f5e6ea02..4c0e16a1 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -20,7 +20,6 @@ import java.time.LocalDate; import java.time.LocalTime; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Locale; import java.time.Instant; @@ -59,17 +58,17 @@ public class ZmanimFormatter { /** * the formatter for minutes as seconds. */ - private static DecimalFormat minuteSecondNF = new DecimalFormat("00"); + private final static DecimalFormat minuteSecondNF = new DecimalFormat("00"); /** * the formatter for hours. */ - private DecimalFormat hourNF; + private final DecimalFormat hourNF; /** * the formatter for minutes as milliseconds. */ - private static DecimalFormat milliNF = new DecimalFormat("000"); + private final static DecimalFormat milliNF = new DecimalFormat("000"); /** * The SimpleDateFormat class. @@ -188,8 +187,6 @@ public void setTimeFormat(int format) { case SEXAGESIMAL_MILLIS_FORMAT: setSettings(false, true, true); break; - // case DECIMAL_FORMAT: - // default: } } @@ -255,6 +252,9 @@ public String format(Time time) { return formatXSDDurationTime(time); } StringBuilder sb = new StringBuilder(); + if (time.isNegative()) { + sb.append("-"); + } sb.append(this.hourNF.format(time.getHours())); sb.append(":"); sb.append(minuteSecondNF.format(time.getMinutes())); @@ -386,17 +386,20 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); StringBuilder sb = new StringBuilder("<"); - if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar")) { + boolean isAstronomicalCalendar = astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar"); + boolean isComprehensiveZmanimCalendar = astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ComprehensiveZmanimCalendar"); + boolean isZmanimCalendar = astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ZmanimCalendar"); + if (isAstronomicalCalendar) { sb.append("AstronomicalTimes"); // TODO: use proper schema ref, and maybe build a real schema. // output += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; // output += xsi:schemaLocation="http://www.kosherjava.com/zmanim astronomical.xsd" - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ComprehensiveZmanimCalendar")) { + } else if (isComprehensiveZmanimCalendar) { sb.append("Zmanim"); // TODO: use proper schema ref, and maybe build a real schema. // output += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; // output += xsi:schemaLocation="http://www.kosherjava.com/zmanim zmanim.xsd" - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ZmanimCalendar")) { + } else if (isZmanimCalendar) { sb.append("BasicZmanim"); // TODO: use proper schema ref, and maybe build a real schema. // output += "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "; @@ -420,51 +423,52 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { sb.append(">\n"); Method[] theMethods = astronomicalCalendar.getClass().getMethods(); - String tagName = ""; - Object value = null; - List dateList = new ArrayList(); - List durationList = new ArrayList(); - List otherList = new ArrayList(); - for (int i = 0; i < theMethods.length; i++) { - if (includeMethod(theMethods[i])) { - tagName = theMethods[i].getName().substring(3); - // String returnType = theMethods[i].getReturnType().getName(); - try { - value = theMethods[i].invoke(astronomicalCalendar, (Object[]) null); - if (value == null) {// TODO: Consider using reflection to determine the return type, not the value - otherList.add("<" + tagName + ">N/A"); - // TODO: instead of N/A, consider return proper xs:nil. - // otherList.add("<" + tagName + " xs:nil=\"true\" />"); - } else if (value instanceof Instant) { - dateList.add(new Zman((Instant) value, tagName)); - } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis - if (((Long) value).longValue() == Long.MIN_VALUE) { - otherList.add("<" + tagName + ">N/A"); - // TODO: instead of N/A, consider return proper xs:nil. - // otherList.add("<" + tagName + " xs:nil=\"true\" />"); - } else { - durationList.add(new Zman((int) ((Long) value).longValue(), tagName)); - } - } else { // will probably never enter this block, but is present to be future-proof - otherList.add("<" + tagName + ">" + value + ""); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } + String tagName; + Object value; + List dateList = new ArrayList<>(); + List durationList = new ArrayList<>(); + List otherList = new ArrayList<>(); + for (Method theMethod : theMethods) { + if (includeMethod(theMethod)) { + tagName = theMethod.getName().substring(3); + // String returnType = theMethods[i].getReturnType().getName(); + try { + value = theMethod.invoke(astronomicalCalendar, (Object[]) null); + if (value == null) {// TODO: Consider using reflection to determine the return type, not the value + otherList.add("<" + tagName + ">N/A"); + // TODO: instead of N/A, consider return proper xs:nil. + // otherList.add("<" + tagName + " xs:nil=\"true\" />"); + } else if (value instanceof Instant) { + dateList.add(new Zman((Instant) value, tagName)); + } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis + value = ((Number) value).longValue(); + if ((Long) value == Long.MIN_VALUE) { + otherList.add("<" + tagName + ">N/A"); + // TODO: instead of N/A, consider return proper xs:nil. + // otherList.add("<" + tagName + " xs:nil=\"true\" />"); + } else { + durationList.add(new Zman((int) ((Long) value).longValue(), tagName)); + } + } else { // will probably never enter this block, but is present to be future-proof + otherList.add("<" + tagName + ">" + value + ""); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } Zman zman; - Collections.sort(dateList, Zman.DATE_ORDER); + dateList.sort(Zman.DATE_ORDER); for (int i = 0; i < dateList.size(); i++) { - zman = (Zman) dateList.get(i); + zman = dateList.get(i); sb.append("\t<").append(zman.getLabel()).append(">"); sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); sb.append("\n"); } - Collections.sort(durationList, Zman.DURATION_ORDER); + durationList.sort(Zman.DURATION_ORDER); for (int i = 0; i < durationList.size(); i++) { - zman = (Zman) durationList.get(i); + zman = durationList.get(i); sb.append("\t<" + zman.getLabel()).append(">"); sb.append(formatter.format((int) zman.getDuration())).append("\n"); @@ -474,11 +478,11 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { sb.append("\t").append(otherList.get(i)).append("\n"); } - if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar")) { + if (isAstronomicalCalendar) { sb.append(""); - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ComprehensiveZmanimCalendar")) { + } else if (isComprehensiveZmanimCalendar) { sb.append(""); - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ZmanimCalendar")) { + } else if (isZmanimCalendar) { sb.append(""); } return sb.toString(); @@ -561,58 +565,63 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; - sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); + sb.append("\t\"timeZoneOffset\":\"").append(offsetHours).append("\""); sb.append("},\n\""); - - if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar")) { - sb.append("AstronomicalTimes"); - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ComprehensiveZmanimCalendar")) { - sb.append("Zmanim"); - } else if (astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.ZmanimCalendar")) { - sb.append("BasicZmanim"); - } + + switch (astronomicalCalendar.getClass().getName()) { + case "com.kosherjava.zmanim.AstronomicalCalendar": + sb.append("AstronomicalTimes"); + break; + case "com.kosherjava.zmanim.ComprehensiveZmanimCalendar": + sb.append("Zmanim"); + break; + case "com.kosherjava.zmanim.ZmanimCalendar": + sb.append("BasicZmanim"); + break; + } sb.append("\":{\n"); Method[] theMethods = astronomicalCalendar.getClass().getMethods(); - String tagName = ""; - Object value = null; - List dateList = new ArrayList(); - List durationList = new ArrayList(); - List otherList = new ArrayList(); - for (int i = 0; i < theMethods.length; i++) { - if (includeMethod(theMethods[i])) { - tagName = theMethods[i].getName().substring(3); - // String returnType = theMethods[i].getReturnType().getName(); - try { - value = theMethods[i].invoke(astronomicalCalendar, (Object[]) null); - if (value == null) {// TODO: Consider using reflection to determine the return type, not the value - otherList.add("\"" + tagName + "\":\"N/A\","); - } else if (value instanceof Instant) { - dateList.add(new Zman((Instant) value, tagName)); - } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis - if (((Long) value).longValue() == Long.MIN_VALUE) { - otherList.add("\"" + tagName + "\":\"N/A\""); - } else { - durationList.add(new Zman((int) ((Long) value).longValue(), tagName)); - } - } else { // will probably never enter this block, but is present to be future-proof - otherList.add("\"" + tagName + "\":\"" + value + "\","); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } + String tagName; + Object value; + List dateList = new ArrayList<>(); + List durationList = new ArrayList<>(); + List otherList = new ArrayList<>(); + for (Method theMethod : theMethods) { + if (includeMethod(theMethod)) { + tagName = theMethod.getName().substring(3); + // String returnType = theMethods[i].getReturnType().getName(); + try { + value = theMethod.invoke(astronomicalCalendar, (Object[]) null); + if (value == null) {// TODO: Consider using reflection to determine the return type, not the value + otherList.add("\"" + tagName + "\":\"N/A\","); + } else if (value instanceof Instant) { + dateList.add(new Zman((Instant) value, tagName)); + } else if (value instanceof Long || value instanceof Integer) {// shaah zmanis + value = ((Number) value).longValue(); + if ((Long) value == Long.MIN_VALUE) { + otherList.add("\"" + tagName + "\":\"N/A\""); + } else { + durationList.add(new Zman((int) ((Long) value).longValue(), tagName)); + } + } else { // will probably never enter this block, but is present to be future-proof + otherList.add("\"" + tagName + "\":\"" + value + "\","); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } Zman zman; - Collections.sort(dateList, Zman.DATE_ORDER); + dateList.sort(Zman.DATE_ORDER); for (int i = 0; i < dateList.size(); i++) { - zman = (Zman) dateList.get(i); + zman = dateList.get(i); sb.append("\t\"").append(zman.getLabel()).append("\":\""); sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); sb.append("\",\n"); } - Collections.sort(durationList, Zman.DURATION_ORDER); + durationList.sort(Zman.DURATION_ORDER); for (int i = 0; i < durationList.size(); i++) { - zman = (Zman) durationList.get(i); + zman = durationList.get(i); sb.append("\t\"" + zman.getLabel()).append("\":\""); sb.append(formatter.format((int) zman.getDuration())).append("\",\n"); } @@ -632,10 +641,10 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { * @return if the method should be included in serialization */ private static boolean includeMethod(Method method) { - List methodWhiteList = new ArrayList(); + List methodWhiteList = new ArrayList<>(); // methodWhiteList.add("getName"); - List methodBlackList = new ArrayList(); + List methodBlackList = new ArrayList<>(); // methodBlackList.add("getGregorianChange"); if (methodWhiteList.contains(method.getName())) @@ -648,9 +657,6 @@ private static boolean includeMethod(Method method) { if (!method.getName().startsWith("get")) return false; - if (method.getReturnType().getName().endsWith("Date") || method.getReturnType().getName().endsWith("long")) { - return true; - } - return false; - } + return method.getReturnType().getName().endsWith("Instant") || method.getReturnType().getName().endsWith("long"); + } } diff --git a/src/test/java/com/kosherjava/zmanim/AstronomicalCalendarRegressionTest.java b/src/test/java/com/kosherjava/zmanim/AstronomicalCalendarRegressionTest.java new file mode 100644 index 00000000..6df90326 --- /dev/null +++ b/src/test/java/com/kosherjava/zmanim/AstronomicalCalendarRegressionTest.java @@ -0,0 +1,46 @@ +package com.kosherjava.zmanim; + +import static org.junit.Assert.assertEquals; + +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; + +import org.junit.Test; + +import com.kosherjava.zmanim.util.GeoLocation; + +public class AstronomicalCalendarRegressionTest { + + @Test + public void localMeanTimeForLateEveningStaysOnRequestedLocalDate() { + GeoLocation geoLocation = new GeoLocation("Chicago", 41.8781, -87.6298, ZoneId.of("America/Chicago")); + AstronomicalCalendar astronomicalCalendar = new AstronomicalCalendar(geoLocation); + LocalDate localDate = LocalDate.of(2026, 6, 1); + astronomicalCalendar.setLocalDate(localDate); + + Instant actual = astronomicalCalendar.getLocalMeanTime(LocalTime.of(23, 0)); + ZonedDateTime civilTime = ZonedDateTime.of(localDate, LocalTime.of(23, 0), geoLocation.getZoneId()); + Instant expected = civilTime.toInstant().minusMillis(geoLocation.getLocalMeanTimeOffset(civilTime.toInstant())); + + assertEquals(expected, actual); + assertEquals(localDate, actual.atZone(geoLocation.getZoneId()).toLocalDate()); + } + + @Test + public void localMeanTimeUsesOffsetAtRequestedTimeOnDstTransitionDate() { + GeoLocation geoLocation = new GeoLocation("New York", 40.7128, -74.0060, ZoneId.of("America/New_York")); + AstronomicalCalendar astronomicalCalendar = new AstronomicalCalendar(geoLocation); + LocalDate localDate = LocalDate.of(2026, 3, 8); + astronomicalCalendar.setLocalDate(localDate); + + Instant actual = astronomicalCalendar.getLocalMeanTime(LocalTime.NOON); + ZonedDateTime civilTime = ZonedDateTime.of(localDate, LocalTime.NOON, geoLocation.getZoneId()); + Instant expected = civilTime.toInstant().minusMillis(geoLocation.getLocalMeanTimeOffset(civilTime.toInstant())); + + assertEquals(expected, actual); + assertEquals(LocalTime.of(12, 56, 1, 440_000_000), actual.atZone(geoLocation.getZoneId()).toLocalTime()); + } +} diff --git a/src/test/java/com/kosherjava/zmanim/CalendarEqualityRegressionTest.java b/src/test/java/com/kosherjava/zmanim/CalendarEqualityRegressionTest.java new file mode 100644 index 00000000..21690cb9 --- /dev/null +++ b/src/test/java/com/kosherjava/zmanim/CalendarEqualityRegressionTest.java @@ -0,0 +1,57 @@ +package com.kosherjava.zmanim; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import java.time.ZoneId; + +import org.junit.Test; + +import com.kosherjava.zmanim.util.GeoLocation; + +public class CalendarEqualityRegressionTest { + + @Test + public void astronomicalCalendarCloneRemainsEqual() { + AstronomicalCalendar astronomicalCalendar = new AstronomicalCalendar( + new GeoLocation("Lakewood", 40.0828, -74.2094, ZoneId.of("America/New_York"))); + astronomicalCalendar.getAstronomicalCalculator().setRefraction(0.6); + astronomicalCalendar.getAstronomicalCalculator().setSolarRadius(0.3); + astronomicalCalendar.getAstronomicalCalculator().setEarthRadius(6400); + + AstronomicalCalendar clone = (AstronomicalCalendar) astronomicalCalendar.clone(); + + assertEquals(astronomicalCalendar, clone); + assertEquals(astronomicalCalendar.hashCode(), clone.hashCode()); + } + + @Test + public void zmanimCalendarEqualityIncludesZmanimSettings() { + ZmanimCalendar zmanimCalendar = new ZmanimCalendar( + new GeoLocation("Lakewood", 40.0828, -74.2094, ZoneId.of("America/New_York"))); + ZmanimCalendar clone = (ZmanimCalendar) zmanimCalendar.clone(); + + assertEquals(zmanimCalendar, clone); + assertEquals(zmanimCalendar.hashCode(), clone.hashCode()); + + clone.setUseElevation(true); + clone.setUseAstronomicalChatzosForOtherZmanim(true); + clone.setCandleLightingOffset(40); + + assertFalse(zmanimCalendar.equals(clone)); + } + + @Test + public void comprehensiveZmanimCalendarEqualityIncludesAteretTorahOffset() { + ComprehensiveZmanimCalendar comprehensiveZmanimCalendar = new ComprehensiveZmanimCalendar( + new GeoLocation("Lakewood", 40.0828, -74.2094, ZoneId.of("America/New_York"))); + ComprehensiveZmanimCalendar clone = (ComprehensiveZmanimCalendar) comprehensiveZmanimCalendar.clone(); + + assertEquals(comprehensiveZmanimCalendar, clone); + assertEquals(comprehensiveZmanimCalendar.hashCode(), clone.hashCode()); + + clone.setAteretTorahSunsetOffset(30); + + assertFalse(comprehensiveZmanimCalendar.equals(clone)); + } +} diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index afafa4b5..c6828f28 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -69,7 +69,7 @@ public static void main(String[] args) throws IOException { zcal.getSofZmanTfilaMGA96MinutesZmanis(), zcal.getSofZmanTfilaMGA120Minutes(), zcal.getSofZmanTfila2HoursBeforeChatzos(), zcal.getMinchaGedola30Minutes(), zcal.getMinchaGedola72Minutes(), zcal.getMinchaGedola16Point1Degrees(), - zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(), + zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(null), zcal.getMinchaKetana16Point1Degrees(), zcal.getMinchaKetanaAhavatShalom(), zcal.getMinchaKetana72Minutes(), zcal.getPlagHamincha60Minutes(), zcal.getPlagHamincha72Minutes(), zcal.getPlagHamincha90Minutes(), zcal.getPlagHamincha96Minutes(), @@ -104,7 +104,7 @@ public static void main(String[] args) throws IOException { zcal.getSolarMidnight(), zcal.getShaahZmanisBaalHatanya(), zcal.getAlosBaalHatanya(), zcal.getSofZmanShmaBaalHatanya(), zcal.getSofZmanTfilaBaalHatanya(), zcal.getSofZmanAchilasChametzBaalHatanya(), zcal.getSofZmanBiurChametzBaalHatanya(), - zcal.getMinchaGedolaBaalHatanya(), zcal.getMinchaGedolaBaalHatanyaGreaterThan30(), + zcal.getMinchaGedolaBaalHatanya(), zcal.getMinchaKetanaBaalHatanya(), zcal.getPlagHaminchaBaalHatanya(), zcal.getTzaisBaalHatanya(), zcal.getSofZmanShmaMGA18DegreesToFixedLocalChatzos(), zcal.getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos(), @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException { } static class FullZmanim { - public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point61Degrees,getTzaisGeonim4Point37Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaGedolaBaalHatanyaGreaterThan30,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; + public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point61Degrees,getTzaisGeonim4Point37Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; @Override public String toString() { @@ -305,7 +305,6 @@ public String toString() { .add(getSofZmanAchilasChametzBaalHatanya.toString()) .add(getSofZmanBiurChametzBaalHatanya.toString()) .add(getMinchaGedolaBaalHatanya.toString()) - .add(getMinchaGedolaBaalHatanyaGreaterThan30.toString()) .add(getMinchaKetanaBaalHatanya.toString()) .add(getPlagHaminchaBaalHatanya.toString()) .add(getTzaisBaalHatanya.toString()) @@ -382,7 +381,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre Instant getSofZmanBiurChametzMGA16Point1Degrees, Instant getSolarMidnight, long getShaahZmanisBaalHatanya, Instant getAlosBaalHatanya, Instant getSofZmanShmaBaalHatanya, Instant getSofZmanTfilaBaalHatanya, Instant getSofZmanAchilasChametzBaalHatanya, Instant getSofZmanBiurChametzBaalHatanya, - Instant getMinchaGedolaBaalHatanya, Instant getMinchaGedolaBaalHatanyaGreaterThan30, + Instant getMinchaGedolaBaalHatanya, Instant getMinchaKetanaBaalHatanya, Instant getPlagHaminchaBaalHatanya, Instant getTzaisBaalHatanya, Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos, Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos, @@ -534,7 +533,6 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre this.getSofZmanAchilasChametzBaalHatanya = getSofZmanAchilasChametzBaalHatanya; this.getSofZmanBiurChametzBaalHatanya = getSofZmanBiurChametzBaalHatanya; this.getMinchaGedolaBaalHatanya = getMinchaGedolaBaalHatanya; - this.getMinchaGedolaBaalHatanyaGreaterThan30 = getMinchaGedolaBaalHatanyaGreaterThan30; this.getMinchaKetanaBaalHatanya = getMinchaKetanaBaalHatanya; this.getPlagHaminchaBaalHatanya = getPlagHaminchaBaalHatanya; this.getTzaisBaalHatanya = getTzaisBaalHatanya; @@ -696,7 +694,6 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre public final Instant getSofZmanAchilasChametzBaalHatanya; public final Instant getSofZmanBiurChametzBaalHatanya; public final Instant getMinchaGedolaBaalHatanya; - public final Instant getMinchaGedolaBaalHatanyaGreaterThan30; public final Instant getMinchaKetanaBaalHatanya; public final Instant getPlagHaminchaBaalHatanya; public final Instant getTzaisBaalHatanya; diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java index eb177267..2b14945f 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java @@ -7,6 +7,7 @@ import org.junit.*; import java.time.LocalDate; +import java.time.Month; import java.util.Calendar; /** @@ -23,7 +24,7 @@ public void jewishForwardMonthToMonth() { jewishDate.setJewishDate(5771, 1, 1); LocalDate localDate = jewishDate.getLocalDate(); Assert.assertEquals(5, localDate.getDayOfMonth()); - Assert.assertEquals(3, localDate.getMonthValue()); + Assert.assertEquals(Month.APRIL, localDate.getMonth()); Assert.assertEquals(2011, localDate.getYear()); } @@ -37,7 +38,7 @@ public void computeRoshHashana5771() { jewishDate.setJewishDate(5771, 7, 1); LocalDate localDate = jewishDate.getLocalDate(); Assert.assertEquals(9, localDate.getDayOfMonth()); - Assert.assertEquals(8, localDate.getMonthValue()); + Assert.assertEquals(Month.SEPTEMBER, localDate.getMonth()); Assert.assertEquals(2010, localDate.getYear()); } diff --git a/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java b/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java new file mode 100644 index 00000000..b69bb94c --- /dev/null +++ b/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java @@ -0,0 +1,59 @@ +package com.kosherjava.zmanim.util; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.time.Instant; +import java.time.ZoneId; + +import org.junit.Test; + +import com.kosherjava.zmanim.AstronomicalCalendar; + +public class SerializationRegressionTest { + + @Test + public void zmanToXmlSerializesInstantUsingGeoLocationZone() { + GeoLocation geoLocation = new GeoLocation("Lakewood", 40.0828, -74.2094, ZoneId.of("America/New_York")); + Zman zman = new Zman(Instant.parse("2026-03-23T10:56:01.123Z"), geoLocation, "Sunrise"); + + String xml = zman.toXML(); + + assertTrue(xml.contains("2026-03-23T06:56:01.123")); + } + + @Test + public void zmanWithoutGeoLocationStillSerializesAndFormats() { + Zman zman = new Zman(Instant.parse("2026-03-23T10:56:01.123Z"), "Sunrise"); + + String xml = zman.toXML(); + String text = zman.toString(); + + assertTrue(xml.contains("2026-03-23T10:56:01.123")); + assertTrue(text.contains("GeoLocation:\tnull")); + } + + @Test + public void astronomicalCalendarPreservesSubSecondPrecision() { + AstronomicalCalendar astronomicalCalendar = new AstronomicalCalendar( + new GeoLocation("Lakewood", 40.0828, -74.2094, ZoneId.of("America/New_York"))); + + double utcSunrise = astronomicalCalendar.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH); + long expectedEpochMillis = Math.round(utcSunrise * AstronomicalCalendar.HOUR_MILLIS); + long actualEpochMillis = astronomicalCalendar.getSunriseWithElevation().toEpochMilli() + % (24 * AstronomicalCalendar.HOUR_MILLIS); + + assertTrue(expectedEpochMillis % 1000 != 0); + assertFalse(actualEpochMillis % 1000 == 0); + assertTrue(Math.abs(expectedEpochMillis - actualEpochMillis) < 1000); + } + + @Test + public void negativeTimePreservesSignInValueAndFormatting() { + Time time = new Time(-90_500); + + assertEquals(-90_500d, time.getTime(), 0.0); + assertEquals("-0:01:30.500", time.toString()); + } +} From ecfb42c02edf903ecf62b735792ceb235c82428d Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 20:02:45 -0400 Subject: [PATCH 034/121] YomiCalculator Javadoc Fix --- .../kosherjava/zmanim/hebrewcalendar/YomiCalculator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java index 08c8c591..59b62ba2 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YomiCalculator.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2011-2025 Eliyahu Hershfeld + * Copyright (C) 2011-2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -23,7 +23,7 @@ * use the {@link YerushalmiYomiCalculator}. The library may cover Mishna Yomi etc. at some point in the future. * * @author © Bob Newell (original C code) - * @author © Eliyahu Hershfeld 2011 - 2025 + * @author © Eliyahu Hershfeld 2011 - 2026 */ public class YomiCalculator { @@ -136,8 +136,8 @@ public static Daf getDafYomiBavli(JewishCalendar jewishCalendar) { /** * Return the Julian day from a Java Calendar. * - * @param calendar - * The Java Calendar of the date to be calculated + * @param localDate + * The Java {@link java.time.LocalDate} of the date to be calculated * @return the Julian day number corresponding to the date */ private static int getJulianDay(LocalDate localDate) { From 853613c8cd887e798fdd1230b4431f35d54ce364 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 20:06:18 -0400 Subject: [PATCH 035/121] Javadoc tweak to SunTimesCalculator --- .../java/com/kosherjava/zmanim/util/SunTimesCalculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java index 19b75418..06b1ac0c 100644 --- a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java @@ -56,7 +56,7 @@ public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean) */ public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; From 776042b1f706cdacd05243df5feed35c651c2d59 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 23:02:22 -0400 Subject: [PATCH 036/121] Tiny change to getInstantFromTime to match the old implementation The Math.round can at times be a second off. This does not indicate that this way is more accurate. It is simply to allow better comparison to other implementations. --- src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 93015c49..7369c49d 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -644,7 +644,9 @@ protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { date = date.minusDays(1); } } - LocalDateTime dateTime = date.atStartOfDay().plusNanos(Math.round(time * HOUR_MILLIS) * 1_000_000L); + + // Math.round(time * HOUR_MILLIS) * 1_000_000L could be used below, but this exactly matches the pre-3.0 Date-based code. + LocalDateTime dateTime = date.atStartOfDay().plusNanos((long)(time * HOUR_MILLIS) * 1_000_000L); // The computed time is in UTC fractional hours; anchor in UTC before converting. return ZonedDateTime.of(dateTime, ZoneOffset.UTC).toInstant(); From a0f4b4b468a78e5e35c860873956a0f989a61336 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 23:06:41 -0400 Subject: [PATCH 037/121] =?UTF-8?q?Update=20=C2=A9=20year=20in=20HebrewDat?= =?UTF-8?q?eFormatter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 413f6cfb..f7ecbd71 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2011 - 2024 Eliyahu Hershfeld + * Copyright (C) 2011 - 2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -37,7 +37,7 @@ * @see JewishDate * @see JewishCalendar * - * @author © Eliyahu Hershfeld 2011 - 2024 + * @author © Eliyahu Hershfeld 2011 - 2026 */ public class HebrewDateFormatter { From bb965db14f56540346e22345328e23c964b0acfe Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 23:08:27 -0400 Subject: [PATCH 038/121] =?UTF-8?q?Update=20=C2=A9=20year=20in=20Yerushalm?= =?UTF-8?q?iYomiCalculator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zmanim/hebrewcalendar/YerushalmiYomiCalculator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java index e444b26f..1e9d83e5 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2017 - 2025 Eliyahu Hershfeld + * Copyright (C) 2017 - 2026 Eliyahu Hershfeld * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) @@ -23,7 +23,7 @@ * "https://en.wikipedia.org/wiki/Daf_Yomi">Daf Yomi page ({@link Daf}) for the a given date. * * @author © elihaidv - * @author © Eliyahu Hershfeld 2017 - 2025 + * @author © Eliyahu Hershfeld 2017 - 2026 */ public class YerushalmiYomiCalculator { From ed13624554f53ff27d50cd51b3b618d1f704deda Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 23:09:41 -0400 Subject: [PATCH 039/121] =?UTF-8?q?Update=20=C2=A9=20year=20in=20TefilaRul?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index 7cf88b55..f6f1c76f 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -1,6 +1,6 @@ /* * Zmanim Java API - * Copyright (C) 2019 - 2025 Eliyahu Hershfeld + * Copyright (C) 2019 - 2026 Eliyahu Hershfeld * Copyright (C) 2019 - 2021 Y Paritcher * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General @@ -45,7 +45,7 @@ * System.out.println(hdf.format(jewishCalendar) + ": " + tr.isTachanunRecitedShacharis(jewishCalendar)); * * @author © Y. Paritcher 2019 - 2021 - * @author © Eliyahu Hershfeld 2019 - 2025 + * @author © Eliyahu Hershfeld 2019 - 2026 * * @todo The following items may be added at a future date. *
    From 695d03e969d806753137cfb69993e10221477ef2 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 23 Mar 2026 23:49:39 -0400 Subject: [PATCH 040/121] Pass getMinchaGedola() to getMinchaGedolaGreaterThan30(Instant) This matches the old behavior --- .../zmanim/hebrewcalendar/RegressionTestFileWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index c6828f28..2a58288b 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -69,7 +69,7 @@ public static void main(String[] args) throws IOException { zcal.getSofZmanTfilaMGA96MinutesZmanis(), zcal.getSofZmanTfilaMGA120Minutes(), zcal.getSofZmanTfila2HoursBeforeChatzos(), zcal.getMinchaGedola30Minutes(), zcal.getMinchaGedola72Minutes(), zcal.getMinchaGedola16Point1Degrees(), - zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(null), + zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(zcal.getMinchaGedola()), zcal.getMinchaKetana16Point1Degrees(), zcal.getMinchaKetanaAhavatShalom(), zcal.getMinchaKetana72Minutes(), zcal.getPlagHamincha60Minutes(), zcal.getPlagHamincha72Minutes(), zcal.getPlagHamincha90Minutes(), zcal.getPlagHamincha96Minutes(), From 1f5b3de11127c6b8a107a49bca528a2e20f183f7 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 24 Mar 2026 17:19:05 -0400 Subject: [PATCH 041/121] Fix Time Zone Name to include Standard / DST - Restores the previous behavior of "Eastern Standard Time" & "Eastern Daylight Time" vs "Eastern Time" - Reduce duplication on documentation - clarification of null formatting - TODO - restore previous behavior in toXML and toJSON of including the timezone offset in the format of -05:00 --- .../zmanim/util/ZmanimFormatter.java | 90 +++++++------------ 1 file changed, 31 insertions(+), 59 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index 4c0e16a1..78e85ac6 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -26,7 +26,6 @@ import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; -import java.time.format.TextStyle; import com.kosherjava.zmanim.AstronomicalCalendar; /** @@ -349,13 +348,15 @@ public String formatXSDDurationTime(Time time) { * format used is: * *
    -	 *  <AstronomicalTimes date="1969-02-08" type="com.kosherjava.zmanim.AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">
    -	 *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>
    -	 *     <TemporalHour>PT54M17.529S</TemporalHour>
    +	 *  <AstronomicalTimes date="1969-02-08" type="com.kosherjava.zmanim.AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Montreal, Quebec" latitude="45.497" longitude="-73.63" elevation="85.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">
    +	 *     <SeaLevelSunset>1969-02-08T17:11:26-05:00</SeaLevelSunset>
    +	 *     <TemporalHour>PT50M23.259S</TemporalHour>
     	 *     ...
     	 *   </AstronomicalTimes>
     	 * 
    * + * If a zman does not occur, the value "N/A" will be returned. + * * Note that the output uses the xsd:dateTime format for * times such as sunrise, and xsd:duration format for * times that are a duration such as the length of a @@ -364,15 +365,7 @@ public String formatXSDDurationTime(Time time) { * * @param astronomicalCalendar the AstronomicalCalendar Object * - * @return The XML formatted String. The format will be: - * - *
    -	 *  <AstronomicalTimes date="1969-02-08" type="com.kosherjava.zmanim.AstronomicalCalendar algorithm="US Naval Almanac Algorithm" location="Lakewood, NJ" latitude="40.095965" longitude="-74.22213" elevation="31.0" timeZoneName="Eastern Standard Time" timeZoneID="America/New_York" timeZoneOffset="-5">
    -	 *     <Sunrise>2007-02-18T06:45:27-05:00</Sunrise>
    -	 *     <TemporalHour>PT54M17.529S</TemporalHour>
    -	 *     ...
    -	 *  </AstronomicalTimes>
    -	 * 
    + * @return The XML String formatted as described above. * * @todo Add proper schema, and support for nulls. XSD duration (for solar hours), should probably return nil and not P. */ @@ -383,7 +376,10 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { df = df.withZone(astronomicalCalendar.getGeoLocation().getZoneId()); LocalDate localDate = astronomicalCalendar.getLocalDate(); - ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); + GeoLocation geoLocation = astronomicalCalendar.getGeoLocation(); + ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); + double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; + String timeZoneName = lastMidnight.format(DateTimeFormatter.ofPattern("zzzz", Locale.getDefault())); StringBuilder sb = new StringBuilder("<"); boolean isAstronomicalCalendar = astronomicalCalendar.getClass().getName().equals("com.kosherjava.zmanim.AstronomicalCalendar"); @@ -412,14 +408,10 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { sb.append(" latitude=\"").append(astronomicalCalendar.getGeoLocation().getLatitude()).append("\""); sb.append(" longitude=\"").append(astronomicalCalendar.getGeoLocation().getLongitude()).append("\""); sb.append(" elevation=\"").append(astronomicalCalendar.getGeoLocation().getElevation()).append("\""); - sb.append(" timeZoneName=\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\""); - sb.append(" timeZoneID=\"").append(zi.getId()).append("\""); - - ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); - double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; + sb.append(" timeZoneName=\"").append(timeZoneName).append("\""); + sb.append(" timeZoneID=\"").append(geoLocation.getZoneId().getId()).append("\""); sb.append(" timeZoneOffset=\"").append(offsetHours).append("\""); //sb.append(" useElevationAllZmanim=\"").append(astronomicalCalendar.useElevationAllZmanim()).append("\""); //TODO likely using reflection - sb.append(">\n"); Method[] theMethods = astronomicalCalendar.getClass().getMethods(); @@ -497,16 +489,16 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { * "date":"1969-02-08", * "type":"com.kosherjava.zmanim.AstronomicalCalendar", * "algorithm":"US Naval Almanac Algorithm", - * "location":"Lakewood, NJ", - * "latitude":"40.095965", - * "longitude":"-74.22213", - * "elevation:"31.0", + * "location":"Montreal, Quebec", + * "latitude":"45.497", + * "longitude":"-73.63", + * "elevation:"85.0", * "timeZoneName":"Eastern Standard Time", * "timeZoneID":"America/New_York", * "timeZoneOffset":"-5"}, * "AstronomicalTimes":{ - * "Sunrise":"2007-02-18T06:45:27-05:00", - * "TemporalHour":"PT54M17.529S" + * "SeaLevelSunset":"1969-02-08T17:11:26-05:00", + * "TemporalHour":"PT50M23.259S" * ... * } * } @@ -516,30 +508,11 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { * times such as sunrise, and xsd:duration format for * times that are a duration such as the length of a * {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour}. + * If a zman does not occur, the value "N/A" will be returned. * * @param astronomicalCalendar the AstronomicalCalendar Object * - * @return The JSON formatted String. The format will be: - *
    -	 * {
    -	 *    "metadata":{
    -	 *      "date":"1969-02-08",
    -	 *      "type":"com.kosherjava.zmanim.AstronomicalCalendar",
    -	 *      "algorithm":"US Naval Almanac Algorithm",
    -	 *      "location":"Lakewood, NJ",
    -	 *      "latitude":"40.095965",
    -	 *      "longitude":"-74.22213",
    -	 *      "elevation:"31.0",
    -	 *      "timeZoneName":"Eastern Standard Time",
    -	 *      "timeZoneID":"America/New_York",
    -	 *      "timeZoneOffset":"-5"},
    -	 *    "AstronomicalTimes":{
    -	 *     "Sunrise":"2007-02-18T06:45:27-05:00",
    -	 *     "TemporalHour":"PT54M17.529S"
    -	 *     ...
    -	 *     }
    -	 * }
    -	 * 
    + * @return The JSON String formatted as described above. */ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, DateTimeFormatter.ofPattern( @@ -548,23 +521,22 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); LocalDate localDate = astronomicalCalendar.getLocalDate(); - ZoneId zi = astronomicalCalendar.getGeoLocation().getZoneId(); + GeoLocation geoLocation = astronomicalCalendar.getGeoLocation(); + ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, + astronomicalCalendar.getGeoLocation().getZoneId()); + double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; + String timeZoneName = lastMidnight.format(DateTimeFormatter.ofPattern("zzzz", Locale.getDefault())); StringBuilder sb = new StringBuilder("{\n\"metadata\":{\n"); sb.append("\t\"date\":\"").append(df.format(localDate)).append("\",\n"); sb.append("\t\"type\":\"").append(astronomicalCalendar.getClass().getName()).append("\",\n"); sb.append("\t\"algorithm\":\"").append(astronomicalCalendar.getAstronomicalCalculator().getCalculatorName()).append("\",\n"); - sb.append("\t\"location\":\"").append(astronomicalCalendar.getGeoLocation().getLocationName()).append("\",\n"); - sb.append("\t\"latitude\":\"").append(astronomicalCalendar.getGeoLocation().getLatitude()).append("\",\n"); - sb.append("\t\"longitude\":\"").append(astronomicalCalendar.getGeoLocation().getLongitude()).append("\",\n"); - sb.append("\t\"elevation\":\"").append(astronomicalCalendar.getGeoLocation().getElevation()).append("\",\n"); - - - sb.append("\t\"timeZoneName\":\"").append(zi.getDisplayName(TextStyle.FULL, Locale.getDefault())).append("\",\n"); - sb.append("\t\"timeZoneID\":\"").append(zi.getId()).append("\",\n"); //FIXME - - ZonedDateTime lastMidnight = ZonedDateTime.of(astronomicalCalendar.getLocalDate(), LocalTime.MIDNIGHT, astronomicalCalendar.getGeoLocation().getZoneId()); - double offsetHours = lastMidnight.getOffset().getTotalSeconds() / 3600.0; + sb.append("\t\"location\":\"").append(geoLocation.getLocationName()).append("\",\n"); + sb.append("\t\"latitude\":\"").append(geoLocation.getLatitude()).append("\",\n"); + sb.append("\t\"longitude\":\"").append(geoLocation.getLongitude()).append("\",\n"); + sb.append("\t\"elevation\":\"").append(geoLocation.getElevation()).append("\",\n"); + sb.append("\t\"timeZoneName\":\"").append(timeZoneName).append("\",\n"); + sb.append("\t\"timeZoneID\":\"").append(geoLocation.getZoneId().getId()).append("\",\n"); sb.append("\t\"timeZoneOffset\":\"").append(offsetHours).append("\""); sb.append("},\n\""); From 5a3b3d9d517d511def61ebbc01d89bdc5d231bcd Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 24 Mar 2026 18:28:37 -0400 Subject: [PATCH 042/121] Output a proper XSD DateTime (with zone offset) in toXML and toJSON This matches the previous implementation. There is still a FIXME that has to be reviewed. --- .../com/kosherjava/zmanim/util/ZmanimFormatter.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index 78e85ac6..5a7ec5c0 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -281,7 +281,7 @@ public String format(Time time) { public String formatDateTime(Instant instant, ZoneId zoneId) { ZonedDateTime dateTime = instant.atZone(zoneId); - if (this.dateTimeFormatter.toString().equals("yyyy-MM-dd'T'HH:mm:ss")) { + if (this.dateTimeFormatter.toString().equals("yyyy-MM-dd'T'HH:mm:ss")) { // FIXME this works in the SimpleDateFormat but not with a DateTimeFormatter return getXSDateTime(instant); } else { return this.dateTimeFormatter.format(dateTime); @@ -372,6 +372,8 @@ public String formatXSDDurationTime(Time time) { public static String toXML(AstronomicalCalendar astronomicalCalendar) { ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, DateTimeFormatter.ofPattern( "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getZoneId()); + DateTimeFormatter xsdFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") + .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); df = df.withZone(astronomicalCalendar.getGeoLocation().getZoneId()); @@ -455,7 +457,7 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = dateList.get(i); sb.append("\t<").append(zman.getLabel()).append(">"); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); + sb.append(xsdFormatter.format(zman.getZman())); sb.append("\n"); } durationList.sort(Zman.DURATION_ORDER); @@ -517,6 +519,8 @@ public static String toXML(AstronomicalCalendar astronomicalCalendar) { public static String toJSON(AstronomicalCalendar astronomicalCalendar) { ZmanimFormatter formatter = new ZmanimFormatter(ZmanimFormatter.XSD_DURATION_FORMAT, DateTimeFormatter.ofPattern( "yyyy-MM-dd'T'HH:mm:ss"), astronomicalCalendar.getGeoLocation().getZoneId()); + DateTimeFormatter xsdFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") + .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd") .withZone(astronomicalCalendar.getGeoLocation().getZoneId()); @@ -588,7 +592,7 @@ public static String toJSON(AstronomicalCalendar astronomicalCalendar) { for (int i = 0; i < dateList.size(); i++) { zman = dateList.get(i); sb.append("\t\"").append(zman.getLabel()).append("\":\""); - sb.append(formatter.formatDateTime(zman.getZman(), astronomicalCalendar.getGeoLocation().getZoneId())); + sb.append(xsdFormatter.format(zman.getZman())); sb.append("\",\n"); } durationList.sort(Zman.DURATION_ORDER); From 8283310b56748e9843a6cbef4bfd8b74dc9d4ffb Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 24 Mar 2026 20:24:05 -0400 Subject: [PATCH 043/121] Rename getXSDDateTime to formatXSDDateTime - Remove unnecessary and broken IF statement in ZmanimFormatter --- .../kosherjava/zmanim/util/ZmanimFormatter.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java index 5a7ec5c0..de7e7e0d 100644 --- a/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java @@ -277,15 +277,11 @@ public String format(Time time) { * the {@link java.time.ZoneId ZoneId} used to help format based on the Instant's DST and other * settings. * @return the formatted String + * @see #getXSDateTime(Instant) */ public String formatDateTime(Instant instant, ZoneId zoneId) { ZonedDateTime dateTime = instant.atZone(zoneId); - - if (this.dateTimeFormatter.toString().equals("yyyy-MM-dd'T'HH:mm:ss")) { // FIXME this works in the SimpleDateFormat but not with a DateTimeFormatter - return getXSDateTime(instant); - } else { - return this.dateTimeFormatter.format(dateTime); - } + return this.getDateTimeFormatter().format(dateTime); } /** @@ -293,11 +289,9 @@ public String formatDateTime(Instant instant, ZoneId zoneId) { * @param instant the Instant to format. * @return the Instant formatted using the format "yyyy-MM-dd'T'HH:mm:ssXXX */ - public String getXSDateTime(Instant instant) { - DateTimeFormatter formatter = - DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") - .withZone(getZoneId()); - + public String formatXSDateTime(Instant instant) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssXXX") + .withZone(getZoneId()); return formatter.format(instant); } From 95199fbc743572e1678518d389b73a8010f28cf9 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 11:28:50 +0300 Subject: [PATCH 044/121] Add generic sof zman achilas and biur chametz These zmanim support half-day based calculations and significantly reduces code duplication in the ComprehensiveZmanimCalendar. This change required moving the previously private Baal Hatanya sunrise and sunset methods, to protected methods in this parent class. --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index c3a42f78..fa64d402 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -251,6 +251,16 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz * @see ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees() */ protected static final double ZENITH_8_POINT_5 = GEOMETRIC_ZENITH + 8.5; + + /** + * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the + * Baal Hatanya. + * + * @see #getSunriseBaalHatanya() + * @see #getSunsetBaalHatanya() + */ + protected static final double ZENITH_1_POINT_583 = GEOMETRIC_ZENITH + 1.583; /** * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the @@ -600,6 +610,107 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn } } + + /** + * 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 + * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea + * level sunrise}. If it is not erev Pesach, a null will be returned. + * @return the Instant 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 + * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @see ZmanimCalendar#getShaahZmanisGra() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + */ + + /** + * A generic method for calculating sof zman biur chametz or the latest time one is allowed burning + * chametz on Erev Pesach that is 5 * shaos zmaniyos (temporal hours) after the start of the + * day, calculated using the start and end of the day passed to this method. If the date is not erev Pesach, a + * null will be returned. The time from the start of day to the end of day is divided into 12 shaos zmaniyos + * (temporal hours), and sof zman biur chametz is calculated as 5 of those shaos zmaniyos after the + * beginning of the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} to this + * method will return sof zman biur chametz according to the opinion of the 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 Geonim or some other variant. If the day + * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. + * + * @param startOfDay + * the start of day for calculating sof zman biur chametz. This can be sunrise or any alos + * passed to this method. + * @param endOfDay + * the end of day for calculating sof zman biur chametz. This can be sunset or any tzais + * passed to this method. + * @param synchronous + * If the zman has a synchronous start and end of the day. If this is false, using a {@link + * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * definition chatzos will not be the middle of the day for the zman. + * @return the Instant of the sof zman biur chametz based on the start and end of day times passed + * to this method. If the date is not Erev Pesach or 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 {@link AstronomicalCalendar} + * documentation. + */ + public Instant getSofZmanBiurChametz(Instant startOfDay, Instant endOfDay, boolean synchronous) { + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { + if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { + return getHalfDayBasedZman(startOfDay, getChatzos(), 5); + } else { + return getShaahZmanisBasedZman(startOfDay, endOfDay, 5); + } + } else { + return null; + } + } + + /** + * A generic method for calculating sof zman achilas chametz or the latest time one is allowed eating + * chametz on Erev Pesach that is 4 * shaos zmaniyos (temporal hours) after the start of the + * day, calculated using the start and end of the day passed to this method. If the date is not erev Pesach, a + * null will be returned. The time from the start of day to the end of day is divided into 12 shaos zmaniyos + * (temporal hours), and sof zman achilas chametz is calculated as 4 of those shaos zmaniyos after the + * beginning of the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} to this + * method will return sof zman achilas chametz according to the opinion of the 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 Geonim or some other variant. If the day + * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, 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. + * + * @param startOfDay + * the start of day for calculating sof zman achilas chametz. This can be sunrise or any alos + * passed to this method. + * @param endOfDay + * the end of day for calculating sof zman achilas chametz. This can be sunset or any tzais + * passed to this method. + * @param synchronous + * If the zman has a synchronous start and end of the day. If this is false, using a {@link + * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * definition chatzos will not be the middle of the day for the zman. + * @return the Instant of the sof zman achilas chametz based on the start and end of day times passed + * to this method. If the date is not Erev Pesach or 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 {@link AstronomicalCalendar} + * documentation. + */ + public Instant getSofZmanAchilasChametz(Instant startOfDay, Instant endOfDay, boolean synchronous) { + JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); + if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { + return getSofZmanTfila(startOfDay, endOfDay, synchronous); + } else { + return null; + } + } + /** * A generic method for calculating the latest zman tfila that calls {@link #getSofZmanTfila(Instant, Instant, boolean)} * passing false to the synchronous parameter since there is no way to know if the start and end of the day are @@ -1098,6 +1209,75 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr //is shabbos or YT and it is before tzais return jewishCalendar.isAssurBemelacha() && currentTime.compareTo(tzais) <= 0; } + + /** + * A method that returns the Baal Hatanya's + * 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 + * DovBer Levine's commentary on The Baal + * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583° + * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by + * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after + * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman + * and is probably a typo and should be 1.683°. These calculations are used by most 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. + * + * @return the Instant representing the exact sea level netz amiti (sunrise) 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, a null will be returned. See detailed explanation on top of the page. + * + * @see #getSunriseWithElevation() + * @see #getSeaLevelSunrise() + * @see #getSunsetBaalHatanya() + * @see #ZENITH_1_POINT_583 + */ + protected Instant getSunriseBaalHatanya() { + return getSunriseOffsetByDegrees(ZENITH_1_POINT_583); + } + + /** + * A method that returns the Baal Hatanya's + * 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. + * + * @return the Instant representing the exact sea level shkiah amiti (sunset) 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, a null will be returned. See detailed explanation on top of + * the {@link AstronomicalCalendar} documentation. + * + * @see #getSunsetWithElevation() + * @see #getSeaLevelSunset() + * @see #getSunriseBaalHatanya() + * @see #ZENITH_1_POINT_583 + */ + protected Instant getSunsetBaalHatanya() { + return getSunsetOffsetByDegrees(ZENITH_1_POINT_583); + } /** * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the From e11417fad976bec53b7a807681ef3af3a1a0c651 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 11:32:06 +0300 Subject: [PATCH 045/121] Move Repeated Erev Pesach zmanim Logic to the parent class This change required moving the previously private Baal Hatanya sunrise and sunset methods, to protected methods in the parent ZmanimCalendar class. --- .../zmanim/ComprehensiveZmanimCalendar.java | 186 +++--------------- 1 file changed, 26 insertions(+), 160 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 4fc34a0e..48692251 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -295,16 +295,6 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { */ protected static final double ZENITH_5_POINT_88 = GEOMETRIC_ZENITH + 5.88; - /** - * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the - * Baal Hatanya. - * - * @see #getSunriseBaalHatanya() - * @see #getSunsetBaalHatanya() - */ - protected static final double ZENITH_1_POINT_583 = GEOMETRIC_ZENITH + 1.583; - /** * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn @@ -3543,22 +3533,16 @@ public Instant getTchilasZmanKidushLevana7Days() { * GRA that the day is calculated from sunrise to sunset. * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it * is not erev Pesach, a null will be returned. - * - * @see ZmanimCalendar#getShaahZmanisGra() - * @see ZmanimCalendar#getSofZmanTfilaGRA() * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @see ZmanimCalendar#getShaahZmanisGra() + * @see ZmanimCalendar#getSofZmanTfilaGRA() + * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzGRA() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getSofZmanTfilaGRA(); - } else { - return null; - } + return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -3578,15 +3562,10 @@ public Instant getSofZmanAchilasChametzGRA() { * @see #getShaahZmanisMGA() * @see #getAlos72() * @see #getSofZmanTfilaMGA72Minutes() + * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA72Minutes() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getSofZmanTfilaMGA72Minutes(); - } else { - return null; - } + return getSofZmanAchilasChametz(getAlos72(), getTzais72(), true); } /** @@ -3606,15 +3585,10 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { * @see #getShaahZmanis72MinutesZmanis() * @see #getAlos72Zmanis() * @see #getSofZmanTfilaMGA72MinutesZmanis() + * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getSofZmanTfilaMGA72MinutesZmanis(); - } else { - return null; - } + return getSofZmanAchilasChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); } /** @@ -3633,42 +3607,30 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { * @see #getShaahZmanis16Point1Degrees() * @see #getAlos16Point1Degrees() * @see #getSofZmanTfilaMGA16Point1Degrees() + * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getSofZmanTfilaMGA16Point1Degrees(); - } else { - return null; - } + return getSofZmanAchilasChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } /** - * 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 * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. - * @see ZmanimCalendar#getShaahZmanisGra() * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @see ZmanimCalendar#getShaahZmanisGra() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzGRA() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getSunriseBasedOnElevationSetting(), getShaahZmanisGra() * 5); - } else { - return null; - } + return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** - * 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 #getSunriseWithElevation() sunrise}. This time is 5 {@link @@ -3682,19 +3644,13 @@ public Instant getSofZmanBiurChametzGRA() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getShaahZmanisMGA() * @see #getAlos72() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA72Minutes() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getAlos72(), getShaahZmanisMGA() * 5); - } else { - return null; - } + return getSofZmanBiurChametz(getAlos72(), getTzais72(), true); } /** - * 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 #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link @@ -3708,19 +3664,13 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis72MinutesZmanis() * @see #getAlos72Zmanis() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getAlos72Zmanis(), getShaahZmanis72MinutesZmanis() * 5); - } else { - return null; - } + return getSofZmanBiurChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); } /** - * 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 #getSunriseWithElevation() sunrise}. This time is 5 @@ -3736,84 +3686,10 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { * * @see #getShaahZmanis16Point1Degrees() * @see #getAlos16Point1Degrees() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getAlos16Point1Degrees(), getShaahZmanis16Point1Degrees() * 5); - } else { - return null; - } - } - - /** - * A method that returns the Baal Hatanya's - * 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 - * DovBer Levine's commentary on The Baal - * Hatanya's Seder Hachnasas Shabbos. From an elevation of 546 meters, the top of Har Hacarmel, the sun disappears when it is 1° 35' or 1.583° - * below the sea level horizon. This in turn is based on the Gemara Shabbos 35a. There are other opinions brought down by - * Rabbi Levine, including Rabbi Yosef Yitzchok Feigelstock who calculates it as the degrees below the horizon 4 minutes after - * sunset in Yerushalayim (on the equinox). That is brought down as 1.583°. This is identical to the 1° 35' zman - * and is probably a typo and should be 1.683°. These calculations are used by most 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. - * - * @return the Instant representing the exact sea level netz amiti (sunrise) 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, a null will be returned. See detailed explanation on top of the page. - * - * @see #getSunriseWithElevation() - * @see #getSeaLevelSunrise() - * @see #getSunsetBaalHatanya() - * @see #ZENITH_1_POINT_583 - */ - private Instant getSunriseBaalHatanya() { - return getSunriseOffsetByDegrees(ZENITH_1_POINT_583); - } - - /** - * A method that returns the Baal Hatanya's - * 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. - * - * @return the Instant representing the exact sea level shkiah amiti (sunset) 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, a null will be returned. See detailed explanation on top of - * the {@link AstronomicalCalendar} documentation. - * - * @see #getSunsetWithElevation() - * @see #getSeaLevelSunset() - * @see #getSunriseBaalHatanya() - * @see #ZENITH_1_POINT_583 - */ - private Instant getSunsetBaalHatanya() { - return getSunsetOffsetByDegrees(ZENITH_1_POINT_583); + return getSofZmanBiurChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } /** @@ -3903,21 +3779,16 @@ public Instant getSofZmanTfilaBaalHatanya() { * is calculated from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be * returned. - * @see #getShaahZmanisBaalHatanya() - * @see #getSofZmanTfilaBaalHatanya() * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @see #getShaahZmanisBaalHatanya() + * @see #getSofZmanTfilaBaalHatanya() + * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzBaalHatanya() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getSofZmanTfilaBaalHatanya(); - } else { - return null; - } + return getSofZmanAchilasChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } /** @@ -3925,20 +3796,15 @@ public Instant getSofZmanAchilasChametzBaalHatanya() { * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be returned. - * @see #getShaahZmanisBaalHatanya() * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @see #getShaahZmanisBaalHatanya() + * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzBaalHatanya() { - JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); - - if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { - return getTimeOffset(getSunriseBaalHatanya(), getShaahZmanisBaalHatanya() * 5); - } else { - return null; - } + return getSofZmanBiurChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); } /** From 4760e2a68d35be7203c778e9c68d49be98391ff8 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 11:37:24 +0300 Subject: [PATCH 046/121] Change branch for CodeQL --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 92f186bf..9ff27ae1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -7,10 +7,10 @@ name: "CodeQL" on: push: - branches: [master] + branches: [3-0-mdernization] pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: [3-0-mdernization] schedule: - cron: '0 5 * * 1' From 0abca258b1e13209f7f39b322710e734f1ed244a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 13:09:27 +0300 Subject: [PATCH 047/121] Renamed ambiguous zmanim. The times returned were not changed. - getTzais() -> getTzaisGeonim8Point5Degrees(). - getAlosHashachar() -> getAlos16Point1Degrees(). - getSofZmanShmaMGA() -> getSofZmanShmaMGA72Minutes() - getSofZmanTfila() -> getSofZmanTfilaMGA72Minutes() - getMinchaGedola() -> getMinchaGedolaGRA() - getMinchaKetana() -> getMinchaKetanaGRA() - getShaahZmanisMGA() -> getShaahZmanis72Minutes() --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index fa64d402..33e2ad43 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -315,7 +315,7 @@ protected Instant getSunsetBasedOnElevationSetting() { * @see #ZENITH_8_POINT_5 * ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais */ - public Instant getTzais() { + public Instant getTzaisGeonim8Point5Degrees() { return getSunsetOffsetByDegrees(ZENITH_8_POINT_5); } @@ -337,7 +337,7 @@ public Instant getTzais() { * low enough below the horizon for this calculation, a null will be returned. See detailed * explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Instant getAlosHashachar() { + public Instant getAlos16Point1Degrees() { return getSunriseOffsetByDegrees(ZENITH_16_POINT_1); } @@ -511,23 +511,25 @@ public Instant getSofZmanShmaGRA() { } /** - * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * - * {@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 - * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() - * sunset} (depending on the {@link #isUseElevation()} setting). + * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the + * opinion of the Magen Avraham (MGA) based on + * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link + * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion + * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to + * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link + * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. * - * @return the Instant of the latest zman shema. 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 + * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Instant, Instant) - * @see ComprehensiveZmanimCalendar#getShaahZmanis72Minutes() - * @see ComprehensiveZmanimCalendar#getAlos72() - * @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA72Minutes() that + * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see #getShaahZmanis72Minutes() + * @see #getAlos72() + * @see #getSofZmanShmaMGA() + * @see #getSofZmanShma(Instant, Instant, boolean) */ - public Instant getSofZmanShmaMGA() { + public Instant getSofZmanShmaMGA72Minutes() { return getSofZmanShma(getAlos72(), getTzais72(), true); } @@ -752,23 +754,23 @@ public Instant getSofZmanTfilaGRA() { return getSofZmanTfila(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } + /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * * {@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 - * #getSeaLevelSunset() sea level sunset} or from 72 minutes before {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() - * sunset} (depending on the {@link #isUseElevation()} setting). + * from 72 minutes before {@link #getSunriseBasedOnElevationSetting()} to 72 minutes after {@link + * #getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link #isUseElevation()} setting). * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. - * @see #getSofZmanTfila(Instant, Instant) - * @see #getShaahZmanisMGA() + * @see #getSofZmanTfila(Instant, Instan, boolean) + * @see #getShaahZmanis72Minutes() * @see #getAlos72() */ - public Instant getSofZmanTfilaMGA() { + public Instant getSofZmanTfilaMGA72Minutes() { return getSofZmanTfila(getAlos72(), getTzais72(), true); } @@ -865,7 +867,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Instant getMinchaGedola() { + public Instant getMinchaGedolaGRA() { return getMinchaGedola(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } @@ -1010,7 +1012,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Instant getMinchaKetana() { + public Instant getMinchaKetanaGRA() { return getMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } @@ -1088,7 +1090,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Instant getPlagHamincha() { + public Instant getPlagHaminchaGRA() { return getPlagHamincha(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } @@ -1128,7 +1130,7 @@ public long getShaahZmanisGra() { * where it does not set, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public long getShaahZmanisMGA() { + public long getShaahZmanis72Minutes() { return getTemporalHour(getAlos72(), getTzais72()); } From b0e4816759b79ce015a6748e73768c14d8a3477c Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 13:12:46 +0300 Subject: [PATCH 048/121] Remove zmanim in the ComprehensiveZmanimCalendar moved to the parent class - getShaahZmanis72Minutes() - getTzaisGeonim8Point5Degrees() - getAlos16Point1Degrees() - getSofZmanShmaMGA72Minutes() - getSofZmanTfilaMGA72Minutes() - getTzaisGeonim8Point5Degrees() --- .../zmanim/ComprehensiveZmanimCalendar.java | 97 ------------------- 1 file changed, 97 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 48692251..4dacca12 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -535,23 +535,6 @@ public long getShaahZmanis60Minutes() { return getTemporalHour(getAlos60(), getTzais60()); } - /** - * Method to return a shaah zmanis (solar hour) according to the opinion of the Magen Avraham (MGA). This calculation divides the day - * based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 72 minutes - * before sunrise and dusk is 72 minutes after sunset. This day is split into 12 equal parts with each part - * being a shaah zmanis. Alternate methods of calculating a shaah zmanis are available in the - * subclass {@link ComprehensiveZmanimCalendar}. - * - * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the - * {@link AstronomicalCalendar} documentation. - */ - public long getShaahZmanis72Minutes() { - return getShaahZmanisMGA(); - } - /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being @@ -1081,25 +1064,6 @@ public Instant getAlos19Degrees() { public Instant getAlos19Point8Degrees() { return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); } - - /** - * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the - * eastern geometric horizon before sunrise. This calculation is based on the same calculation of - * {@link #getAlos72() 72 minutes} but uses a degree-based calculation instead of 72 exact minutes. This calculation - * is based on the position of the sun 72 minutes before sunrise in Jerusalem around the equinox / equilux, which - * calculates to 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}. - * - * @return the Instant representing alos. 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. - * @see #ZENITH_16_POINT_1 - * @see #getAlos72() - */ - public Instant getAlos16Point1Degrees() { - return getSunriseOffsetByDegrees(ZENITH_16_POINT_1); - } /** * This method returns misheyakir based on the position of the sun {@link #ZENITH_12_POINT_85 12.85°} @@ -1321,29 +1285,6 @@ public Instant getSofZmanShmaMGA18Degrees() { return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees(), true); } - /** - * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the - * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link - * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion - * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to - * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link - * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to {@link - * #getSofZmanShmaMGA()} and is repeated here for clarity. - * - * @return the Instant of the latest zman krias shema. 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 - * {@link AstronomicalCalendar} documentation. - * @see #isUseAstronomicalChatzosForOtherZmanim() - * @see #getShaahZmanis72Minutes() - * @see #getAlos72() - * @see #getSofZmanShmaMGA() - */ - public Instant getSofZmanShmaMGA72Minutes() { - return getSofZmanShmaMGA(); - } - /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based @@ -1617,28 +1558,6 @@ public Instant getSofZmanTfilaMGA18Degrees() { return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees(), true); } - /** - * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion - * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before - * sunrise to {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 4 * - * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. This class returns an identical time to - * {@link #getSofZmanTfilaMGA()} and is repeated here for clarity. - * - * @return the Instant 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 - * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72Minutes() - * @see #getAlos72() - * @see #getSofZmanShmaMGA() - */ - public Instant getSofZmanTfilaMGA72Minutes() { - return getSofZmanTfilaMGA(); - } - /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos @@ -1893,7 +1812,6 @@ public Instant getMinchaGedolaAhavatShalom() { } /** - * FIXME check for synchronous * This is a convenience method that returns the later of the minchaGedola passed in 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 the minchaGedola passed in will be @@ -2713,21 +2631,6 @@ public Instant getTzaisGeonim7Point083Degrees() { public Instant getTzaisGeonim7Point67Degrees() { return getSunsetOffsetByDegrees(ZENITH_7_POINT_67); } - - /** - * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the - * sun's position at {@link #ZENITH_8_POINT_5 8.5°} below the western horizon. - * - * @return the Instant representing the time when the sun is 8.5° below sea level. 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. - * @see #ZENITH_8_POINT_5 - */ - public Instant getTzaisGeonim8Point5Degrees() { - return getSunsetOffsetByDegrees(ZENITH_8_POINT_5); - } /** * This method returns the tzais (nightfall) based on the calculations used in the Date: Mon, 6 Apr 2026 13:17:26 +0300 Subject: [PATCH 049/121] Fix RegressionTestFileWriter for Mincha Gedola renaming --- .../zmanim/hebrewcalendar/RegressionTestFileWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index 2a58288b..77a442e9 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -69,7 +69,7 @@ public static void main(String[] args) throws IOException { zcal.getSofZmanTfilaMGA96MinutesZmanis(), zcal.getSofZmanTfilaMGA120Minutes(), zcal.getSofZmanTfila2HoursBeforeChatzos(), zcal.getMinchaGedola30Minutes(), zcal.getMinchaGedola72Minutes(), zcal.getMinchaGedola16Point1Degrees(), - zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(zcal.getMinchaGedola()), + zcal.getMinchaGedolaAhavatShalom(), zcal.getMinchaGedolaGreaterThan30(zcal.getMinchaGedolaGRA()), zcal.getMinchaKetana16Point1Degrees(), zcal.getMinchaKetanaAhavatShalom(), zcal.getMinchaKetana72Minutes(), zcal.getPlagHamincha60Minutes(), zcal.getPlagHamincha72Minutes(), zcal.getPlagHamincha90Minutes(), zcal.getPlagHamincha96Minutes(), From 44848762869dbe3ab15ebf415780e1bcedc20513 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 14:09:10 +0300 Subject: [PATCH 050/121] ZmanimCalendar - Rename some method names for consistency - getAlos72() -> getAlos72Minutes() - getTzais72() -> getTzais72Minutes() - getShaahZmanisGra() -> getShaahZmanisGRA() - many JavaDoc fixes for recent changes --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 90 +++++++++---------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 33e2ad43..94071ebd 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -41,13 +41,13 @@ * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunriseWithElevation()}, - * {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link #getSofZmanShmaMGA()} - * that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as - * {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. Even when set to - * true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link - * ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()} since - * these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition of - * sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use + * {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link + * #getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage + * of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. + * Even when set to true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link + * ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()} + * since these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition + * of sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use * of elevation. * For additional information on the halachic impact of elevation on zmanim see: *
      @@ -90,7 +90,7 @@ public class ZmanimCalendar extends AstronomicalCalendar { * should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for * zmanim calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will * impact sunrise and sunset based zmanim such as {@link #getSofZmanShmaGRA()}, - * alos based zmanim such as {@link #getSofZmanShmaMGA()} that are based on a + * alos based zmanim such as {@link #getSofZmanShmaMGA72Minutes()} that are based on a * fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as {@link * ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact * zmanim that are a degree based offset of sunrise and sunset, such as @@ -136,9 +136,9 @@ public void setUseElevation(boolean useElevation) { * @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 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 + * time between sunrise and sunset. {@link #getMinchaGedolaGRA() 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 shaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link #getPlagHaminchaGRA() Plag * hamincha} would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 * shaos zmaniyos after sunrise. Etc. * @@ -189,9 +189,9 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { * @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 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 + * time between sunrise and sunset. {@link #getMinchaGedolaGRA() mincha gedola GRA} 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 shaos zmaniyos after sunrise. {@link #getPlagHamincha() Plag + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link #getPlagHaminchaGRA() Plag * hamincha} would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 * shaos zmaniyos after sunrise. Etc. * @@ -225,8 +225,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux is * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}. * - * @see #getAlosHashachar() - * @see ComprehensiveZmanimCalendar#getAlos16Point1Degrees() + * @see #getAlos16Point1Degrees() * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees() * @see ComprehensiveZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees() @@ -247,8 +246,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz * "https://www.worldcat.org/oclc/29283612">Ohr Meir considers this the time that 3 small stars are visible, * which is later than the required 3 medium stars. * - * @see #getTzais() - * @see ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees() + * @see #getTzaisGeonim8Point5Degrees() */ protected static final double ZENITH_8_POINT_5 = GEOMETRIC_ZENITH + 8.5; @@ -355,7 +353,7 @@ public Instant getAlos16Point1Degrees() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Instant getAlos72() { + public Instant getAlos72Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS); } @@ -490,7 +488,7 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * - * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or + * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() 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 #getSeaLevelSunset() sea level @@ -498,7 +496,7 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { * {@link #isUseElevation()} setting). * * @see #getSofZmanShma(Instant, Instant) - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() * @see #isUseElevation() * @see ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya() * @return the Instant of the latest zman shema according to the GRA. If the calculation can't be @@ -513,11 +511,11 @@ public Instant getSofZmanShmaGRA() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link - * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72() dawn} based on the opinion - * of the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to - * {@link #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link - * #getShaahZmanis72Minutes()} after {@link #getAlos72() dawn}. + * alos being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link + * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72Minutes() dawn} based on the opinion + * of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to + * {@link #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link + * #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 @@ -525,12 +523,12 @@ public Instant getSofZmanShmaGRA() { * {@link AstronomicalCalendar} documentation. * @see #isUseAstronomicalChatzosForOtherZmanim() * @see #getShaahZmanis72Minutes() - * @see #getAlos72() - * @see #getSofZmanShmaMGA() + * @see #getAlos72Minutes() + * @see #getSofZmanShmaMGA72Minutes() * @see #getSofZmanShma(Instant, Instant, boolean) */ public Instant getSofZmanShmaMGA72Minutes() { - return getSofZmanShma(getAlos72(), getTzais72(), true); + return getSofZmanShma(getAlos72Minutes(), getTzais72Minutes(), true); } /** @@ -549,7 +547,7 @@ public Instant getSofZmanShmaMGA72Minutes() { * and one where it does not set, a null will be returned See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Instant getTzais72() { + public Instant getTzais72Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS); } @@ -617,13 +615,13 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn * 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 - * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea + * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGra() + * @see ZmanimCalendar#getShaahZmanisGRA() * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ @@ -735,7 +733,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link #getShaahZmanisGra() shaos zmaniyos }(solar hours) after {@link #getSunriseWithElevation() sunrise} or + * {@link #getShaahZmanisGRA() shaos zmaniyos }(solar hours) after {@link #getSunriseWithElevation() 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 #getSeaLevelSunset() sea level @@ -743,7 +741,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { * {@link #isUseElevation()} setting). * * @see #getSofZmanTfila(Instant, Instant) - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() * @see ComprehensiveZmanimCalendar#getSofZmanTfilaBaalHatanya() * @return the Instant of the latest zman tfilah. 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 @@ -757,7 +755,7 @@ public Instant getSofZmanTfilaGRA() { /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link #getShaahZmanisMGA() shaos zmaniyos} (solar hours) after {@link #getAlos72()}, according to the + * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72Minutes()}, according to the * Magen Avraham (MGA). The day is calculated * from 72 minutes before {@link #getSunriseBasedOnElevationSetting()} to 72 minutes after {@link * #getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link #isUseElevation()} setting). @@ -768,10 +766,10 @@ public Instant getSofZmanTfilaGRA() { * {@link AstronomicalCalendar} documentation. * @see #getSofZmanTfila(Instant, Instan, boolean) * @see #getShaahZmanis72Minutes() - * @see #getAlos72() + * @see #getAlos72Minutes() */ public Instant getSofZmanTfilaMGA72Minutes() { - return getSofZmanTfila(getAlos72(), getTzais72(), true); + return getSofZmanTfila(getAlos72Minutes(), getTzais72Minutes(), true); } /** @@ -845,11 +843,11 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 * - * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or + * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according * to the GRA. Mincha gedola is the earliest * 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 + * {@link #getMinchaKetanaGRA() mincha ketana GRA} 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 #getSeaLevelSunset() sea level * 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) { * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. * * @see #getMinchaGedola(Instant, Instant) - * @see #getShaahZmanisGra() - * @see #getMinchaKetana() + * @see #getShaahZmanisGRA() + * @see #getMinchaKetanaGRA() * @see ComprehensiveZmanimCalendar#getMinchaGedolaBaalHatanya() * @return the Instant of the time of mincha gedola. 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 @@ -995,17 +993,17 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { /** * This method returns mincha ketana,the preferred earliest time to pray mincha in the * opinion of the Rambam and others, that is 9.5 - * * {@link #getShaahZmanisGra() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or + * * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or * {@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}. + * documentation on {@link #getMinchaGedolaGRA() mincha gedola}. * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} * setting. * * @see #getMinchaKetana(Instant, Instant) - * @see #getShaahZmanisGra() - * @see #getMinchaGedola() + * @see #getShaahZmanisGRA() + * @see #getMinchaGedolaGRA() * @see ComprehensiveZmanimCalendar#getMinchaKetanaBaalHatanya() * @return the Instant of the time of mincha ketana. 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 @@ -1075,7 +1073,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { } /** - * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGra() shaos zmaniyos} + * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGRA() shaos zmaniyos} * (solar hours) after {@link #getSunriseWithElevation() 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. @@ -1111,7 +1109,7 @@ public Instant getPlagHaminchaGRA() { * @see #getSeaLevelSunset() * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() */ - public long getShaahZmanisGra() { + public long getShaahZmanisGRA() { return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting()); } @@ -1131,7 +1129,7 @@ public long getShaahZmanisGra() { * {@link AstronomicalCalendar} documentation. */ public long getShaahZmanis72Minutes() { - return getTemporalHour(getAlos72(), getTzais72()); + return getTemporalHour(getAlos72Minutes(), getTzais72Minutes()); } /** From c5188fbf6671636362033ccc30e2ec5cd208fb4a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 14:18:57 +0300 Subject: [PATCH 051/121] ComprehensiveZmanimCalendar - Rename methods for consistency - getAlos120() -> getAlos120Minutes() - getAlos96() -> getAlos96Minutes() - getAlos90() -> getAlos90Minutes() - getAlos72() -> getAlos72Minutes() - getAlos60() -> getAlos60Minutes() - getTzais50() -> getTzais50Minutes() - getTzais60() -> getTzais60Minutes() - getTzais72() -> getTzais72Minutes() - getTzais90() -> getTzais90Minutes() - getTzais96() -> getTzais96Minutes() - getTzais120() -> getTzais120Minutes() - Multiple JavaDoc fixes for recent method renaming --- .../zmanim/ComprehensiveZmanimCalendar.java | 368 +++++++++--------- 1 file changed, 184 insertions(+), 184 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 4dacca12..54d5e27e 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -100,7 +100,7 @@ * Calculating this sof zman achila according to the GRA * is simplicity itself. *
      - * Instant sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGra() * 9);
      + * Instant sofZmanAchila = czc.getTimeOffset(czc.getSunrise(), czc.getShaahZmanisGRA() * 9); * *

      See documentation from the {@link ZmanimCalendar} parent class

      * @@ -234,8 +234,8 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { * * @see #getTzais19Point8Degrees() * @see #getAlos19Point8Degrees() - * @see #getAlos90() - * @see #getTzais90() + * @see #getAlos90Minutes() + * @see #getTzais90Minutes() * @see #ZENITH_19_DEGREES */ protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8; @@ -243,7 +243,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is - * based on the position of the sun {@link #getAlos120() 120 minutes} after sunset in Jerusalem around the equinox / equilux which * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since the level of darkness when the sun is * 26° and at a point when the level of darkness is long past the 18° point where the darkest point is reached, @@ -252,8 +252,8 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { * * @see #getAlos26Degrees() * @see #getTzais26Degrees() - * @see #getAlos120() - * @see #getTzais120() + * @see #getAlos120Minutes() + * @see #getTzais120Minutes() */ protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0; @@ -527,12 +527,12 @@ public long getShaahZmanis16Point1Degrees() { * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getAlos60() - * @see #getTzais60() + * @see #getAlos60Minutes() + * @see #getTzais60Minutes() * @see #getPlagHamincha60Minutes() */ public long getShaahZmanis60Minutes() { - return getTemporalHour(getAlos60(), getTzais60()); + return getTemporalHour(getAlos60Minutes(), getTzais60Minutes()); } /** @@ -567,7 +567,7 @@ public long getShaahZmanis72MinutesZmanis() { * {@link AstronomicalCalendar} documentation. */ public long getShaahZmanis90Minutes() { - return getTemporalHour(getAlos90(), getTzais90()); + return getTemporalHour(getAlos90Minutes(), getTzais90Minutes()); } /** @@ -691,7 +691,7 @@ public long getShaahZmanisAlos16Point1ToTzais3Point7() { * {@link AstronomicalCalendar} documentation. */ public long getShaahZmanis96Minutes() { - return getTemporalHour(getAlos96(), getTzais96()); + return getTemporalHour(getAlos96Minutes(), getTzais96Minutes()); } /** @@ -710,7 +710,7 @@ public long getShaahZmanis96Minutes() { * @see #getShaahZmanis26Degrees() */ public long getShaahZmanis120Minutes() { - return getTemporalHour(getAlos120(), getTzais120()); + return getTemporalHour(getAlos120Minutes(), getTzais120Minutes()); } /** @@ -754,8 +754,8 @@ public long getShaahZmanis120MinutesZmanis() { * {@link AstronomicalCalendar} documentation. * * @see #getShaahZmanis120MinutesZmanis() - * @see #getAlos120() - * @see #getTzais120() + * @see #getAlos120Minutes() + * @see #getTzais120Minutes() * @see #getPlagHamincha26Degrees() * @see #getPlagHamincha120Minutes() */ @@ -767,8 +767,8 @@ public Instant getPlagHamincha120MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is - * calculated as 10.75 hours after {@link #getAlos120() dawn 120 minutes}. The formula used is 10.75 {@link - * #getShaahZmanis120Minutes()} after {@link #getAlos120()}. Since the zman based on an extremely early + * calculated as 10.75 hours after {@link #getAlos120Minutes() dawn 120 minutes}. The formula used is 10.75 {@link + * #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes()}. Since the zman based on an extremely early * alos and a very late tzais, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -786,7 +786,7 @@ public Instant getPlagHamincha120MinutesZmanis() { */ @Deprecated (forRemoval=false) public Instant getPlagHamincha120Minutes() { - return getPlagHamincha(getAlos120(), getTzais120(), true); + return getPlagHamincha(getAlos120Minutes(), getTzais120Minutes(), true); } /** @@ -817,11 +817,11 @@ public Instant getPlagHamincha120Minutes() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. * documentation. * - * @see #getTzais60() + * @see #getTzais60Minutes() * @see #getPlagHamincha60Minutes() * @see #getShaahZmanis60Minutes() */ - public Instant getAlos60() { + public Instant getAlos60Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -60 * MINUTE_MILLIS); } @@ -832,7 +832,7 @@ public Instant getAlos60() { * 72 minutes which is 1/10th 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 #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link - * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGra()} * 1.2). This calculation is used in the calendars + * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * @@ -840,7 +840,7 @@ public Instant getAlos60() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() */ public Instant getAlos72Zmanis() { return getZmanisBasedOffset(-1.2); @@ -861,7 +861,7 @@ public Instant getAlos72Zmanis() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Instant getAlos96() { + public Instant getAlos96Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -96 * MINUTE_MILLIS); } @@ -873,13 +873,13 @@ public Instant getAlos96() { * mil is 90 minutes which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link * #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() * sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used - * is {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGra()} * 1.5). + * is {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.5). * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() */ public Instant getAlos90Zmanis() { return getZmanisBasedOffset(-1.5); @@ -893,13 +893,13 @@ public Instant getAlos90Zmanis() { * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSeaLevelSunrise() sea * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() * sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunriseBasedOnElevationSetting()} - * - ({@link #getShaahZmanisGra()} * 1.6). + * - ({@link #getShaahZmanisGRA()} * 1.6). * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() */ public Instant getAlos96Zmanis() { return getZmanisBasedOffset(-1.6); @@ -920,7 +920,7 @@ public Instant getAlos96Zmanis() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Instant getAlos90() { + public Instant getAlos90Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -90 * MINUTE_MILLIS); } @@ -946,11 +946,11 @@ public Instant getAlos90() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * - * @see #getTzais120() + * @see #getTzais120Minutes() * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) - public Instant getAlos120() { + public Instant getAlos120Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -120 * MINUTE_MILLIS); } @@ -962,7 +962,7 @@ public Instant getAlos120() { * 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 #getSeaLevelSunset() sea level sunset} or * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The - * actual calculation used is {@link #getSunriseWithElevation()} - ({@link #getShaahZmanisGra()} * 2). Since this time is + * actual calculation used is {@link #getSunriseWithElevation()} - ({@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 * performed during the day. @@ -976,7 +976,7 @@ public Instant getAlos120() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getAlos120() + * @see #getAlos120Minutes() * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) @@ -987,7 +987,7 @@ public Instant getAlos120Zmanis() { /** * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same - * calculation of {@link #getAlos120() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This + * calculation of {@link #getAlos120Minutes() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should @@ -1004,8 +1004,8 @@ public Instant getAlos120Zmanis() { * 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. * @see #ZENITH_26_DEGREES - * @see #getAlos120() - * @see #getTzais120() + * @see #getAlos120Minutes() + * @see #getTzais120Minutes() * @see #getTzais26Degrees() */ @Deprecated (forRemoval=false) @@ -1049,7 +1049,7 @@ public Instant getAlos19Degrees() { /** * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the * eastern geometric horizon before sunrise. This calculation is based on the same calculation of - * {@link #getAlos90() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation + * {@link #getAlos90Minutes() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}. @@ -1059,7 +1059,7 @@ public Instant getAlos19Degrees() { * 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. * @see #ZENITH_19_POINT_8 - * @see #getAlos90() + * @see #getAlos90Minutes() */ public Instant getAlos19Point8Degrees() { return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); @@ -1311,22 +1311,22 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 - * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to - * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 3 * - * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. + * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 + * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to + * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * + * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis90Minutes() - * @see #getAlos90() + * @see #getAlos90Minutes() * @see #isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA90Minutes() { - return getSofZmanShma(getAlos90(), getTzais90(), true); + return getSofZmanShma(getAlos90Minutes(), getTzais90Minutes(), true); } /** @@ -1354,22 +1354,22 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos96() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 - * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before - * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link - * #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. + * on alos being {@link #getAlos96Minutes() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 + * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before + * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link + * #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis96Minutes() - * @see #getAlos96() + * @see #getAlos96Minutes() * @see #isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA96Minutes() { - return getSofZmanShma(getAlos96(), getTzais96(), true); + return getSofZmanShma(getAlos96Minutes(), getTzais96Minutes(), true); } /** @@ -1426,11 +1426,11 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos120() 120} minutes or 1/6th of the day before {@link #getSunriseWithElevation() sunrise}. - * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() - * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 minutes - * before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of 3 - * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman that + * on alos being {@link #getAlos120Minutes() 120} minutes or 1/6th of the day before {@link #getSunriseWithElevation() sunrise}. + * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120Minutes() + * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120 minutes + * before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of 3 + * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman that * is very much a chumra. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -1438,11 +1438,11 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { * it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis120Minutes() - * @see #getAlos120() + * @see #getAlos120Minutes() * @see #isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA120Minutes() { - return getSofZmanShma(getAlos120(), getTzais120(), true); + return getSofZmanShma(getAlos120Minutes(), getTzais120Minutes(), true); } /** @@ -1581,21 +1581,21 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos90() dawn} of 90 minutes before sunrise to - * {@link #getTzais90() nightfall} of 90 minutes after sunset. This returns the time of 4 * - * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90() dawn}. + * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 + * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to + * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 * + * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}. * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis90Minutes() - * @see #getAlos90() + * @see #getAlos90Minutes() */ public Instant getSofZmanTfilaMGA90Minutes() { - return getSofZmanTfila(getAlos90(), getTzais90(), true); + return getSofZmanTfila(getAlos90Minutes(), getTzais90Minutes(), true); } /** @@ -1622,21 +1622,21 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos96() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos96() dawn} of 96 minutes before - * sunrise to {@link #getTzais96() nightfall} of 96 minutes after sunset. This returns the time of 4 * - * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96() dawn}. + * alos being {@link #getAlos96Minutes() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 + * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before + * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * + * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}. * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis96Minutes() - * @see #getAlos96() + * @see #getAlos96Minutes() */ public Instant getSofZmanTfilaMGA96Minutes() { - return getSofZmanTfila(getAlos96(), getTzais96(), true); + return getSofZmanTfila(getAlos96Minutes(), getTzais96Minutes(), true); } /** @@ -1663,11 +1663,11 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos120() 120} minutes before {@link #getSunriseWithElevation() sunrise} . This time is 4 - * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120() dawn} - * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120() dawn} of 120 - * minutes before sunrise to {@link #getTzais120() nightfall} of 120 minutes after sunset. This returns the time of - * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120() dawn}. This is an extremely early zman + * alos being {@link #getAlos120Minutes() 120} minutes before {@link #getSunriseWithElevation() sunrise} . This time is 4 + * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120Minutes() dawn} + * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120 + * minutes before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of + * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman * that is very much a chumra. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -1675,10 +1675,10 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { * it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * @see #getShaahZmanis120Minutes() - * @see #getAlos120() + * @see #getAlos120Minutes() */ public Instant getSofZmanTfilaMGA120Minutes() { - return getSofZmanTfila(getAlos120(), getTzais120(), true); + return getSofZmanTfila(getAlos120Minutes(), getTzais120Minutes(), true); } /** @@ -1700,11 +1700,11 @@ public Instant getSofZmanTfila2HoursBeforeChatzos() { /** * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos} - * and not 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} after {@link #getChatzos() chatzos} as + * and not 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} after {@link #getChatzos() chatzos} as * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when - * 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less than 30 minutes. See + * 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See * {@link #getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One - * should not use this time to start mincha before the standard {@link #getMinchaGedola() mincha gedola}. + * should not use this time to start mincha before the standard {@link #getMinchaGedolaGRA() mincha gedola}. * See Shulchan Aruch Orach Chayim 234:1 and * the Shaar Hatziyon seif katan ches. Since this calculation is a fixed 30 minutes of regular clock time after * chatzos, even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha @@ -1715,7 +1715,7 @@ public Instant getSofZmanTfila2HoursBeforeChatzos() { * 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 * {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedola() + * @see #getMinchaGedolaGRA() * @see #getMinchaGedolaGreaterThan30(Instant) * @see #getChatzos() * @see #isUseAstronomicalChatzos() @@ -1728,17 +1728,17 @@ public Instant getMinchaGedola30Minutes() { /** * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72 * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For - * more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is + * more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * - * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}. If {@link + * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}. If {@link * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} - * and {@link #getTzais72()} after {@link #getChatzos()}. + * and {@link #getTzais72Minutes()} after {@link #getChatzos()}. * - * @see #getAlos72() - * @see #getMinchaGedola() - * @see #getMinchaKetana() - * @see ZmanimCalendar#getMinchaGedola() + * @see #getAlos72Minutes() + * @see #getMinchaGedolaGRA() + * @see #getMinchaKetanaGRA() + * @see ZmanimCalendar#getMinchaGedolaGRA() * @see #getChatzos() * @see #isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the time of mincha gedola. If the calculation can't be computed such as @@ -1748,24 +1748,24 @@ public Instant getMinchaGedola30Minutes() { */ public Instant getMinchaGedola72Minutes() { if (isUseAstronomicalChatzosForOtherZmanim()) { - return getHalfDayBasedZman(getChatzos(), getTzais72(), 0.5); + return getHalfDayBasedZman(getChatzos(), getTzais72Minutes(), 0.5); } else { - return getMinchaGedola(getAlos72(), getTzais72(), true); + return getMinchaGedola(getAlos72Minutes(), getTzais72Minutes(), true); } } /** * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on - * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 6.5 + * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 6.5 * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. If {@link * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} * and {@link #getAlos16Point1Degrees()} after {@link #getChatzos()}. * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedola() - * @see #getMinchaKetana() + * @see #getMinchaGedolaGRA() + * @see #getMinchaKetanaGRA() * @return the Instant of the time of mincha gedola. 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. @@ -1789,7 +1789,7 @@ public Instant getMinchaGedola16Point1Degrees() { * #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(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola. - * For more information about mincha gedola see the documentation on {@link #getMinchaGedola() mincha gedola}. + * For more information about mincha gedola see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. * Since calculation of this zman involves chatzos that is offset from the center of the astronomical day, * {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here. * @return the Instant of the mincha gedola. If the calculation can't be computed such as northern and @@ -1813,7 +1813,7 @@ public Instant getMinchaGedolaAhavatShalom() { /** * This is a convenience method that returns the later of the minchaGedola passed in and {@link - * #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGra() shaah zmanis} is less + * #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} is less * than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise the minchaGedola passed in will be * returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha @@ -1821,11 +1821,11 @@ public Instant getMinchaGedolaAhavatShalom() { * * @param minchaGedola * the mincha gedola to be compared to {@link #getMinchaGedola30Minutes()}. - * @return the Instant of the later of {@link #getMinchaGedola()} and {@link #getMinchaGedola30Minutes()}. + * @return the Instant of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}. * 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedola() + * @see #getMinchaGedolaGRA() * @see #getMinchaGedola30Minutes() * @see #isUseAstronomicalChatzos() * @@ -1843,13 +1843,13 @@ public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) { * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the * opinion of the Rambam and others. For more information on - * this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is calculated as 9.5 + * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 9.5 * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 * * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. * * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedola() - * @see #getMinchaKetana() + * @see #getMinchaGedolaGRA() + * @see #getMinchaKetanaGRA() * @return the Instant 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 @@ -1867,7 +1867,7 @@ public Instant getMinchaKetana16Point1Degrees() { * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to * the opinion of the Rambam and others. For more information - * on this see the documentation on {@link #getMinchaKetana() mincha ketana}. + * on this see the documentation on {@link #getMinchaKetanaGRA() mincha ketana}. * * @return the Instant 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 @@ -1886,26 +1886,26 @@ public Instant getMinchaKetanaAhavatShalom() { * This method returns the time of mincha ketana according to the Magen Avraham with the day * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray * mincha according to the opinion of the Rambam - * and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. + * and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 * - * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos}. + * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}. * * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedola() - * @see #getMinchaKetana() + * @see #getMinchaGedolaGRA() + * @see #getMinchaKetanaGRA() * @return the Instant of the time of mincha ketana. 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 * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaKetana72Minutes() { - return getMinchaKetana(getAlos72(), getTzais72(), true); + return getMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true); } /** * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60 * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after - * {@link #getAlos60() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60()}. + * {@link #getAlos60Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60Minutes()}. * * @return the Instant of the time of plag hamincha. 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 @@ -1913,18 +1913,18 @@ public Instant getMinchaKetana72Minutes() { * {@link AstronomicalCalendar} documentation. * * @see #getShaahZmanis60Minutes() - * @see #getAlos60() - * @see #getTzais60() + * @see #getAlos60Minutes() + * @see #getTzais60Minutes() */ public Instant getPlagHamincha60Minutes() { - return getPlagHamincha(getAlos60(), getTzais60(), true); + return getPlagHamincha(getAlos60Minutes(), getTzais60Minutes(), true); } /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated - * as 10.75 hours after {@link #getAlos72() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after - * {@link #getAlos72()}. Since plag by this calculation can occur after sunset, it should only be used + * as 10.75 hours after {@link #getAlos72Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after + * {@link #getAlos72Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1941,14 +1941,14 @@ public Instant getPlagHamincha60Minutes() { */ @Deprecated (forRemoval=false) public Instant getPlagHamincha72Minutes() { - return getPlagHamincha(getAlos72(), getTzais72(), true); + return getPlagHamincha(getAlos72Minutes(), getTzais72Minutes(), true); } /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated - * as 10.75 hours after {@link #getAlos90() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after - * {@link #getAlos90()}. Since plag by this calculation can occur after sunset, it should only be used + * as 10.75 hours after {@link #getAlos90Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after + * {@link #getAlos90Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1965,14 +1965,14 @@ public Instant getPlagHamincha72Minutes() { */ @Deprecated (forRemoval=false) public Instant getPlagHamincha90Minutes() { - return getPlagHamincha(getAlos90(), getTzais90(), true); + return getPlagHamincha(getAlos90Minutes(), getTzais90Minutes(), true); } /** * This method should be used lechumra only and returns the time of plag hamincha according to the Magen * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75 - * hours after {@link #getAlos96() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after - * {@link #getAlos96()}. Since plag by this calculation can occur after sunset, it should only be used + * hours after {@link #getAlos96Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after + * {@link #getAlos96Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1988,7 +1988,7 @@ public Instant getPlagHamincha90Minutes() { */ @Deprecated (forRemoval=false) public Instant getPlagHamincha96Minutes() { - return getPlagHamincha(getAlos96(), getTzais96(), true); + return getPlagHamincha(getAlos96Minutes(), getTzais96Minutes(), true); } /** @@ -2664,7 +2664,7 @@ public Instant getTzaisGeonim9Point3Degrees() { * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * - * @see #getTzais60() + * @see #getTzais60Minutes() */ public Instant getTzaisGeonim9Point75Degrees() { return getSunsetOffsetByDegrees(ZENITH_9_POINT_75); @@ -2677,18 +2677,18 @@ public Instant getTzaisGeonim9Point75Degrees() { * >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 #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link - * #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60()}. + * #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60Minutes()}. * * @return the Instant 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, * and one where it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getAlos60() + * @see #getAlos60Minutes() * @see #getPlagHamincha60Minutes() * @see #getShaahZmanis60Minutes() */ - public Instant getTzais60() { + public Instant getTzais60Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS); } @@ -2792,16 +2792,16 @@ public Instant getSofZmanTfilaAteretTorah() { * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedola() mincha + * >Rambam and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}. * * @see #getAlos72Zmanis() * @see #getTzaisAteretTorah() * @see #getShaahZmanisAteretTorah() - * @see #getMinchaGedola() + * @see #getMinchaGedolaGRA() * @see #getMinchaKetanaAteretTorah() - * @see ZmanimCalendar#getMinchaGedola() + * @see ZmanimCalendar#getMinchaGedolaGRA() * @see #getAteretTorahSunsetOffset() * @see #setAteretTorahSunsetOffset(double) * @@ -2821,7 +2821,7 @@ public Instant getMinchaGedolaAteretTorah() { * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha * according to the opinion of the Rambam and others. - * For more information on this see the documentation on {@link #getMinchaGedola() mincha gedola}. This is + * For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}. * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}. * @@ -2830,8 +2830,8 @@ public Instant getMinchaGedolaAteretTorah() { * @see #getShaahZmanisAteretTorah() * @see #getAteretTorahSunsetOffset() * @see #setAteretTorahSunsetOffset(double) - * @see #getMinchaGedola() - * @see #getMinchaKetana() + * @see #getMinchaGedolaGRA() + * @see #getMinchaKetanaGRA() * @return the Instant of the time of mincha ketana. 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 @@ -2897,7 +2897,7 @@ public Instant getTzais72Zmanis() { * documentation. */ private Instant getZmanisBasedOffset(double hours) { - long shaahZmanis = getShaahZmanisGra(); + long shaahZmanis = getShaahZmanisGRA(); if (shaahZmanis == Long.MIN_VALUE || hours == 0) { return null; } @@ -2952,9 +2952,9 @@ public Instant getTzais96Zmanis() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getTzais19Point8Degrees() - * @see #getAlos90() + * @see #getAlos90Minutes() */ - public Instant getTzais90() { + public Instant getTzais90Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 90 * MINUTE_MILLIS); } @@ -2978,10 +2978,10 @@ public Instant getTzais90() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. * documentation. * @see #getTzais26Degrees() - * @see #getAlos120() + * @see #getAlos120Minutes() */ @Deprecated (forRemoval=false) - public Instant getTzais120() { + public Instant getTzais120Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 120 * MINUTE_MILLIS); } @@ -3001,7 +3001,7 @@ public Instant getTzais120() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * @see #getAlos120Zmanis() - * @see #getTzais120() + * @see #getTzais120Minutes() * @see #getTzais26Degrees() */ @Deprecated (forRemoval=false) @@ -3026,7 +3026,7 @@ public Instant getTzais120Zmanis() { * 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. - * @see #getTzais72() + * @see #getTzais72Minutes() * @see #getAlos16Point1Degrees() for more information on this calculation. */ public Instant getTzais16Point1Degrees() { @@ -3048,7 +3048,7 @@ public Instant getTzais16Point1Degrees() { * 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. - * @see #getTzais120() + * @see #getTzais120Minutes() * @see #getAlos26Degrees() */ @Deprecated (forRemoval=false) @@ -3076,7 +3076,7 @@ public Instant getTzais18Degrees() { * 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. - * @see #getTzais90() + * @see #getTzais90Minutes() * @see #getAlos19Point8Degrees() */ public Instant getTzais19Point8Degrees() { @@ -3086,15 +3086,15 @@ public Instant getTzais19Point8Degrees() { /** * A method to return tzais (dusk) calculated as 96 minutes after {@link #getSunsetWithElevation() sunset} or {@link * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how - * this is calculated see the comments on {@link #getAlos96()}. + * this is calculated see the comments on {@link #getAlos96Minutes()}. * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getAlos96() + * @see #getAlos96Minutes() */ - public Instant getTzais96() { + public Instant getTzais96Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS); } @@ -3379,7 +3379,7 @@ public Instant getZmanMolad() { /** * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between - * {@link ZmanimCalendar#getAlos72() alos} and {@link ZmanimCalendar#getTzais72() tzais}) it + * {@link ZmanimCalendar#getAlos72Minutes() alos} and {@link ZmanimCalendar#getTzais72Minutes() tzais}) it * return the next tzais. * * @param alos @@ -3434,13 +3434,13 @@ public Instant getTchilasZmanKidushLevana7Days() { * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the * GRA that the day is calculated from sunrise to sunset. - * This returns the time 4 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it + * This returns the time 4 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it * is not erev Pesach, a null will be returned. * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGra() + * @see ZmanimCalendar#getShaahZmanisGRA() * @see ZmanimCalendar#getSofZmanTfilaGRA() * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ @@ -3451,24 +3451,24 @@ public Instant getSofZmanAchilasChametzGRA() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link #getAlos72() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the - * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link #getShaahZmanisMGA() - * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is - * calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link #getTzais72() nightfall} of 72 minutes - * after sunset. This returns the time of 4 * {@link #getShaahZmanisMGA()} after {@link #getAlos72() dawn}. If it is not - * erev Pesach, a null will be returned. + * being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the + * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link + * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the + * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link + * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()} after + * {@link #getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. * * @return the Instant 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 * the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanisMGA() - * @see #getAlos72() + * @see #getShaahZmanis72Minutes() + * @see #getAlos72Minutes() * @see #getSofZmanTfilaMGA72Minutes() * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA72Minutes() { - return getSofZmanAchilasChametz(getAlos72(), getTzais72(), true); + return getSofZmanAchilasChametz(getAlos72Minutes(), getTzais72Minutes(), true); } /** @@ -3476,7 +3476,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { * opinion of the Magen Avraham (MGA) based on alos * being {@link #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the * {@link #getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link #getShaahZmanis72MinutesZmanis() - * shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of the MGA that the day is + * shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the opinion of the MGA that the day is * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not * erev Pesach, a null will be returned. @@ -3520,13 +3520,13 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { * 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 - * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGra()} after {@link #getSeaLevelSunrise() sea + * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGra() + * @see ZmanimCalendar#getShaahZmanisGRA() * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzGRA() { @@ -3536,21 +3536,21 @@ public Instant getSofZmanBiurChametzGRA() { /** * 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 #getSunriseWithElevation() sunrise}. This time is 5 {@link - * #getShaahZmanisMGA() shaos zmaniyos} (temporal hours) after {@link #getAlos72() dawn} based on the opinion of - * the MGA that the day is calculated from a {@link #getAlos72() dawn} of 72 minutes before sunrise to {@link - * #getTzais72() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanisMGA()} after - * {@link #getAlos72() dawn}. If it is not erev Pesach, a null will be returned. + * being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link + * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the opinion of + * the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link + * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanis72Minutes()} after + * {@link #getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanisMGA() - * @see #getAlos72() + * @see #getShaahZmanis72Minutes() + * @see #getAlos72Minutes() * @see #getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA72Minutes() { - return getSofZmanBiurChametz(getAlos72(), getTzais72(), true); + return getSofZmanBiurChametz(getAlos72Minutes(), getTzais72Minutes(), true); } /** @@ -3833,7 +3833,7 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos90() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() + * at alos defined as {@link #getAlos90Minutes() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3841,12 +3841,12 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * 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. - * @see #getAlos90() + * @see #getAlos90Minutes() * @see #getFixedLocalChatzos() * @see #getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos90(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzos(), 3); } /** @@ -3854,7 +3854,7 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos72() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() + * at alos defined as {@link #getAlos72Minutes() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3862,12 +3862,12 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * 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. - * @see #getAlos72() + * @see #getAlos72Minutes() * @see #getFixedLocalChatzos() * @see #getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos72(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzos(), 3); } /** @@ -3921,7 +3921,7 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaGedola() + * @see #getMinchaGedolaGRA() * @see #getFixedLocalChatzos() * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset */ @@ -3941,7 +3941,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaGedola() + * @see #getMinchaGedolaGRA() * @see #getFixedLocalChatzos() * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) @@ -3961,7 +3961,7 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getPlagHamincha() + * @see #getPlagHaminchaGRA() * @see #getFixedLocalChatzos() * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes @@ -3982,21 +3982,21 @@ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. */ - public Instant getTzais50() { + public Instant getTzais50Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 50 * MINUTE_MILLIS); } /** * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetana()} or is 9 * shaos zmaniyos (solar hours) after the start of + * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of * the day, calculated according to the GRA using a day starting at * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link #getShaahZmanisGra()} after {@link #getSunriseWithElevation() sunrise} or {@link + * The calculation used is 9 * {@link #getShaahZmanisGRA()} after {@link #getSunriseWithElevation() sunrise} or {@link * #getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the * Mechaber and Mishna Berurah 232 and 249:2. * - * @see #getShaahZmanisGra() + * @see #getShaahZmanisGRA() * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) * @see #isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the time of samuch lemincha ketana. If the calculation can't be computed such @@ -4011,9 +4011,9 @@ public Instant getSamuchLeMinchaKetanaGRA() { /** * * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetana()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based + * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based * on a day from and ending a day starting at {@link #getMinchaGedola16Point1Degrees() alos 16.1°} and ending - * at {@link #getTzais72() tzais 16.1°}. This is the time that eating or other activity can't begin prior to praying + * at {@link #getTzais72Minutes() tzais 16.1°}. This is the time that eating or other activity can't begin prior to praying * mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() * alos 16.1°}. See the Mechaber and Mishna * Berurah 232 and 249:2. @@ -4032,10 +4032,10 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() { /** * * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetana()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based - * on a day from and ending a day starting at {@link #getAlos72() alos 72 minutes} and ending at {@link #getTzais72() + * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based + * on a day from and ending a day starting at {@link #getAlos72Minutes() alos 72 minutes} and ending at {@link #getTzais72Minutes() * tzais 72 minutes}. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72() alos 72 minutes}. See the alos 72 minutes}. See the Mechaber and Mishna Berurah 232 and 249:2. * @@ -4047,7 +4047,7 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() { * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSamuchLeMinchaKetana72Minutes() { - return getSamuchLeMinchaKetana(getAlos72(), getTzais72(), true); + return getSamuchLeMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true); } /** From faae2fb1aa84de3a51df39ab11bb4418dfc0a957 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 14:27:02 +0300 Subject: [PATCH 052/121] Update RegressionTestFileWriter for recent method renaming --- .../hebrewcalendar/RegressionTestFileWriter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index 77a442e9..1e9c1c3a 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -49,9 +49,9 @@ public static void main(String[] args) throws IOException { zcal.getShaahZmanisAteretTorah(), zcal.getShaahZmanisAlos16Point1ToTzais3Point8(), zcal.getShaahZmanisAlos16Point1ToTzais3Point7(), zcal.getShaahZmanis96Minutes(), zcal.getShaahZmanis120Minutes(), zcal.getShaahZmanis120MinutesZmanis(), - zcal.getPlagHamincha120MinutesZmanis(), zcal.getPlagHamincha120Minutes(), zcal.getAlos60(), - zcal.getAlos72Zmanis(), zcal.getAlos96(), zcal.getAlos90Zmanis(), zcal.getAlos96Zmanis(), - zcal.getAlos90(), zcal.getAlos120(), zcal.getAlos120Zmanis(), zcal.getAlos26Degrees(), + zcal.getPlagHamincha120MinutesZmanis(), zcal.getPlagHamincha120Minutes(), zcal.getAlos60Minutes(), + zcal.getAlos72Zmanis(), zcal.getAlos96Minutes(), zcal.getAlos90Zmanis(), zcal.getAlos96Zmanis(), + zcal.getAlos90Minutes(), zcal.getAlos120Minutes(), zcal.getAlos120Zmanis(), zcal.getAlos26Degrees(), zcal.getAlos18Degrees(), zcal.getAlos19Degrees(), zcal.getAlos19Point8Degrees(), zcal.getAlos16Point1Degrees(), zcal.getMisheyakir11Point5Degrees(), zcal.getMisheyakir11Degrees(), zcal.getMisheyakir10Point2Degrees(), zcal.getMisheyakir7Point65Degrees(), @@ -89,13 +89,13 @@ public static void main(String[] args) throws IOException { zcal.getTzaisGeonim4Point8Degrees(), zcal.getTzaisGeonim6Point45Degrees(), zcal.getTzaisGeonim7Point083Degrees(), zcal.getTzaisGeonim7Point67Degrees(), zcal.getTzaisGeonim8Point5Degrees(), zcal.getTzaisGeonim9Point3Degrees(), - zcal.getTzaisGeonim9Point75Degrees(), zcal.getTzais60(), zcal.getTzaisAteretTorah(), + zcal.getTzaisGeonim9Point75Degrees(), zcal.getTzais60Minutes(), zcal.getTzaisAteretTorah(), zcal.getSofZmanShmaAteretTorah(), zcal.getSofZmanTfilaAteretTorah(), zcal.getMinchaGedolaAteretTorah(), zcal.getMinchaKetanaAteretTorah(), zcal.getPlagHaminchaAteretTorah(), zcal.getTzais72Zmanis(), zcal.getTzais90Zmanis(), - zcal.getTzais96Zmanis(), zcal.getTzais90(), zcal.getTzais120(), zcal.getTzais120Zmanis(), + zcal.getTzais96Zmanis(), zcal.getTzais90Minutes(), zcal.getTzais120(), zcal.getTzais120Zmanis(), zcal.getTzais16Point1Degrees(), zcal.getTzais26Degrees(), zcal.getTzais18Degrees(), - zcal.getTzais19Point8Degrees(), zcal.getTzais96(), zcal.getFixedLocalChatzos(), + zcal.getTzais19Point8Degrees(), zcal.getTzais96Minutes(), zcal.getFixedLocalChatzos(), zcal.getSofZmanKidushLevanaBetweenMoldos(), zcal.getSofZmanKidushLevana15Days(), zcal.getTchilasZmanKidushLevana3Days(), zcal.getZmanMolad(), zcal.getTchilasZmanKidushLevana7Days(), zcal.getSofZmanAchilasChametzGRA(), zcal.getSofZmanAchilasChametzMGA72Minutes(), @@ -114,7 +114,7 @@ public static void main(String[] args) throws IOException { zcal.getSofZmanTfilaGRASunriseToFixedLocalChatzos(), zcal.getMinchaGedolaGRAFixedLocalChatzos30Minutes(), zcal.getMinchaKetanaGRAFixedLocalChatzosToSunset(), - zcal.getPlagHaminchaGRAFixedLocalChatzosToSunset(), zcal.getTzais50(), + zcal.getPlagHaminchaGRAFixedLocalChatzosToSunset(), zcal.getTzais50Minutes(), zcal.getSamuchLeMinchaKetanaGRA(), zcal.getSamuchLeMinchaKetana16Point1Degrees(), zcal.getSamuchLeMinchaKetana72Minutes())); //deprecated From 242b0251d50b268288708bc6c05afa3ea072815a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 14:29:38 +0300 Subject: [PATCH 053/121] fix broken RegressionTestFileWriter from method renaming --- .../zmanim/hebrewcalendar/RegressionTestFileWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index 1e9c1c3a..93f719c0 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -93,7 +93,7 @@ public static void main(String[] args) throws IOException { zcal.getSofZmanShmaAteretTorah(), zcal.getSofZmanTfilaAteretTorah(), zcal.getMinchaGedolaAteretTorah(), zcal.getMinchaKetanaAteretTorah(), zcal.getPlagHaminchaAteretTorah(), zcal.getTzais72Zmanis(), zcal.getTzais90Zmanis(), - zcal.getTzais96Zmanis(), zcal.getTzais90Minutes(), zcal.getTzais120(), zcal.getTzais120Zmanis(), + zcal.getTzais96Zmanis(), zcal.getTzais90Minutes(), zcal.getTzais120Minutes(), zcal.getTzais120Zmanis(), zcal.getTzais16Point1Degrees(), zcal.getTzais26Degrees(), zcal.getTzais18Degrees(), zcal.getTzais19Point8Degrees(), zcal.getTzais96Minutes(), zcal.getFixedLocalChatzos(), zcal.getSofZmanKidushLevanaBetweenMoldos(), zcal.getSofZmanKidushLevana15Days(), From c789a766f4801498fe4c195392f9b2a1161efb69 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 6 Apr 2026 14:32:18 +0300 Subject: [PATCH 054/121] Zman JavaDoc fixes for Gra -> GRA method name change --- src/main/java/com/kosherjava/zmanim/util/Zman.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/Zman.java b/src/main/java/com/kosherjava/zmanim/util/Zman.java index cd94e654..f8699166 100644 --- a/src/main/java/com/kosherjava/zmanim/util/Zman.java +++ b/src/main/java/com/kosherjava/zmanim/util/Zman.java @@ -74,7 +74,7 @@ public class Zman { /** * The duration if the zman is a {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} (or the various - * shaah zmanis base times such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGra() shaah Zmanis GRA} or + * shaah zmanis base times such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGRA() shaah Zmanis GRA} or * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}). */ private long duration; @@ -116,7 +116,7 @@ public Zman(Instant instant, GeoLocation geoLocation, String label) { /** * The constructor setting a duration based zman such as * {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times such as - * {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or + * {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGRA() shaah zmanis GRA} or * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah Zmanis 16.1°}) and label. * @param duration a duration based zman such as ({@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour()} * @param label the label of the zman such as "Shaah Zmanis GRA". @@ -163,7 +163,7 @@ public void setGeoLocation(GeoLocation geoLocation) { /** * Returns a duration based zman such as {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} - * (or the various shaah zmanis times such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} + * (or the various shaah zmanis times such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGRA() shaah zmanis GRA} * or {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). * @return the duration based zman. * @see #setDuration(long) @@ -174,7 +174,7 @@ public long getDuration() { /** * Sets a duration based zman such as {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} - * (or the various shaah zmanis times as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or + * (or the various shaah zmanis times as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGRA() shaah zmanis GRA} or * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). * @param duration duration based zman such as {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour()}. * @see #getDuration() @@ -254,7 +254,7 @@ public int compare(Zman zman1, Zman zman2) { /** * A {@link Comparator} that will compare and sort duration based zmanim such as * {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour} (or the various shaah zmanis times - * such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGra() shaah zmanis GRA} or + * such as {@link com.kosherjava.zmanim.ZmanimCalendar#getShaahZmanisGRA() shaah zmanis GRA} or * {@link com.kosherjava.zmanim.ComprehensiveZmanimCalendar#getShaahZmanis16Point1Degrees() shaah zmanis 16.1°}). Returns a negative * integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. * Please note that this class will sort cases where {@code Zman} is a null. From e88d6f76befe08700bff49778dee57ed98c198d4 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 7 Apr 2026 14:15:56 +0300 Subject: [PATCH 055/121] Make public and move getZmanisBasedOffset(double) to parent ZmanimCalendar --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 94071ebd..93f09a3b 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -1112,6 +1112,40 @@ public Instant getPlagHaminchaGRA() { public long getShaahZmanisGRA() { return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting()); } + + /** + * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. As an + * example passing 1.5 to this method as done in the {@link ComprehensiveZmanimCalendar#getTzais90Zmanis()} will return + * the time 90 minutes zmaniyos after {@link #getSunsetBasedOnElevationSetting()}, a zman known as + * the achtel zman or 1/8th of the length of the day (12 * 60 = 720-minute day / 8 = 90 or 1.5 hours + * zmaniyos) after sunset. + * @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 + * is sunrise or sunset based). + * @return the Instant 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, + * a null will be returned. A null will also be returned if 0 is passed in, since we can't + * tell if it is sunrise or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} + * documentation. + * @see ComprehensiveZmanimCalendar#getTzais72Zmanis() + * @see ComprehensiveZmanimCalendar#getTzais90Zmanis() + * @see ...Zmanis() based zmanim + * in the ComprehensiveZmanimCalendar. + */ + public Instant getZmanisBasedOffset(double hours) { + long shaahZmanis = getShaahZmanisGRA(); + if (shaahZmanis == Long.MIN_VALUE || hours == 0) { + return null; + } + + if (hours > 0) { + return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours)); + } else { + return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours)); + } + } /** * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Date: Tue, 7 Apr 2026 14:16:52 +0300 Subject: [PATCH 056/121] Make public and move getZmanisBasedOffset(double) to parent ZmanimCalendar --- .../zmanim/ComprehensiveZmanimCalendar.java | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 54d5e27e..11bf0e78 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -2882,37 +2882,11 @@ public Instant getPlagHaminchaAteretTorah() { public Instant getTzais72Zmanis() { return getZmanisBasedOffset(1.2); } - - /** - * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. - * @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 - * is sunrise or sunset based). - * @return the Instant 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, - * a null will be returned. A null will also be returned if 0 is passed in, since we can't - * tell if it is sunrise or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} - * documentation. - */ - private Instant getZmanisBasedOffset(double hours) { - long shaahZmanis = getShaahZmanisGRA(); - if (shaahZmanis == Long.MIN_VALUE || hours == 0) { - return null; - } - - if (hours > 0) { - return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours)); - } else { - return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours)); - } - } /** * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth) - * zman. + * zman used in various kehilos. * * @return the Instant 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, From 97ffd36d324f284ce6fd02c84f5e4c52a26661c5 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 16:57:53 -0400 Subject: [PATCH 057/121] Increase getTzaisGeonim4Point61Degrees() to getTzaisGeonim4Point65Degrees() The 4.61 degree calculation was too early. Also update some JavaDocs (including removing redundant ones on some constants that are explained in methods). --- .../zmanim/ComprehensiveZmanimCalendar.java | 197 +++++++++--------- 1 file changed, 98 insertions(+), 99 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 11bf0e78..a8f4086a 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -109,25 +109,13 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** - * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the - * time it takes to walk 3/4 of a mil at 18 minutes a mil, or 13.5 minutes after sunset. The sun is 3.7° below - * {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. - * + * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). * @see #getTzaisGeonim3Point7Degrees() */ protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7; /** - * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais (nightfall) based on the opinion of the Geonim that tzais is the - * time it takes to walk 3/4 of a mil at 18 minutes a mil, or 13.5 minutes after sunset. The sun is 3.8° below - * {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. - * + * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). * @see #getTzaisGeonim3Point8Degrees() */ protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8; @@ -145,17 +133,7 @@ public class ComprehensiveZmanimCalendar 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 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 and the Tenuvas Sadeh. - * 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 - * Exactly. The actual position of the sun 30 minutes after sunset in Jerusalem at the equilux is 7.205° and - * 7.199° at the equinox. See Hazmanim Bahalacha vol 2, pages 520-521 for details. - * @todo Hyperlink the proper sources. + * 7°5' (7° and 5 minutes). * * @see #getTzaisGeonim7Point083Degrees() * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() @@ -270,21 +248,20 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { protected static final double ZENITH_4_POINT_37 = GEOMETRIC_ZENITH + 4.37; /** - * The zenith of 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * The zenith of 4.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24-minute mil) in * Jerusalem around the equinox - * / equilux, which calculates to 4.61° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * / equilux, which calculates to 4.65° below {@link #GEOMETRIC_ZENITH geometric zenith}. * @todo add documentation links * - * @see #getTzaisGeonim4Point61Degrees() + * @see #getTzaisGeonim4Point65Degrees() */ - protected static final double ZENITH_4_POINT_61 = GEOMETRIC_ZENITH + 4.61; + protected static final double ZENITH_4_POINT_65 = GEOMETRIC_ZENITH + 4.65; /** * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @todo Add more documentation. * @see #getTzaisGeonim4Point8Degrees() */ protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8; @@ -327,8 +304,10 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { * height of the summer solstice, this zman is 28 minutes after shkiah. This computes to 6.45° * below {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 it the commonly - * used zman in Israel. It should be noted that this differs from the 6.1°/6.2° calculation for - * Rabbi Tucazinsky's time as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515). + * used zman in Israel. It is also used in the Luach Itim + * Lebinah It should be noted that this differs from the 6.1°/6.2° calculation for Rabbi Tucazinsky's time + * as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515). + * @todo explain the contradiction between 28 and 31 minutes. * * @see #getTzaisGeonim6Point45Degrees() */ @@ -793,24 +772,21 @@ public Instant getPlagHamincha120Minutes() { * Method to return alos (dawn) calculated as 60 minutes before {@link #getSunriseWithElevation() sunrise} or * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is the * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the - * Chavas Yair in the Mekor Chaim, Orach Chaim Ch. 90, - * though the Mekor Chaim in Ch. 58 and in the Chut Hashani Ch. 97 states that a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. - * Also see the mil at 15 minutes a mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch. 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Ch. 97 states that a person walks 3 and a + * 1/3 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 Maharik Ch. 173 where the questioner quoting the - * Ra'avan is of the opinion that the time to walk a - * mil is 15 minutes (5 mil in a little over an hour). There are many who believe that there is a - * ta'us sofer (scribe's error) in the Ra'avan, and it should 4 mil in a little over an hour, or an - * 18-minute mil. Time based offset calculations are based on the opinion of the - * Rishonim who stated that the time of the neshef - * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to - * walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that is a - * degree-based calculation based on 60 minutes. + * >Divrei Malkiel Vol. 4, Ch. 20, page 34) who mentions the + * 15 minute mil lechumra by baking matzos. Also see the Maharik Ch. 173 where the questioner quoting + * the Ra'avan is of the opinion that the time to walk a mil is + * 15 minutes (5 mil in a little over an hour). There are many who believe that there is a ta'us sofer (scribe's + * error) in the Ra'avan, and it should 4 mil in a little over an hour, or an 18-minute mil. Time based offset calculations are + * based on the opinion of the Rishonim who stated that the time + * of the neshef (time between dawn and sunrise) does not vary by the time of year or location but purely depends on + * the time it takes to walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that + * is a degree-based calculation based on 60 minutes. * * @return the Instant 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, @@ -830,8 +806,8 @@ public Instant getAlos60Minutes() { * 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 day being from {@link #getSeaLevelSunrise() sea - * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() - * sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link + * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link + * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. @@ -869,11 +845,11 @@ public Instant getAlos96Minutes() { * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link * #isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 - * mil is 90 minutes which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link - * #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() - * sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used - * is {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.5). + * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil so the time for 4 mil is 90 minutes + * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} + * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link + * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is + * {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.5). * * @return the Instant 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, @@ -889,11 +865,11 @@ public Instant getAlos90Zmanis() { * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link * #isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 - * minutes which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSeaLevelSunrise() sea - * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() - * sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link #getSunriseBasedOnElevationSetting()} - * - ({@link #getShaahZmanisGRA()} * 1.6). + * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil so the time for 4 mil is 96 minutes + * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} + * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link + * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link + * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.6). * * @return the Instant 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, @@ -907,13 +883,12 @@ public Instant getAlos96Zmanis() { /** * Method to return alos (dawn) calculated using 90 minutes before {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) based - * on the time to walk the distance of 4 mil at 22.5 minutes a - * mil. Time-based offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef - * (time between dawn and sunrise) does not vary by the time of year or location but purely depends on the time it - * takes to walk the distance of 4 mil. + * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) based on the time + * to walk the distance of 4 mil at + * 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between + * dawn and sunrise) does not vary by the time of year or location but purely depends on the time it takes to walk the + * distance of 4 mil. * * @return the Instant 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, @@ -926,8 +901,8 @@ public Instant getAlos90Minutes() { /** * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes - * before {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link - * #isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a * mil. Time based offset calculations for alos are based on the* opinion of the Rishonim who stated that the time of the neshef (time @@ -959,13 +934,12 @@ public Instant getAlos120Minutes() { * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunriseWithElevation() sunrise} or {@link * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based * on a 24-minute 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 #getSeaLevelSunset() sea level sunset} or - * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The - * actual calculation used is {@link #getSunriseWithElevation()} - ({@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 - * performed during the day. + * 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 #getSeaLevelSunset() sea level sunset} or {@link + * #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link + * #isUseElevation()}. The actual calculation used is {@link #getSunriseWithElevation()} - ({@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 performed during the day. * * @deprecated This method should be used lechumra only (such as stopping to eat at this time on a fast day), * since it returns a very early time, and if used lekula can result in doing mitzvos hayom @@ -2341,7 +2315,7 @@ public Instant getBainHashmashosYereim18Minutes() { * zmanim. The 0.5166° refraction is also used by the Luach Itim * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested * in the upcoming 8th edition of the zmanim Kehilchasam. For more details, see the article The Yereim's Bein Hashmashos. + * "https://kosherjava.com/2020/12/07/the-yereims-bein-hashmashos/">The Yereim's Bain Hashmashos. * * @todo recalculate based on equinox/equilux * @return the Instant of the sun's position 3.05° minutes before sunset. If the calculation can't @@ -2446,23 +2420,36 @@ public Instant getBainHashmashosYereim2Point1Degrees() { } /** - * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the - * sun's position at {@link #ZENITH_3_POINT_7 3.7°} below the western horizon. + * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the sun's + * position at {@link #ZENITH_3_POINT_7 3.7°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°), calculated + * as the position of the sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a mil at 18 minutes a mil, or 13.5 minutes + * after sunset. The sun is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. This does + * not cover the time it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi). * * @return the Instant representing the time when the sun is 3.7° below sea level. * @see #ZENITH_3_POINT_7 */ + @Deprecated (forRemoval=false) public Instant getTzaisGeonim3Point7Degrees() { return getSunsetOffsetByDegrees(ZENITH_3_POINT_7); } /** - * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the - * sun's position at {@link #ZENITH_3_POINT_8 3.8°} below the western horizon. + * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the sun's + * position at {@link #ZENITH_3_POINT_7 3.8°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°), calculated + * as the position of the sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a mil at 18 minutes a mil, plus 30 seconds + * for the time it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi). With this being + * on an 18-minutes mil, 49 amos would take 26.5, rounded to 30 seconds), for a total of 14 minutes after sunset. The sun is + * {@link #ZENITH_3_POINT_8 3.8°} below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. * * @return the Instant representing the time when the sun is 3.8° below sea level. * @see #ZENITH_3_POINT_8 */ + @Deprecated (forRemoval=false) public Instant getTzaisGeonim3Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_3_POINT_8); } @@ -2485,18 +2472,20 @@ public Instant getTzaisGeonim5Point95Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 * of a mil based on a - * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_61 4.61°} below the + * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_65 4.65°} below the * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance. * - * @return the Instant representing the time when the sun is 4.61° below sea level. If the calculation + * @return the Instant representing the time when the sun is 4.65° below sea level. 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. - * @see #ZENITH_4_POINT_61 + * @see #ZENITH_4_POINT_65 + * @see #getTzaisGeonim4Point8Degrees() */ - public Instant getTzaisGeonim4Point61Degrees() { - return getSunsetOffsetByDegrees(ZENITH_4_POINT_61); + @Deprecated (forRemoval=false) + public Instant getTzaisGeonim4Point65Degrees() { + return getSunsetOffsetByDegrees(ZENITH_4_POINT_65); } /** @@ -2512,6 +2501,7 @@ public Instant getTzaisGeonim4Point61Degrees() { * documentation. * @see #ZENITH_4_POINT_37 */ + @Deprecated (forRemoval=false) public Instant getTzaisGeonim4Point37Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_37); } @@ -2536,11 +2526,22 @@ public Instant 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 a very early zman and should not be relied on without Rabbinical guidance. - * @todo Additional documentation needed. + * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as the + * sun's position below the horizon at a time of 18.6 minutes after sunset. This is calculated as 3/4 of a 24-minute + * mil, plus 0.6 minutes for the + * time to walk 49 amos for bain hashmashos of Rav Yosi (with this zman based on a 24-minutes mil, 49 + * amos would take 36 seconds to walk), for a total of 18.6 minutes after sunset. This calculates to the sun's position + * at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rav Yechiel Michel Shlezinger's sefer Aizehu Bain Hashmashos, Rabbi Yehuda (Leo) Levi's + * calculations in Zmanei Hayom BaHalacha p. 37. + * At this point, 3 medium sized stars are visible to a non-expert with good vision with effort. An expert knowing where to + * look can see the 3 medium stars as early as 15 minutes after sunset. This is explained in detail in Hazmanim Bahalacha vol + * II, ch. 41, no. 6 (p. 372-373, ch. 47, no. 11-12 (p. 491-493) where it is clear that medium sized stars would be visible as + * early as 14 minutes after sunset (13.5 minutes for 3/4 of an 18 minute Mil, plus 0.5 minutes for bain Hashmashos + * of Rav Yosi) to an expert. + * This is an early zman for tzaisand should not be relied on without Rabbinical guidance. * * @return the Instant representing the time when the sun is 4.8° below sea level. If the calculation * can't be computed such as northern and southern locations even south of the Arctic Circle and north of @@ -2553,7 +2554,6 @@ public Instant getTzaisGeonim4Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_8); } - /** * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by * Rabbi Yechiel Michel Tucazinsky. It is @@ -2561,7 +2561,7 @@ public Instant getTzaisGeonim4Point8Degrees() { * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This * computes to 6.45° below the western horizon. - * @todo Additional documentation details needed. + * @todo Additional documentation details needed and explain 28/31 minute contradiction. * * @return the Instant representing the time when the sun is 6.45° below sea level. If the * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and @@ -2581,7 +2581,7 @@ public Instant getTzaisGeonim6Point45Degrees() { * 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. - * This calendar was very popular in Europe, and many other calendars based their time on it. tzais time on it. Rav Dovid Tzvi Hoffman in his * Sh"Ut Melamed Leho'il in an exchange of letters with Baruch Cohn in Orach Chaim 30 agreed to this zman (page 36), @@ -2616,10 +2616,9 @@ public Instant getTzaisGeonim7Point083Degrees() { * href="https://www.worldcat.org/oclc/179728985">The radiance of Shabbos as the earliest zman for New York. * This zman is also listed in the Divrei * Shalom Vol. III, chapter 75, and Bais Av"i - * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177 (FIXME - could not - * be located). Since this zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based - * calculation to Rabbi Rabbi Shmuel Kamenetsky who agreed - * to it. + * Vol. III, chapter 117. This zman is also listed in the Divrei Shalom etc. chapter 177. Since this + * zman depends on the level of light, Rabbi Yaakov Shakow presented this degree-based calculation to Rabbi + * Rabbi Shmuel Kamenetsky who agreed to it. * @todo add hyperlinks to source of Divrei Shalom once it is located. * @return the Instant representing the time when the sun is 7.67° below sea level. If the * calculation can't be computed such as northern and southern locations even south of the Arctic Circle and From c20a8f42a37a590d2613080f55c930d86cc34df1 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 17:43:17 -0400 Subject: [PATCH 058/121] Update JewishDate.java Add minusMonths(int) and minusYears(int, boolean), rename some methods Match Java LocalDate in renaming addDays to plusDays, addMonths to plusMonths and addYears to plusYears. --- .../zmanim/hebrewcalendar/JewishDate.java | 102 +++++++++++++++--- 1 file changed, 86 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 33798b73..577c9d5d 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -761,7 +761,7 @@ private static int jewishDateToAbsDate(int year, int month, int dayOfMonth) { public JewishDate getMolad() { JewishDate moladDate = new JewishDate(getChalakimSinceMoladTohu()); if (moladDate.getMoladHours() >= 6) { - moladDate.addDays(1); + moladDate.plusDays(1); } moladDate.setMoladHours((moladDate.getMoladHours() + 18) % 24); return moladDate; @@ -1027,10 +1027,11 @@ public void resetDate() { /** * Subtracts the number of days passed in from the currently set date. * @param days the number of days to subtract. + * @see plusDays(int) */ public void minusDays(int days){ if (days < 1) { - throw new IllegalArgumentException("the amount of days to subtract has to be greater than zero."); + throw new IllegalArgumentException("The number of days to subtract must be greater than zero."); } setAbsDate(getAbsDate() - days); @@ -1039,21 +1040,25 @@ public void minusDays(int days){ /** * Add the number of days passed in to the currently set date. * @param days the number of days to add. + * + * @see minusDays(int) */ - public void addDays(int days){ + public void plusDays(int days){ if (days < 1) { - throw new IllegalArgumentException("the amount of days to add has to be greater than zero."); + throw new IllegalArgumentException("The number of days to add must be greater than zero. Use minusDays(int) to subtract days."); } setAbsDate(getAbsDate() + days); } /** - * Add the number of months passed in to the currently set date. + * Add the number of months passed in to the currently set date. If the day of the month prior to addition is the 30th, and + * the target month only has 29 days, the date will be clamped to the 29th. * @param months the number of months to add. + * @see minusMonths(int) */ - public void addMonths(int months){ + public void plusMonths(int months){ if (months < 1) { - throw new IllegalArgumentException("the amount of months to add has to be greater than zero."); + throw new IllegalArgumentException("The number of months to add must be greater than zero. Use minusMonths(int) to subtract months."); } int year = getJewishYear(); int month = getJewishMonth(); @@ -1072,21 +1077,51 @@ public void addMonths(int months){ setJewishDate(year, month, day); } + /** + * Subtracts the number of months passed in to the currently set date. If the day of the month prior to subtraction + * is the 30th, and the target month only has 29 days, the date will be clamped to the 29th. + * @param months the number of months to add. + * @see plusMonths(int) + */ + public void minusMonths(int months){ + if (months < 1) { + throw new IllegalArgumentException("The number of months to subtract must be greater than zero."); + } + int year = getJewishYear(); + int month = getJewishMonth(); + for (int i = 0; i < months; i++) { + if (month == TISHREI) { + month = ELUL; + year--; + } else if ((! isJewishLeapYear(year) && month == ADAR) + || (isJewishLeapYear(year) && month == ADAR_II)){ + month = SHEVAT; + } else { + month--; + } + } + int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,year)); + setJewishDate(year, month, day); + } + /** * Add the number of years passed in to the currently set date. If the current month is Adar on a non-leap year, - * passing true to the useAdarAlephForLeapYear parameter will set the month to Adar I, and passing - * false will forward it to Adar II. The useAdarAlephForLeapYear will be ignored if the current month - * is not Adar on a non-leap year. If the current year is a leap year and it is currently Adar I or Adar II and the - * year it is being increased to is also a leap year, the same Adar will be used. If it is being increased to a - * non-leap year, the month will be set to Adar. + * and the year after the addition will be a leap year, passing true to the useAdarAlephForLeapYear + * parameter will set the month to Adar I, and passing false will forward it to Adar II. The + * useAdarAlephForLeapYear will be ignored if the month is not Adar. If the current year is a leap year and it is + * currently Adar I or Adar II and the year it is being increased to is also a leap year, the same Adar will be used. + * If it is being increased to a non-leap year, the month will be set to Adar. It is important to keep in mind when + * calculating yahrzits that are on the 30th and the target year only has 29 days, that the date will be set + * to the 29th, something that may nt be desirable. * @param years the number of years to add * @param useAdarAlephForLeapYear if set to true and the current month is Adar on a non-leap year and it is being moved * forward to a leap year, it will be set to Adar I, and if set to false it will set to Adar II. This will be - * ignored if the month is not set to Adar on a non-leap year. + * ignored if the month is not set to Adar. + * @see minusYears(int, boolean) */ - public void addYears(int years, boolean useAdarAlephForLeapYear){ + public void plusYears(int years, boolean useAdarAlephForLeapYear){ if (years < 1) { - throw new IllegalArgumentException("the amount of years to add has to be greater than zero. Use minusYears(int, boolean)"); + throw new IllegalArgumentException("The number of years to add has to be greater than zero. Use minusYears(int, boolean) to subtract years."); } int targetYear = getJewishYear() + years; // If we are in the month of Adar in a non-leap year and we are skipping @@ -1108,7 +1143,42 @@ public void addYears(int years, boolean useAdarAlephForLeapYear){ setJewishDate(targetYear, month, day); } - + /** + * Subtract the number of years passed in to the currently set date. If the current month is Adar on a non-leap year, + * and the year after the subtraction will be a leap year, passing true to the useAdarAlephForLeapYear + * parameter will set the month to Adar I, and passing false will set it to Adar II. The + * useAdarAlephForLeapYear will be ignored if the current month is not Adar on a non-leap year. If the current year + * is a leap year and it is currently Adar I or Adar II and the year it is being decreased to is also a leap year, + * the same Adar will be used. If it is being decreased to a non-leap year, the month will be set to Adar. + * @param years the number of years to subtract + * @param useAdarAlephForLeapYear if set to true and the current month is Adar on a non-leap year and it is being + * subtracted to a leap year, it will be set to Adar I, and if set to false it will set to Adar II. This will + * be ignored if the month is not set to Adar. + * @see plusYears(int, boolean) + */ + public void minusYears(int years, boolean useAdarAlephForLeapYear){ + if (years < 1) { + throw new IllegalArgumentException("The number of years to add has to be greater than zero."); + } + int targetYear = getJewishYear() - years; + // If we are in the month of Adar in a non-leap year and we are skipping + // to a year that is a leap year, we will use useAdarAlephInYear do + // decide which month to skip to. + int month; + if (getJewishMonth() == JewishDate.ADAR && !isJewishLeapYear(getJewishYear()) && isJewishLeapYear(targetYear)){ + if (useAdarAlephForLeapYear){ + month = JewishDate.ADAR; + }else{ + month = JewishDate.ADAR_II; + } + } else{ + // If we are in JewishDate.ADAR_II, this will clamp the month to 12 (JewishDate.ADAR) + month = Math.min(getJewishMonth(),getLastMonthOfJewishYear(targetYear)); + } + // Clamp to final day of the month + int day = Math.min(getJewishDayOfMonth(), getDaysInJewishMonth(month,targetYear)); + setJewishDate(targetYear, month, day); + } /** * Returns a string containing the Jewish date in the form, "day Month, year" e.g. "21 Shevat, 5729". For more From 4c96ca2f8adc065631221eeb363657f20293c172 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 17:48:19 -0400 Subject: [PATCH 059/121] Update RegressionTestFileWriter.java change to match changes to zmanim and date methods --- .../hebrewcalendar/RegressionTestFileWriter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index 93f719c0..5f3c5eec 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -84,7 +84,7 @@ public static void main(String[] args) throws IOException { zcal.getBainHashmashosYereim16Point875Minutes(), zcal.getBainHashmashosYereim2Point8Degrees(), zcal.getBainHashmashosYereim13Point5Minutes(), zcal.getBainHashmashosYereim2Point1Degrees(), zcal.getTzaisGeonim3Point7Degrees(), zcal.getTzaisGeonim3Point8Degrees(), - zcal.getTzaisGeonim5Point95Degrees(),zcal.getTzaisGeonim4Point61Degrees(), + zcal.getTzaisGeonim5Point95Degrees(),zcal.getTzaisGeonim4Point65Degrees(), zcal.getTzaisGeonim4Point37Degrees(), zcal.getTzaisGeonim5Point88Degrees(), zcal.getTzaisGeonim4Point8Degrees(), zcal.getTzaisGeonim6Point45Degrees(), zcal.getTzaisGeonim7Point083Degrees(), zcal.getTzaisGeonim7Point67Degrees(), @@ -129,7 +129,7 @@ public static void main(String[] args) throws IOException { current = current.plusDays(1L); gregorian = gregorian.plusDays(1); - date.addDays(1); + date.plusDays(1); cal.setGregorianDate(current); zcal.setLocalDate(gregorian); } @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException { } static class FullZmanim { - public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point61Degrees,getTzaisGeonim4Point37Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; + public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point65Degrees,getTzaisGeonim4Point37Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; @Override public String toString() { @@ -257,7 +257,7 @@ public String toString() { .add(getTzaisGeonim3Point7Degrees.toString()) .add(getTzaisGeonim3Point8Degrees.toString()) .add(getTzaisGeonim5Point95Degrees.toString()) - .add(getTzaisGeonim4Point61Degrees.toString()) + .add(getTzaisGeonim4Point65Degrees.toString()) .add(getTzaisGeonim4Point37Degrees.toString()) .add(getTzaisGeonim5Point88Degrees.toString()) .add(getTzaisGeonim4Point8Degrees.toString()) @@ -363,7 +363,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre Instant getBainHashmashosYereim2Point8Degrees, Instant getBainHashmashosYereim13Point5Minutes, Instant getBainHashmashosYereim2Point1Degrees, Instant getTzaisGeonim3Point7Degrees, Instant getTzaisGeonim3Point8Degrees, Instant getTzaisGeonim5Point95Degrees, - Instant getTzaisGeonim4Point61Degrees, Instant getTzaisGeonim4Point37Degrees, + Instant getTzaisGeonim4Point65Degrees, Instant getTzaisGeonim4Point37Degrees, Instant getTzaisGeonim5Point88Degrees, Instant getTzaisGeonim4Point8Degrees, Instant getTzaisGeonim6Point45Degrees, Instant getTzaisGeonim7Point083Degrees, Instant getTzaisGeonim7Point67Degrees, Instant getTzaisGeonim8Point5Degrees, @@ -485,7 +485,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre this.getTzaisGeonim3Point7Degrees = getTzaisGeonim3Point7Degrees; this.getTzaisGeonim3Point8Degrees = getTzaisGeonim3Point8Degrees; this.getTzaisGeonim5Point95Degrees = getTzaisGeonim5Point95Degrees; - this.getTzaisGeonim4Point61Degrees = getTzaisGeonim4Point61Degrees; + this.getTzaisGeonim4Point65Degrees = getTzaisGeonim4Point65Degrees; this.getTzaisGeonim4Point37Degrees = getTzaisGeonim4Point37Degrees; this.getTzaisGeonim5Point88Degrees = getTzaisGeonim5Point88Degrees; this.getTzaisGeonim4Point8Degrees = getTzaisGeonim4Point8Degrees; @@ -646,7 +646,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre public final Instant getTzaisGeonim3Point7Degrees; public final Instant getTzaisGeonim3Point8Degrees; public final Instant getTzaisGeonim5Point95Degrees; - public final Instant getTzaisGeonim4Point61Degrees; + public final Instant getTzaisGeonim4Point65Degrees; public final Instant getTzaisGeonim4Point37Degrees; public final Instant getTzaisGeonim5Point88Degrees; public final Instant getTzaisGeonim4Point8Degrees; From a2625d99d22c572825d5ff12c017b094741be84d Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 17:52:01 -0400 Subject: [PATCH 060/121] addDays -> plusDays --- .../UT_GregorianDateNavigation.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java index 1b53934a..9a5a2bfb 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_GregorianDateNavigation.java @@ -25,7 +25,7 @@ public void gregorianForwardMonthToMonth() { Assert.assertEquals(11, hebrewDate.getJewishMonth()); Assert.assertEquals(26, hebrewDate.getJewishDayOfMonth()); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(2, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(11, hebrewDate.getJewishMonth()); @@ -38,7 +38,7 @@ public void gregorianForwardMonthToMonth() { Assert.assertEquals(12, hebrewDate.getJewishMonth()); Assert.assertEquals(24, hebrewDate.getJewishDayOfMonth()); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(3, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(12, hebrewDate.getJewishMonth()); @@ -46,7 +46,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.MARCH,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(4, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(13, hebrewDate.getJewishMonth()); @@ -54,7 +54,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.APRIL,30); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(5, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(1, hebrewDate.getJewishMonth()); @@ -62,7 +62,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.MAY,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(6, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(2, hebrewDate.getJewishMonth()); @@ -70,7 +70,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.JUNE,30); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(7, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(3, hebrewDate.getJewishMonth()); @@ -78,7 +78,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.JULY,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(8, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5, hebrewDate.getJewishMonth()); @@ -86,7 +86,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.AUGUST,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(9, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(6, hebrewDate.getJewishMonth()); @@ -94,7 +94,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.SEPTEMBER,30); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(10, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(7, hebrewDate.getJewishMonth()); @@ -102,7 +102,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.OCTOBER,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(11, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(5772, hebrewDate.getJewishYear()); @@ -111,7 +111,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.NOVEMBER,30); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(12, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); Assert.assertEquals(9, hebrewDate.getJewishMonth()); @@ -119,7 +119,7 @@ public void gregorianForwardMonthToMonth() { localDate = LocalDate.of(2011, Month.DECEMBER,31); hebrewDate = new JewishDate(localDate); - hebrewDate.addDays(1); + hebrewDate.plusDays(1); Assert.assertEquals(2012, hebrewDate.getLocalDate().getYear()); Assert.assertEquals(1, hebrewDate.getLocalDate().getMonthValue()); Assert.assertEquals(1, hebrewDate.getLocalDate().getDayOfMonth()); From 1f40948d7f3f938262961d88ae7bcabafd733ee1 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 18:06:35 -0400 Subject: [PATCH 061/121] addDays -> plusDays --- .../java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index f6f1c76f..68d7315e 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -212,7 +212,7 @@ public boolean isTachanunRecitedShacharis(JewishCalendar jewishCalendar) { */ public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) { JewishCalendar tomorrow = (JewishCalendar) jewishCalendar.clone(); - tomorrow.addDays(1); + tomorrow.plusDays(1); return tachanunRecitedMinchaAllYear && jewishCalendar.getDayOfWeek() != Calendar.FRIDAY From c706f2883706eebd39432c1796674b8f0640e344 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 18:07:39 -0400 Subject: [PATCH 062/121] addMonths -> plusMonths --- .../com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index a8f4086a..12191fa7 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -3311,7 +3311,7 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { //Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) if (zman == null && jewishCalendar.getJewishDayOfMonth() == 30) { - jewishCalendar.addMonths(1); + jewishCalendar.plusMonths(1); zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true); } @@ -3343,7 +3343,7 @@ public Instant getZmanMolad() { // deal with molad that happens on the end of the previous month if (molad == null && jewishCalendar.getJewishDayOfMonth() > 26) { - jewishCalendar.addMonths(1); + jewishCalendar.plusMonths(1); molad = getMoladBasedTime(jewishCalendar.getMoladAsInstant(), null, null, true); } return molad; From 9287345f6ae967f6b9807246f0530182cd6b4e89 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 18:09:54 -0400 Subject: [PATCH 063/121] addDays -> plusDays --- .../kosherjava/zmanim/hebrewcalendar/JewishCalendar.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index 86b9bb10..533013d5 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -509,12 +509,12 @@ public Parsha getUpcomingParshah() { JewishCalendar clone = (JewishCalendar) clone(); int daysToShabbos = (Calendar.SATURDAY - getDayOfWeek() + 7) % 7; if (getDayOfWeek() != Calendar.SATURDAY) { - clone.addDays(daysToShabbos); + clone.plusDays(daysToShabbos); } else { - clone.addDays( 7); + clone.plusDays( 7); } while(clone.getParshah() == Parsha.NONE) { //Yom Kippur / Sukkos or Pesach with 2 potential non-parsha Shabbosim in a row - clone.addDays(7); + clone.plusDays(7); } return clone.getParshah(); } From 032a4d120d7e71b30e6d65710550325cc01856e1 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 19 Apr 2026 18:13:17 -0400 Subject: [PATCH 064/121] fix test by addYears -> plusYears --- .../zmanim/hebrewcalendar/UT_JewishDateNavigation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java index 2b14945f..aad45602 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_JewishDateNavigation.java @@ -47,14 +47,14 @@ public void addYearsUsesConfiguredAdarMonthWhenMovingToLeapYear() { JewishDate adarAlephDate = new JewishDate(); adarAlephDate.setJewishDate(5783, JewishDate.ADAR, 10); - adarAlephDate.addYears(1, true); + adarAlephDate.plusYears(1, true); Assert.assertEquals(5784, adarAlephDate.getJewishYear()); Assert.assertEquals(JewishDate.ADAR, adarAlephDate.getJewishMonth()); Assert.assertEquals(10, adarAlephDate.getJewishDayOfMonth()); JewishDate adarBeisDate = new JewishDate(); adarBeisDate.setJewishDate(5783, JewishDate.ADAR, 10); - adarBeisDate.addYears(1, false); + adarBeisDate.plusYears(1, false); Assert.assertEquals(5784, adarBeisDate.getJewishYear()); Assert.assertEquals(JewishDate.ADAR_II, adarBeisDate.getJewishMonth()); Assert.assertEquals(10, adarBeisDate.getJewishDayOfMonth()); From 0e0cd1a5ae2f8bc3433133c6ee731f0e13b5e86f Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 20 Apr 2026 00:00:13 -0400 Subject: [PATCH 065/121] ZmanimCalendar minor Javadoc tweak --- .../java/com/kosherjava/zmanim/ZmanimCalendar.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 93f09a3b..928516b6 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -1126,13 +1126,11 @@ public long getShaahZmanisGRA() { * is sunrise or sunset based). * @return the Instant 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, - * a null will be returned. A null will also be returned if 0 is passed in, since we can't - * tell if it is sunrise or sunset based. See detailed explanation on top of the {@link AstronomicalCalendar} - * documentation. - * @see ComprehensiveZmanimCalendar#getTzais72Zmanis() - * @see ComprehensiveZmanimCalendar#getTzais90Zmanis() - * @see ...Zmanis() based zmanim - * in the ComprehensiveZmanimCalendar. + * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} + * documentation. A null will also be returned if 0 is passed in, since we can't tell if it is a + * sunrise or sunset based zman. + * @see ComprehensiveZmanimCalendar...Zmanis() + * based zmanim. */ public Instant getZmanisBasedOffset(double hours) { long shaahZmanis = getShaahZmanisGRA(); From 7c401943c2b9fb6cd957285ce2ec81d5d75957cc Mon Sep 17 00:00:00 2001 From: KosherJava Date: Fri, 24 Apr 2026 15:15:21 -0400 Subject: [PATCH 066/121] Vhange some ComprehensiveZmanimCalendar. zmanim to later times - getTzaisGeonim4Point65Degrees() is now getTzaisGeonim4Point66Degrees() - was too early. - getTzaisGeonim4Point37Degrees() is now getTzaisGeonim4Point42Degrees() - was too early. - Remove redundant JavaDocs in constants - Clarified JavaDocs with info on how some zmanim are sourced --- .../zmanim/ComprehensiveZmanimCalendar.java | 180 ++++++++---------- 1 file changed, 75 insertions(+), 105 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 12191fa7..8d268a11 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -30,8 +30,8 @@ * 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 * {@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 #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} and are of interest - * for calculation beyond zmanim calculations. Here are some examples. + * time based on degrees or time before or after {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() + * sunset} and are of interest for calculation beyond zmanim calculations. Here are some examples. *

      First create the Calendar for the location you would like to calculate: * *

      @@ -121,12 +121,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8;
       
       	/**
      -	 * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
      -	 * the sun 24 minutes after sunset in Jerusalem around the equinox / equilux,
      -	 * which calculates to 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getTzaisGeonim5Point95Degrees()
       	 */
       	protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95;
      @@ -141,79 +136,46 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5.0 / 60);
       
       	/**
      -	 * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
      -	 * 45 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux which
      -	 * calculates to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getMisheyakir10Point2Degrees()
       	 */
       	protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2;
       
       	/**
      -	 * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
      -	 * 48 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, which
      -	 * calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getMisheyakir11Degrees()
       	 */
       	protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11;
       
       	/**
      -	 * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating misheyakir according to some opinions. This calculation is based on the position of the sun
      -	 * 52 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, which
      -	 * calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getMisheyakir11Point5Degrees()
       	 */
       	protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5;
       	
       	/**
      -	 * The zenith of 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is used for calculating
      -	 * misheyakir according to some opinions. This calculation is based on the position of the sun slightly less
      -	 * than 57 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, which
      -	 * calculates to 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getMisheyakir12Point85Degrees()
       	 */
       	protected static final double ZENITH_12_POINT_85 = GEOMETRIC_ZENITH + 12.85;
       
       	/**
      -	 * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating Rabbeinu Tam's bain hashmashos according to some opinions.
      -	 * NOTE: See comments on {@link #getBainHashmashosRT13Point24Degrees} for additional details about the degrees.
      -	 * 
      +	 * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getBainHashmashosRT13Point24Degrees
      -	 * 
       	 */
       	protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24;
       	
       	/**
      -	 * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating alos according to some opinions.
      -	 * 
      +	 * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getAlos19Degrees()
       	 * @see #ZENITH_19_POINT_8
       	 */
       	protected static final double ZENITH_19_DEGREES = GEOMETRIC_ZENITH + 19;
       
       	/**
      -	 * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is
      -	 * based on the position of the sun 90 minutes after sunset in Jerusalem around the equinox / equilux which
      -	 * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getTzais19Point8Degrees()
       	 * @see #getAlos19Point8Degrees()
      -	 * @see #getAlos90Minutes()
      -	 * @see #getTzais90Minutes()
       	 * @see #ZENITH_19_DEGREES
       	 */
       	protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8;
      @@ -236,29 +198,16 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0;
       
       	/**
      -	 * The zenith of 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
      -	 * the sun {@link #getTzaisGeonim4Point37Degrees() 16 7/8 minutes} after sunset (3/4 of a 22.5-minute mil) in Jerusalem around the equinox / equilux,
      -	 * which calculates to 4.37° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      -	 * @see #getTzaisGeonim4Point37Degrees()
      +	 * The zenith of 4.42° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
      +	 * @see #getTzaisGeonim4Point42Degrees()
       	 */
      -	protected static final double ZENITH_4_POINT_37 = GEOMETRIC_ZENITH + 4.37;
      +	protected static final double ZENITH_4_POINT_42 = GEOMETRIC_ZENITH + 4.42;
       
       	/**
      -	 * The zenith of 4.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating tzais (nightfall) according to some opinions. This calculation is based on the position of
      -	 * the sun {@link #getTzaisGeonim4Point37Degrees() 18 minutes} after sunset (3/4 of a 24-minute mil) in
      -	 * Jerusalem around the equinox
      -	 * / equilux, which calculates to 4.65° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * @todo add documentation links
      -	 * 
      -	 * @see #getTzaisGeonim4Point65Degrees()
      +	 * The zenith of 4.66° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
      +	 * @see #getTzaisGeonim4Point66Degrees()
       	 */
      -	protected static final double ZENITH_4_POINT_65 = GEOMETRIC_ZENITH + 4.65;
      +	protected static final double ZENITH_4_POINT_66 = GEOMETRIC_ZENITH + 4.66;
       
       	/**
       	 * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
      @@ -286,12 +235,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_16_POINT_9 = GEOMETRIC_ZENITH + 16.9;
       
       	/**
      -	 * The zenith of 6° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating tzais / nightfall based on the opinion of the Baal Hatanya. This calculation is based on the
      -	 * position of the sun 24 minutes after {@link #getSunsetWithElevation() sunset} in Jerusalem around the equinox / equilux, which
      -	 * is 6° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 *
      +	 * The zenith of 6° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getTzaisBaalHatanya()
       	 */
       	protected static final double ZENITH_6_DEGREES = GEOMETRIC_ZENITH + 6;
      @@ -1014,7 +958,6 @@ public Instant getAlos18Degrees() {
       	 *         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.
      -	 * @see #ASTRONOMICAL_ZENITH
       	 */
       	public Instant getAlos19Degrees() {
       		return getSunriseOffsetByDegrees(ZENITH_19_DEGREES);
      @@ -1023,8 +966,8 @@ public Instant getAlos19Degrees() {
       	/**
       	 * Method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the
       	 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
      -	 * {@link #getAlos90Minutes() 90 minutes} but uses a degree-based calculation instead of 90 exact minutes. This calculation
      -	 * is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which
       	 * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}.
       	 * 
      @@ -1032,8 +975,8 @@ public Instant getAlos19Degrees() {
       	 *         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.
      -	 * @see #ZENITH_19_POINT_8
       	 * @see #getAlos90Minutes()
      +	 * @see #getTzais19Point8Degrees()
       	 */
       	public Instant getAlos19Point8Degrees() {
       		return getSunriseOffsetByDegrees(ZENITH_19_POINT_8);
      @@ -2221,7 +2164,6 @@ public Instant getPlagAhavatShalom() {
       	 *         for this calculation, a null will be returned. See detailed explanation on top of the
       	 *         {@link AstronomicalCalendar} documentation.
       	 * 
      -	 * @see #ZENITH_13_POINT_24
       	 * @see #getBainHashmashosRT58Point5Minutes()
       	 */
       	public Instant getBainHashmashosRT13Point24Degrees() {
      @@ -2426,7 +2368,8 @@ public Instant getBainHashmashosYereim2Point1Degrees() {
       	 * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil at 18 minutes a mil, or 13.5 minutes
       	 *  after sunset. The sun is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. This does
      -	 * not cover the time it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi).
      +	 * not cover the 26.46 it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi) at the pace
      +	 * of an 18-minute mil.
       	 * 
       	 * @return the Instant representing the time when the sun is 3.7° below sea level.
       	 * @see #ZENITH_3_POINT_7
      @@ -2442,7 +2385,7 @@ public Instant getTzaisGeonim3Point7Degrees() {
       	 * as the position of the sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a mil at 18 minutes a mil, plus 30 seconds
       	 * for the time it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi). With this being
      -	 * on an 18-minutes mil, 49 amos would take 26.5, rounded to 30 seconds), for a total of 14 minutes after sunset. The sun is
      +	 * on an 18-minutes mil, 49 amos would take 26.46, rounded to 30 seconds), for a total of 14 minutes after sunset. The sun is
       	 * {@link #ZENITH_3_POINT_8 3.8°} below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux.
       	 * 
      @@ -2456,14 +2399,23 @@ public Instant getTzaisGeonim3Point8Degrees() {
       
       	/**
       	 * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the
      -	 * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below the western horizon.
      +	 * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below below {@link #GEOMETRIC_ZENITH geometric zenith}
      +	 * (90°), calculated as the position of the sun 24 minutes after sunset in Jerusalem around the equinox / equilux. The
      +	 * 24 minutes is based on the Baal Hatanya's calculation of 18 minutes (3/4 of a 24 minute mil) + 4 minutes for
      +	 * shkiah amitis + 2 minutes for bain hashmashos of Rav Yosi. See Hazmanim Bahalacha vol II, ch. 50, no. 5,
      +	 * p. 512-513, ch. 47, and Yisrael Vehazmanim Vol III, ch. 13, no. 53, p. 1026. Among sources he mentions for this zman is Rabbi Yehuda (Leo) Levi's calculations in Jewish Chrononomy
      +	 * and other sources. Calculations show that the time is closer to 5.93° and was seemingly rounded to 5.95°.
      +	 * Chabad calendars usually use the 6°-based {@link #getTzaisBaalHatanya()} that is built on this same calculation.
       	 * 
       	 * @return the Instant representing the time when the sun is 5.95° below sea level. 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.
      -	 * @see #ZENITH_5_POINT_95
      +	 * @see #getTzaisBaalHatanya()
       	 */
       	public Instant getTzaisGeonim5Point95Degrees() {
       		return getSunsetOffsetByDegrees(ZENITH_5_POINT_95);
      @@ -2472,38 +2424,43 @@ public Instant getTzaisGeonim5Point95Degrees() {
       	/**
       	 * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
       	 * of a mil based on a
      -	 * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_65 4.65°} below the
      +	 * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_66 4.66°} below the
       	 * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
      +	 * This does not cover the 35.28 seconds it takes to walk 49 amos (the heref ayin of bain hashmashos
      +	 * of Rav Yosi) at the pace of a 24-minute mil. See {@link #getTzaisGeonim4Point8Degrees()} for a time that covers the
      +	 * heref ayin.
       	 * 
      -	 * @return the Instant representing the time when the sun is 4.65° below sea level. If the calculation
      +	 * @return the Instant representing the time when the sun is 4.66° below sea level. 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.
      -	 * @see #ZENITH_4_POINT_65
      +	 * @see #ZENITH_4_POINT_66
       	 * @see #getTzaisGeonim4Point8Degrees()
       	 */
       	@Deprecated (forRemoval=false)
      -	public Instant getTzaisGeonim4Point65Degrees() {
      -		return getSunsetOffsetByDegrees(ZENITH_4_POINT_65);
      +	public Instant getTzaisGeonim4Point66Degrees() {
      +		return getSunsetOffsetByDegrees(ZENITH_4_POINT_66);
       	}
       
       	/**
       	 * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4
       	 * of a mil, based on a
      -	 * 22.5-minute mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_37 4.37°} below the western
      -	 * horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
      +	 * 22.5-minute mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_42 4.42°} below the western
      +	 * horizon. This is a very early zman and should not be relied on without Rabbinical guidance. This does
      +	 * not cover the 33.07 seconds it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi)
      +	 * at the pace of a 22.5 minute-mil.
       	 * 
      -	 * @return the Instant representing the time when the sun is 4.37° below sea level. If the calculation
      +	 * @return the Instant representing the time when the sun is 4.42° below sea level. 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.
      -	 * @see #ZENITH_4_POINT_37
      +	 * @see #ZENITH_4_POINT_42
       	 */
       	@Deprecated (forRemoval=false)
      -	public Instant getTzaisGeonim4Point37Degrees() {
      -		return getSunsetOffsetByDegrees(ZENITH_4_POINT_37);
      +	public Instant getTzaisGeonim4Point42Degrees() {
      +		return getSunsetOffsetByDegrees(ZENITH_4_POINT_42);
       	}
       
       	/**
      @@ -2514,6 +2471,7 @@ public Instant getTzaisGeonim4Point37Degrees() {
       	 * zman and should not be relied on without Rabbinical guidance.
       	 * 
       	 * @todo Additional detailed documentation needed.
      +	 * FIXME - actual calculations show this to be 5.93°, not 5.88°.
       	 * @return the Instant representing the time when the sun is 5.88° below sea level. 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
      @@ -2529,8 +2487,8 @@ public Instant getTzaisGeonim5Point88Degrees() {
       	 * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as the
       	 * sun's position below the horizon at a time of 18.6 minutes after sunset. This is calculated as 3/4 of a 24-minute
       	 * mil, plus 0.6 minutes for the
      -	 * time to walk 49 amos for bain hashmashos of Rav Yosi (with this zman based on a 24-minutes mil, 49
      -	 * amos would take 36 seconds to walk), for a total of 18.6 minutes after sunset. This calculates to the sun's position
      +	 * time to walk 49 amos for bain hashmashos of Rav Yosi (with this zman based on a 24-minute mil, 49
      +	 * amos would take 35.28 seconds to walk), for a total of 18.6 minutes after sunset. This calculates to the sun's position
       	 * at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rav Yechiel Michel Shlezinger's sefer bain Hashmashos
      -	 * of Rav Yosi) to an expert.
      +	 * of Rav Yosi) to an expert. See more details on this earier zman at {@link getTzaisGeonim3Point8Degrees()}.
       	 * This is an early zman for tzaisand should not be relied on without Rabbinical guidance.
       	 * 
       	 * @return the Instant representing the time when the sun is 4.8° below sea level. If the calculation
      @@ -3043,7 +3001,7 @@ public Instant getTzais18Degrees() {
       	}
       
       	/**
      -	 * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}
      +	 * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}.
       	 * 
       	 * @return the Instant representing the time. 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
      @@ -3731,10 +3689,11 @@ public Instant getMinchaKetanaBaalHatanya() {
       	}
       
       	/**
      -	 * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This
      -	 * calculation is based on the opinion of the Baal Hatanya that the day is calculated
      -	 * from sunrise to sunset. This returns the time 10.75 * {@link #getShaahZmanisBaalHatanya()} after
      -	 * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
      +	 * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This calculation
      +	 * is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time
      +	 * 10.75 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. See
      +	 * About Our
      +	 * Zmanim Calculations @ Chabad.org for more details on this calculation.
       	 * 
       	 * @see #getPlagHamincha(Instant, Instant)
       	 * @return the Instant of the time of plag hamincha. If the calculation can't be computed such as
      @@ -3747,15 +3706,26 @@ public Instant getPlagHaminchaBaalHatanya() {
       	}
       
       	/**
      -	 * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon
      -	 * (90°) after {@link #getSunsetWithElevation() sunset}. For information on the source of this calculation see
      -	 * {@link #ZENITH_6_DEGREES}.
      +	 * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon (90°)
      +	 * after {@link #getSunsetWithElevation() sunset}.  This tzais / nightfall based on the opinion of the  Baal Hatanya. This calculation is based on the position of the
      +	 * sun about 24 minutes after {@link #getSeaLevelSunset() sunset} in Jerusalem around the equinox / equilux, which
      +	 * is 6° below {@link #GEOMETRIC_ZENITH geometric zenith}. See About Our Zmanim
      +	 * Calculations @ Chabad.org that is based on {@link ZmanimCalendar#getSunsetBaalHatanya() shkiah amitis as
      +	 * 1.583° below the horizon} calculated around the equinox / equilux that computes 3.516 minutes after sunset. To this, 18 minutes of 3/4 of a 24-minute mil and
      +	 * two minutes for bain hashmashos of Rav Yosi is added. This calculation computes the the sun being 5.83° below
      +	 * the horizon (very close to the slightly later {@link #getTzaisGeonim5Point95Degrees()} that was calculated based on 4 fixed
      +	 * minutes) and it is rounded up to 6°.
       	 * 
       	 * @return The Instant of nightfall. 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.
      -	 * @see #ZENITH_6_DEGREES
      +	 * @see #getTzaisGeonim5Point95Degrees()
      +	 * @see ZmanimCalendar#getSunsetBaalHatanya()
       	 */
       	public Instant getTzaisBaalHatanya() {
       		return getSunsetOffsetByDegrees(ZENITH_6_DEGREES);
      
      From 1694d2c2788d64b3840bdb9d9d739fc10e05aafd Mon Sep 17 00:00:00 2001
      From: KosherJava 
      Date: Fri, 24 Apr 2026 15:32:43 -0400
      Subject: [PATCH 067/121] Fix RegressionTestFileWriter for recent changes
      
      ---
       .../RegressionTestFileWriter.java             | 20 +++++++++----------
       1 file changed, 10 insertions(+), 10 deletions(-)
      
      diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java
      index 5f3c5eec..cfa63236 100644
      --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java
      +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java
      @@ -84,8 +84,8 @@ public static void main(String[] args) throws IOException {
       					zcal.getBainHashmashosYereim16Point875Minutes(), zcal.getBainHashmashosYereim2Point8Degrees(),
       					zcal.getBainHashmashosYereim13Point5Minutes(), zcal.getBainHashmashosYereim2Point1Degrees(),
       					zcal.getTzaisGeonim3Point7Degrees(), zcal.getTzaisGeonim3Point8Degrees(),
      -					zcal.getTzaisGeonim5Point95Degrees(),zcal.getTzaisGeonim4Point65Degrees(),
      -					zcal.getTzaisGeonim4Point37Degrees(), zcal.getTzaisGeonim5Point88Degrees(),
      +					zcal.getTzaisGeonim5Point95Degrees(),zcal.getTzaisGeonim4Point66Degrees(),
      +					zcal.getTzaisGeonim4Point42Degrees(), zcal.getTzaisGeonim5Point88Degrees(),
       					zcal.getTzaisGeonim4Point8Degrees(), zcal.getTzaisGeonim6Point45Degrees(),
       					zcal.getTzaisGeonim7Point083Degrees(), zcal.getTzaisGeonim7Point67Degrees(),
       					zcal.getTzaisGeonim8Point5Degrees(), zcal.getTzaisGeonim9Point3Degrees(),
      @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException {
           }
       
           static class FullZmanim {
      -		public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point65Degrees,getTzaisGeonim4Point37Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes";
      +		public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point66Degrees,getTzaisGeonim4Point42Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes";
       
               @Override
               public String toString() {
      @@ -257,8 +257,8 @@ public String toString() {
                           .add(getTzaisGeonim3Point7Degrees.toString())
                           .add(getTzaisGeonim3Point8Degrees.toString())
                           .add(getTzaisGeonim5Point95Degrees.toString())
      -                    .add(getTzaisGeonim4Point65Degrees.toString())
      -                    .add(getTzaisGeonim4Point37Degrees.toString())
      +                    .add(getTzaisGeonim4Point66Degrees.toString())
      +                    .add(getTzaisGeonim4Point42Degrees.toString())
                           .add(getTzaisGeonim5Point88Degrees.toString())
                           .add(getTzaisGeonim4Point8Degrees.toString())
                           .add(getTzaisGeonim6Point45Degrees.toString())
      @@ -363,7 +363,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre
                                 Instant getBainHashmashosYereim2Point8Degrees, Instant getBainHashmashosYereim13Point5Minutes,
                                 Instant getBainHashmashosYereim2Point1Degrees, Instant getTzaisGeonim3Point7Degrees,
                                 Instant getTzaisGeonim3Point8Degrees, Instant getTzaisGeonim5Point95Degrees,
      -                          Instant getTzaisGeonim4Point65Degrees, Instant getTzaisGeonim4Point37Degrees,
      +                          Instant getTzaisGeonim4Point66Degrees, Instant getTzaisGeonim4Point42Degrees,
                                 Instant getTzaisGeonim5Point88Degrees, Instant getTzaisGeonim4Point8Degrees,
                                 Instant getTzaisGeonim6Point45Degrees, Instant getTzaisGeonim7Point083Degrees,
                                 Instant getTzaisGeonim7Point67Degrees, Instant getTzaisGeonim8Point5Degrees,
      @@ -485,8 +485,8 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre
                   this.getTzaisGeonim3Point7Degrees = getTzaisGeonim3Point7Degrees;
                   this.getTzaisGeonim3Point8Degrees = getTzaisGeonim3Point8Degrees;
                   this.getTzaisGeonim5Point95Degrees = getTzaisGeonim5Point95Degrees;
      -            this.getTzaisGeonim4Point65Degrees = getTzaisGeonim4Point65Degrees;
      -            this.getTzaisGeonim4Point37Degrees = getTzaisGeonim4Point37Degrees;
      +            this.getTzaisGeonim4Point66Degrees = getTzaisGeonim4Point66Degrees;
      +            this.getTzaisGeonim4Point42Degrees = getTzaisGeonim4Point42Degrees;
                   this.getTzaisGeonim5Point88Degrees = getTzaisGeonim5Point88Degrees;
                   this.getTzaisGeonim4Point8Degrees = getTzaisGeonim4Point8Degrees;
                   this.getTzaisGeonim6Point45Degrees = getTzaisGeonim6Point45Degrees;
      @@ -646,8 +646,8 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre
               public final Instant getTzaisGeonim3Point7Degrees;
               public final Instant getTzaisGeonim3Point8Degrees;
               public final Instant getTzaisGeonim5Point95Degrees;
      -        public final Instant getTzaisGeonim4Point65Degrees;
      -        public final Instant getTzaisGeonim4Point37Degrees;
      +        public final Instant getTzaisGeonim4Point66Degrees;
      +        public final Instant getTzaisGeonim4Point42Degrees;
               public final Instant getTzaisGeonim5Point88Degrees;
               public final Instant getTzaisGeonim4Point8Degrees;
               public final Instant getTzaisGeonim6Point45Degrees;
      
      From 926bfb5c52386755597f97aceccaaef3281bd552 Mon Sep 17 00:00:00 2001
      From: KosherJava 
      Date: Fri, 24 Apr 2026 16:54:02 -0400
      Subject: [PATCH 068/121] JavaDoc cleanup in ZmanimCalendar
      
      ---
       .../com/kosherjava/zmanim/ZmanimCalendar.java | 39 +++++--------------
       1 file changed, 10 insertions(+), 29 deletions(-)
      
      diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      index 928516b6..e3517d91 100644
      --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      @@ -216,15 +216,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz
       	}
       
       	/**
      -	 * The zenith of 16.1° below geometric zenith (90°). This calculation is used for determining alos
      -	 * (dawn) and tzais (nightfall) in some opinions. It is based on the calculation that the time between dawn
      -	 * and sunrise (and sunset to nightfall) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes a mil (Rambam and others). The sun's position below the horizon 72 minutes
      -	 * before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux is
      -	 * 16.1° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      -	 * 
      +	 * The zenith of 16.1° below geometric zenith (90°).
       	 * @see #getAlos16Point1Degrees()
       	 * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees()
       	 * @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()
      @@ -238,23 +230,13 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz
       	protected static final double ZENITH_16_POINT_1 = GEOMETRIC_ZENITH + 16.1;
       
       	/**
      -	 * The zenith of 8.5° below geometric zenith (90°). This calculation is used for calculating alos
      -	 * (dawn) and tzais (nightfall) in some opinions. This calculation is based on the sun's position below the
      -	 * horizon 36 minutes after {@link #getSunsetWithElevation() sunset} in Jerusalem around the equinox / equilux, which
      -	 * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. The Ohr Meir considers this the time that 3 small stars are visible,
      -	 * which is later than the required 3 medium stars.
      -	 * 
      +	 * The zenith of 8.5° below geometric zenith (90°).
       	 * @see #getTzaisGeonim8Point5Degrees()
       	 */
       	protected static final double ZENITH_8_POINT_5 = GEOMETRIC_ZENITH + 8.5;
       	
       	/**
      -	 * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating netz amiti (sunrise) and shkiah amiti (sunset) based on the opinion of the
      -	 * Baal Hatanya.
      -	 *
      +	 * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getSunriseBaalHatanya()
       	 * @see #getSunsetBaalHatanya()
       	 */
      @@ -300,17 +282,17 @@ protected Instant getSunsetBasedOnElevationSetting() {
       
       	/**
       	 * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the
      -	 * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunsetWithElevation() sunset}, a time that Rabbi Meir
      -	 * Posen in his the Ohr Meir calculated that 3 small
      -	 * stars are visible, which is later than the required 3 medium stars. See the {@link #ZENITH_8_POINT_5} constant.
      -	 * 
      -	 * @see #ZENITH_8_POINT_5
      +	 * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunsetWithElevation() sunset}, a time that Rabbi
      +	 * Meir Posen in his the Ohr Meir calculated that 3 small
      +	 * stars are visible, which is later than the required 3 medium stars. This calculation is based on the sun's position below
      +	 * the horizon 36 minutes after {@link #getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which
      +	 * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}.
       	 * 
       	 * @return The Instant of nightfall. 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.
      -	 * @see #ZENITH_8_POINT_5
       	 * ComprehensiveZmanimCalendar#getTzaisGeonim8Point5Degrees() that returns an identical time to this generic tzais
       	 */
       	public Instant getTzaisGeonim8Point5Degrees() {
      @@ -327,8 +309,7 @@ public Instant getTzaisGeonim8Point5Degrees() {
       	 * "https://kosherjava.com/2022/01/12/equinox-vs-equilux-zmanim-calculations/">around the equinox / equilux is
       	 * 16.1° below {@link #GEOMETRIC_ZENITH}.
       	 * 
      -	 * @see #ZENITH_16_POINT_1
      -	 * @see ComprehensiveZmanimCalendar#getAlos16Point1Degrees()
      +	 * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees()
       	 * 
       	 * @return The Instant of dawn. 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
      
      From b51132cde73262ce08856db66f40d1e7e362c4cb Mon Sep 17 00:00:00 2001
      From: KosherJava 
      Date: Fri, 24 Apr 2026 16:54:49 -0400
      Subject: [PATCH 069/121] JavaDoc cleanup in ComprehensiveZmanimCalendar
      
      ---
       .../zmanim/ComprehensiveZmanimCalendar.java   | 26 ++++++-------------
       1 file changed, 8 insertions(+), 18 deletions(-)
      
      diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
      index 8d268a11..2bd12400 100644
      --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
      +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
      @@ -181,15 +181,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8;
       
       	/**
      -	 * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
      -	 * calculating alos (dawn) and tzais (nightfall) according to some opinions. This calculation is
      -	 * based on the position of the sun {@link #getAlos120Minutes() 120 minutes} after sunset in Jerusalem around the equinox / equilux which
      -	 * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since the level of darkness when the sun is
      -	 * 26° and at a point when the level of darkness 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 or avoiding eating
      -	 * this early on a fast day.
      -	 * 
      +	 * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°).
       	 * @see #getAlos26Degrees()
       	 * @see #getTzais26Degrees()
       	 * @see #getAlos120Minutes()
      @@ -222,13 +214,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
       	protected static final double ZENITH_5_POINT_88 = GEOMETRIC_ZENITH + 5.88;
       
       	/**
      -	 * The zenith of 16.9° below geometric zenith (90°). This calculation is used for determining alos
      -	 * (dawn) based on the opinion of the Baal Hatanya. It is based on the calculation that the time between dawn
      -	 * and netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
      -	 * a mil (Rambam and others). The sun's position at 72
      -	 * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is
      -	 * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.
      +	 * The zenith of 16.9° below geometric zenith (90°).
       	 *
       	 * @see #getAlosBaalHatanya()
       	 */
      @@ -3559,9 +3545,13 @@ public long getShaahZmanisBaalHatanya() {
       	/**
       	 * Returns the Baal Hatanya's alos
       	 * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon}
      -	 * before {@link #getSunriseWithElevation() sunrise}. For more information the source of 16.9° see {@link #ZENITH_16_POINT_9}.
      +	 * before {@link #getSunriseWithElevation() sunrise}. It is based on the calculation that the time between dawn and
      +	 * netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
      +	 * a mil (Rambam and others). The sun's position at 72
      +	 * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem around the equinox / equilux is
      +	 * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}.
       	 * 
      -	 * @see #ZENITH_16_POINT_9
       	 * @return The Instant of dawn. 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
      
      From f3058b094e0aa84b451d71101316adaf83fd8b7c Mon Sep 17 00:00:00 2001
      From: KosherJava 
      Date: Sat, 25 Apr 2026 23:01:00 -0400
      Subject: [PATCH 070/121] Add getChatzos(Instant begin, Instant end) as a
       wrapper for getSunTransit(Instant, Instant)
      
      - Also cleanup some JavaDocs
      ---
       .../com/kosherjava/zmanim/ZmanimCalendar.java | 613 +++++++++---------
       1 file changed, 324 insertions(+), 289 deletions(-)
      
      diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      index e3517d91..3c721c1a 100644
      --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java
      @@ -24,32 +24,30 @@
       import com.kosherjava.zmanim.util.GeoLocation;
       
       /**
      - * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim
      - * (religious times) for prayers and other Jewish religious duties. This class contains the main functionality of the
      - * Zmanim library. For a much more extensive list of zmanim, use the {@link ComprehensiveZmanimCalendar} that
      - * extends this class. See documentation for the {@link ComprehensiveZmanimCalendar} and {@link AstronomicalCalendar} for
      - * simple examples on using the API. 
      + * The ZmanimCalendar is a specialized calendar that can calculate sunrise, sunset and Jewish zmanim (religious times)
      + * for prayers and other Jewish religious duties. This class contains the main functionality of the Zmanim library. For
      + * a much more extensive list of zmanim, use the {@link ComprehensiveZmanimCalendar} that extends this class. See
      + * documentation for the {@link ComprehensiveZmanimCalendar} and {@link AstronomicalCalendar} for simple examples on using the API. 
        * Elevation based zmanim (even sunrise and sunset) should not be used lekula without the guidance
      - * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his
      - * Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182)
      - * and section 9 (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
      - * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should
      - * be factored into zmanim calculations. The setting defaults to false (elevation will not be used for
      - * zmanim calculations besides sunrise and sunset), unless the setting is changed to true in {@link
      - * #setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as {@link #getSunriseWithElevation()},
      - * {@link #getSunsetWithElevation()}, {@link #getSofZmanShmaGRA()}, alos-based zmanim such as {@link
      - * #getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and zmanim based on a percentage
      - * of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset.
      - * Even when set to true it will not impact zmanim that are a degree-based offset of sunrise and sunset, such as {@link
      - * ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()}
      - * since these zmanim are not linked to sunrise or sunset times (the calculations are based on the astronomical definition
      - * of sunrise and sunset calculated in a vacuum with the solar radius above the horizon), and are therefore not impacted by the use
      - * of elevation.
      - * For additional information on the halachic impact of elevation on zmanim see:
      + * of a posek. According to Rabbi Dovid Yehudah Bursztyn in his Zmanim Kehilchasam, 7th edition chapter 2, section 7 (pages 181-182) and section 9 (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 accounted for
      + * in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be factored into zmanim calculations. The
      + * setting defaults to false (elevation will not be used for zmanim calculations besides sunrise and sunset), unless the
      + * setting is changed to true in {@link setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as
      + * {@link getSunriseWithElevation()}, {@link getSunsetWithElevation()}, {@link getSofZmanShmaGRA()}, alos-based
      + * zmanim such as {@link getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and
      + * zmanim based on a percentage of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()}
      + * that are based on sunrise and sunset. Even when set to true it will not impact zmanim that are a degree-based offset of
      + * sunrise and sunset, such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link
      + * ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()} since these zmanim are not linked to sunrise or sunset times
      + * (the calculations are based on the astronomical definition of sunrise and sunset calculated in a vacuum with the solar radius
      + * above the horizon), and are therefore not impacted by the use of elevation. For additional information on the halachic
      + * impact of elevation on zmanim see:
        * 
        *
      • Zmanei Halacha Lema'aseh 4th edition by Rabbi Yedidya Manat. @@ -72,33 +70,33 @@ public class ZmanimCalendar extends AstronomicalCalendar { /** - * Is elevation factored in for some zmanim (see {@link #isUseElevation()} for additional information). - * @see #isUseElevation() - * @see #setUseElevation(boolean) + * Is elevation factored in for some zmanim (see {@link isUseElevation()} for additional information). + * @see isUseElevation() + * @see setUseElevation(boolean) */ private boolean useElevation; /** - * 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, - * Rabbi Yechiel Avrahom Zilber in the Birur Halacha Vol. 6 Ch. 58 Pages - * 34 and 42 is of the opinion that elevation should be - * accounted for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons - * should be factored into zmanim calculations.The setting defaults to false (elevation will not be used for - * zmanim calculations), unless the setting is changed to true in {@link #setUseElevation(boolean)}. This will - * impact sunrise and sunset based zmanim such as {@link #getSofZmanShmaGRA()}, - * alos based zmanim such as {@link #getSofZmanShmaMGA72Minutes()} that are based on a - * fixed offset of sunrise or sunset and zmanim based on a percentage of the day such as {@link - * ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on sunrise and sunset. It will not impact - * zmanim that are a degree based offset of sunrise and sunset, such as - * {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()}. + * 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, Rabbi Yechiel Avrahom Zilber + * in the Birur Halacha Vol. 6 Ch. 58 Pages 34 and 42 is of the opinion that elevation should be accounted + * for in zmanim calculations. Related to this, Rabbi Yaakov Karp in Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be + * factored into zmanim calculations.The setting defaults to false (elevation will not be used for zmanim + * calculations), unless the setting is changed to true in {@link setUseElevation(boolean)}. This will impact sunrise and + * sunset based zmanim such as {@link getSofZmanShmaGRA()}, alos based zmanim such as {@link + * getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and zmanim based on a + * percentage of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} that are based on + * sunrise and sunset. It will not impact zmanim that are a degree based offset of sunrise and sunset, such as {@link + * ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees()} or {@link + * ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya()}. * * @return if the use of elevation is active * - * @see #setUseElevation(boolean) + * @see setUseElevation(boolean) */ public boolean isUseElevation() { return useElevation; @@ -106,8 +104,8 @@ public boolean isUseElevation() { /** * Sets whether elevation above sea level is factored into zmanim calculations for times besides sunrise and sunset. - * See {@link #isUseElevation()} for more details. - * @see #isUseElevation() + * See {@link isUseElevation()} for more details. + * @see isUseElevation() * * @param useElevation set to true to use elevation in zmanim calculations */ @@ -119,36 +117,36 @@ public void setUseElevation(boolean useElevation) { * Is astronomical chatzos used for zmanim calculations. The default value of true will * keep the standard astronomical chatzos calculation, while setting it to false will use half of * a solar day calculation for chatzos. - * @see #isUseAstronomicalChatzos() - * @see #setUseAstronomicalChatzos(boolean) - * @see #getChatzos() - * @see #getSunTransit() - * @see #getChatzosAsHalfDay() - * @see #useAstronomicalChatzosForOtherZmanim + * @see isUseAstronomicalChatzos() + * @see setUseAstronomicalChatzos(boolean) + * @see getChatzos() + * @see getSunTransit() + * @see getChatzosAsHalfDay() + * @see useAstronomicalChatzosForOtherZmanim */ private boolean useAstronomicalChatzos = true; /** - * Is {@link #getSunTransit() astronomical chatzos} used for {@link #getChatzos()} for enhanced accuracy. For + * Is {@link getSunTransit() astronomical chatzos} used for {@link getChatzos()} for enhanced accuracy. For * 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() + * @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 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 #getMinchaGedolaGRA() mincha gedola} will be calculated as half a + * time between sunrise and sunset. {@link getMinchaGedolaGRA() 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 shaos zmaniyos after sunrise. {@link #getPlagHaminchaGRA() Plag + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link getPlagHaminchaGRA() 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 - * @see #setUseAstronomicalChatzos(boolean) - * @see #getChatzos() - * @see #getSunTransit() - * @see #getChatzosAsHalfDay() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see useAstronomicalChatzos + * @see setUseAstronomicalChatzos(boolean) + * @see getChatzos() + * @see getSunTransit() + * @see getChatzosAsHalfDay() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public boolean isUseAstronomicalChatzos() { return useAstronomicalChatzos; @@ -157,12 +155,12 @@ public boolean isUseAstronomicalChatzos() { /** * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy. * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations. - * @see #useAstronomicalChatzos - * @see #isUseAstronomicalChatzos() - * @see #getChatzos() - * @see #getSunTransit() - * @see #getChatzosAsHalfDay() - * @see #setUseAstronomicalChatzosForOtherZmanim(boolean) + * @see useAstronomicalChatzos + * @see isUseAstronomicalChatzos() + * @see getChatzos() + * @see getSunTransit() + * @see getChatzosAsHalfDay() + * @see setUseAstronomicalChatzosForOtherZmanim(boolean) */ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { this.useAstronomicalChatzos = useAstronomicalChatzos; @@ -172,11 +170,11 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { * Is astronomical chatzos used for zmanim calculations besides chatzos itself for enhanced * accuracy. The default value of false will keep the standard start to end of day calculations, while setting * it to true will use half of a solar day calculation for zmanim. - * @see #isUseAstronomicalChatzosForOtherZmanim() - * @see #setUseAstronomicalChatzosForOtherZmanim(boolean) - * @see #isUseAstronomicalChatzos() - * @see #setUseAstronomicalChatzos(boolean) - * @see #getChatzos() + * @see isUseAstronomicalChatzosForOtherZmanim() + * @see setUseAstronomicalChatzosForOtherZmanim(boolean) + * @see isUseAstronomicalChatzos() + * @see setUseAstronomicalChatzos(boolean) + * @see getChatzos() */ private boolean useAstronomicalChatzosForOtherZmanim = false; @@ -186,20 +184,20 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { * 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 autumn 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() + * @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 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 #getMinchaGedolaGRA() mincha gedola GRA} will be calculated as half a + * time between sunrise and sunset. {@link getMinchaGedolaGRA() mincha gedola GRA} 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 shaos zmaniyos after sunrise. {@link #getPlagHaminchaGRA() Plag + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. {@link getPlagHaminchaGRA() 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 - * @see #setUseAstronomicalChatzosForOtherZmanim(boolean) - * @see #useAstronomicalChatzos - * @see #setUseAstronomicalChatzos(boolean) + * @see useAstronomicalChatzosForOtherZmanim + * @see setUseAstronomicalChatzosForOtherZmanim(boolean) + * @see useAstronomicalChatzos + * @see setUseAstronomicalChatzos(boolean) */ public boolean isUseAstronomicalChatzosForOtherZmanim() { return useAstronomicalChatzosForOtherZmanim; @@ -208,8 +206,8 @@ public boolean isUseAstronomicalChatzosForOtherZmanim() { /** * Sets if astronomical chatzos should be used in calculations of other zmanim for enhanced accuracy. * @param useAstronomicalChatzosForOtherZmanim set to true to use astronomical in chatzos in zmanim calculations. - * @see #useAstronomicalChatzos - * @see #isUseAstronomicalChatzos() + * @see useAstronomicalChatzos + * @see isUseAstronomicalChatzos() */ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatzosForOtherZmanim) { this.useAstronomicalChatzosForOtherZmanim = useAstronomicalChatzosForOtherZmanim; @@ -217,7 +215,7 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * The zenith of 16.1° below geometric zenith (90°). - * @see #getAlos16Point1Degrees() + * @see getAlos16Point1Degrees() * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @see ComprehensiveZmanimCalendar#getSofZmanShmaMGA16Point1Degrees() * @see ComprehensiveZmanimCalendar#getSofZmanTfilaMGA16Point1Degrees() @@ -231,31 +229,31 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * The zenith of 8.5° below geometric zenith (90°). - * @see #getTzaisGeonim8Point5Degrees() + * @see getTzaisGeonim8Point5Degrees() */ protected static final double ZENITH_8_POINT_5 = GEOMETRIC_ZENITH + 8.5; /** - * The zenith of 1.583° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getSunriseBaalHatanya() - * @see #getSunsetBaalHatanya() + * The zenith of 1.583° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getSunriseBaalHatanya() + * @see getSunsetBaalHatanya() */ protected static final double ZENITH_1_POINT_583 = GEOMETRIC_ZENITH + 1.583; /** * The default Shabbos candle lighting offset is 18 minutes. This can be changed via the - * {@link #setCandleLightingOffset(double)} and retrieved by the {@link #getCandleLightingOffset()}. + * {@link setCandleLightingOffset(double)} and retrieved by the {@link getCandleLightingOffset()}. */ private double candleLightingOffset = 18; /** - * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the - * default), or elevation adjusted {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. This allows relevant zmanim - * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. + * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), + * or elevation adjusted {@link getSunriseWithElevation()} if it is true. This allows relevant zmanim in this and + * extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * - * @return {@link #getSeaLevelSunrise()} if {@link #isUseElevation()} is false (the default), or elevation adjusted - * {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. - * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunriseWithElevation() + * @return {@link getSeaLevelSunrise()} if {@link isUseElevation()} is false (the default), or elevation adjusted + * {@link getSunriseWithElevation()} if it is true. + * @see getSunriseWithElevation() */ protected Instant getSunriseBasedOnElevationSetting() { if (isUseElevation()) { @@ -265,13 +263,13 @@ protected Instant getSunriseBasedOnElevationSetting() { } /** - * This method will return {@link #getSeaLevelSunrise() sea level sunrise} if {@link #isUseElevation()} is false (the default), - * or elevation adjusted {@link AstronomicalCalendar#getSunriseWithElevation()} if it is true. This allows relevant zmanim + * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), + * or elevation adjusted {@link getSunriseWithElevation()} if it is true. This allows relevant zmanim * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * - * @return {@link #getSeaLevelSunset()} if {@link #isUseElevation()} is false (the default), or elevation adjusted - * {@link AstronomicalCalendar#getSunsetWithElevation()} if it is true. - * @see com.kosherjava.zmanim.AstronomicalCalendar#getSunsetWithElevation() + * @return {@link getSeaLevelSunset()} if {@link isUseElevation()} is false (the default), or elevation adjusted + * {@link getSunsetWithElevation()} if it is true. + * @see getSunsetWithElevation() */ protected Instant getSunsetBasedOnElevationSetting() { if (isUseElevation()) { @@ -281,13 +279,13 @@ protected Instant getSunsetBasedOnElevationSetting() { } /** - * A method that returns tzais (nightfall) when the sun is {@link #ZENITH_8_POINT_5 8.5°} below the - * {@link #GEOMETRIC_ZENITH geometric horizon} (90°) after {@link #getSunsetWithElevation() sunset}, a time that Rabbi + * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the + * {@link GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunsetWithElevation() sunset}, a time that Rabbi * Meir Posen in his the Ohr Meir calculated that 3 small * stars are visible, which is later than the required 3 medium stars. This calculation is based on the sun's position below - * the horizon 36 minutes after {@link #getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which - * is 8.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * is 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return The Instant of nightfall. 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 @@ -300,14 +298,14 @@ public Instant getTzaisGeonim8Point5Degrees() { } /** - * Returns alos (dawn) based on the time when the sun is {@link #ZENITH_16_POINT_1 16.1°} below the - * eastern {@link #GEOMETRIC_ZENITH geometric horizon} before {@link #getSunriseWithElevation() sunrise}. This is based on the + * Returns alos (dawn) based on the time when the sun is {@link ZENITH_16_POINT_1 16.1°} below the + * eastern {@link GEOMETRIC_ZENITH geometric horizon} before {@link getSunriseWithElevation() sunrise}. This is based on the * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is * takes to walk 4 mil at * 18 minutes a mil (Rambam and others). The sun's position - * below the horizon 72 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem on the around the equinox / equilux is - * 16.1° below {@link #GEOMETRIC_ZENITH}. + * 16.1° below {@link GEOMETRIC_ZENITH}. * * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @@ -321,8 +319,8 @@ public Instant getAlos16Point1Degrees() { } /** - * Method to return alos (dawn) calculated as 72 minutes before {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This time + * Method to return alos (dawn) calculated as 72 minutes before {@link getSunriseWithElevation() 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 not the concept of fixed minutes) is based on the opinion that the time of the Neshef @@ -339,31 +337,31 @@ public Instant getAlos72Minutes() { } /** - * This method returns {@link #getSunTransit() Astronomical chatzos} if the + * 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() + * {@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 * 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 shaos - * zmaniyos after sunrise), while the NOAACalculator calculates it more accurately as {@link #getSunTransit() astronomical + * 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 * the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can be calculated even in the * Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the * calculator, astronomical chatzos will be returned to avoid returning a null. * - * @see AstronomicalCalendar#getSunTransit() - * @see #getChatzosAsHalfDay() - * @see #isUseAstronomicalChatzos() - * @see #setUseAstronomicalChatzos(boolean) + * @see getSunTransit() + * @see getChatzosAsHalfDay() + * @see isUseAstronomicalChatzos() + * @see setUseAstronomicalChatzos(boolean) * @return the Instant of chatzos. If the calculation can't be computed such as in the Arctic Circle * where there is at least one day where the sun does not rise, and one where it does not set, and the calculator does not * support astronomical calculations (that will never report a null) a null will be returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getChatzos() { - if (useAstronomicalChatzos) { + if (isUseAstronomicalChatzos()) { return getSunTransit(); // can be null of the calculator does not support astronomical chatzos } else { Instant halfDayChatzos = getChatzosAsHalfDay(); @@ -375,10 +373,46 @@ public Instant getChatzos() { } } + /** + * A method that returns chatzos (hayom or layla) calculated as halfway between the begin + * and end times passed in. If sunrise and sunset (or sunset and the following sunrise for chatzos halayla) + * are passed in, it will be close to, but not exactly occur when the Sun is transiting the celestial meridian due to changes in declination (the + * lengthening or shortening day). A practical example of using this would be calculating chatzos halayla for + * the night of Pesach, where Rav Shlomo Zalman + * Auerbach in the Halichos Shlomo considered chatzos halayla for the end of zman achilas afikoman + * to be halfway between an early tzais that is earlier (degree-wise) than alos the next morning, thus + * making this time earlier than astronomical chatzos. See The Definition of Chatzos for a detailed + * explanation of the ways to calculate Chatzos. This method is a convenience method that calls the parent class's + * {@link getSunTransit(Instant, Instant)}. + * + * @param begin + * the beginning of day or night for calculating chatzos. For chatzos hayom, this can be + * sea level sunrise, or any arbitrary sunrise or alos used as the beginning of the day, and for + * chatzos halayla this can be sea level sunset, or any arbitrary sunset or tzais used as + * the beginning of the night. + * @param end + * the end of day or night for calculating chatzos. For chatzos hayom, this can be sea level + * sunset, or any arbitrary sunset or tzais used as the end of day, and for chatzos halayla + * this can be sea level sunrise, or any arbitrary sunrise or alos used as the end of the night. + * + * @return the Instant representing chatzos. 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, null will be returned. See detailed explanation on top of the page. + * @see getSunTransit(Instant, Instant) + * @see getChatzosAsHalfDay() + * @see getChatzos() + */ + public Instant getChatzos(Instant begin, Instant end) { + return getSunTransit(begin, end); + } + /** * 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 + * 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 @@ -394,10 +428,11 @@ public Instant getChatzos() { * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(LocalDate, GeoLocation) * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(LocalDate, GeoLocation) * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) - * @see AstronomicalCalendar#getSunTransit(Instant, Instant) - * @see #getChatzos() - * @see #getSunTransit() - * @see #isUseAstronomicalChatzos() + * @see getSunTransit(Instant, Instant) + * @see getChatzos() + * @see getChatzos(Instant, Instant) + * @see getSunTransit() + * @see isUseAstronomicalChatzos() * * @return the Instant of the latest chatzos. 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 @@ -405,7 +440,7 @@ public Instant getChatzos() { * {@link AstronomicalCalendar} documentation. */ public Instant getChatzosAsHalfDay() { - return getSunTransit(getSeaLevelSunrise(), getSeaLevelSunset()); + return getChatzos(getSeaLevelSunrise(), getSeaLevelSunset()); } /** @@ -413,15 +448,15 @@ public Instant getChatzosAsHalfDay() { * 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 the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of - * the day. If {@link #isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be - * based on 1/6 of the time between sunrise and {@link #getSunTransit() astronomical chatzos}. As an example, passing - * {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() sea level sunrise} and {@link - * #getSeaLevelSunset() sea level sunset} to this method (or {@link #getSunriseBasedOnElevationSetting()} and {@link - * #getSunsetBasedOnElevationSetting()} that is driven off the {@link #isUseElevation()} setting) will return sof zman krias - * shema according to the opinion of the GRA. In cases - * where the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar + * the day. If {@link isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be + * based on 1/6 of the time between sunrise and {@link getSunTransit() astronomical chatzos}. As an example, passing + * {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() sea level + * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunriseBasedOnElevationSetting()} and + * {@link getSunsetBasedOnElevationSetting()} that is driven off the {@link isUseElevation()} setting) will return sof zman + * krias shema according to the opinion of the GRA. In cases where + * the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar * #getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees()} false should be passed to the synchronous parameter - * to ensure that {@link #isUseAstronomicalChatzosForOtherZmanim()} will not be used. + * to ensure that {@link isUseAstronomicalChatzosForOtherZmanim()} will not be used. * * @param startOfDay * the start of day for calculating zman krias shema. This can be sunrise or any alos passed @@ -431,9 +466,9 @@ public Instant getChatzosAsHalfDay() { * this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the latest zman shema based on the start and end of day times 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 @@ -448,7 +483,7 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean sync } /** - * A generic method for calculating the latest zman krias shema that calls {@link #getSofZmanShma(Instant, Instant, boolean)} + * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, boolean)} * 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 @@ -461,7 +496,7 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean sync * 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 {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Instant, Instant, boolean) + * @see getSofZmanShma(Instant, Instant, boolean) */ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { return getSofZmanShma(startOfDay, endOfDay, false); @@ -469,16 +504,16 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * - * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according + * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the - * {@link #isUseElevation()} setting). + * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level + * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the + * {@link isUseElevation()} setting). * - * @see #getSofZmanShma(Instant, Instant) - * @see #getShaahZmanisGRA() - * @see #isUseElevation() + * @see getSofZmanShma(Instant, Instant) + * @see getShaahZmanisGRA() + * @see isUseElevation() * @see ComprehensiveZmanimCalendar#getSofZmanShmaBaalHatanya() * @return the Instant of the latest zman shema according to the GRA. 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, @@ -490,23 +525,23 @@ public Instant getSofZmanShmaGRA() { } /** - * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the - * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link - * #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72Minutes() dawn} based on the opinion - * of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to - * {@link #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link - * #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() dawn}. + * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of + * the Magen Avraham (MGA) based on alos being {@link + * getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link + * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion + * of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to + * {@link getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link + * getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #isUseAstronomicalChatzosForOtherZmanim() - * @see #getShaahZmanis72Minutes() - * @see #getAlos72Minutes() - * @see #getSofZmanShmaMGA72Minutes() - * @see #getSofZmanShma(Instant, Instant, boolean) + * @see isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis72Minutes() + * @see getAlos72Minutes() + * @see getSofZmanShmaMGA72Minutes() + * @see getSofZmanShma(Instant, Instant, boolean) */ public Instant getSofZmanShmaMGA72Minutes() { return getSofZmanShma(getAlos72Minutes(), getTzais72Minutes(), true); @@ -519,8 +554,8 @@ public Instant getSofZmanShmaMGA72Minutes() { * 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 #getSunsetWithElevation() 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 getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} is used. * * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @return the Instant representing 72 minutes after sunset. If the calculation can't be @@ -533,19 +568,19 @@ public Instant getTzais72Minutes() { } /** - * A method to return candle lighting time, calculated as {@link #getCandleLightingOffset()} minutes before - * {@link #getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be + * A method to return candle lighting time, calculated as {@link getCandleLightingOffset()} minutes before + * {@link getSeaLevelSunset() sea level sunset}. This will return the time for any day of the week, since it can be * used to calculate candle lighting time for Yom Tov (mid-week holidays) as well. Elevation adjustments * are intentionally not performed by this method, but you can calculate it by passing the elevation adjusted sunset - * to {@link #getTimeOffset(Instant, long)}. + * to {@link getTimeOffset(Instant, long)}. * * @return candle lighting 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, a null will * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getSeaLevelSunset() - * @see #getCandleLightingOffset() - * @see #setCandleLightingOffset(double) + * @see getSeaLevelSunset() + * @see getCandleLightingOffset() + * @see setCandleLightingOffset(double) */ public Instant getCandleLighting() { return getTimeOffset(getSeaLevelSunset(), -getCandleLightingOffset() * MINUTE_MILLIS); @@ -557,14 +592,14 @@ public Instant getCandleLighting() { * 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 sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day. - * As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() - * sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} + * As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() 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 zman tfilah according to the opinion of the 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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. * @@ -576,7 +611,7 @@ public Instant getCandleLighting() { * to this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the latest zman tfilah based on the start and end of day times passed * to this method. If the calculation can't be computed such as in the Arctic Circle where there is at least @@ -596,14 +631,14 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn * 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 - * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea + * sunrise to sunset. This returns the time 5 * {@link getShaahZmanisGRA()} after {@link getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGRA() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanisGRA() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ /** @@ -612,13 +647,13 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn * day, calculated using the start and end of the day passed to this method. If the date is not erev Pesach, a * null will be returned. The time from the start of day to the end of day is divided into 12 shaos zmaniyos * (temporal hours), and sof zman biur chametz is calculated as 5 of those shaos zmaniyos after the - * beginning of the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} to this + * beginning of the day. As an example, passing {@link getSunrise() sunrise} and {@link getSunset() sunset} to this * method will return sof zman biur chametz according to the opinion of the 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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. * @@ -630,7 +665,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean syn * passed to this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the sof zman biur chametz based on the start and end of day times passed * to this method. If the date is not Erev Pesach or if the calculation can't be computed such as in the @@ -657,13 +692,13 @@ public Instant getSofZmanBiurChametz(Instant startOfDay, Instant endOfDay, boole * day, calculated using the start and end of the day passed to this method. If the date is not erev Pesach, a * null will be returned. The time from the start of day to the end of day is divided into 12 shaos zmaniyos * (temporal hours), and sof zman achilas chametz is calculated as 4 of those shaos zmaniyos after the - * beginning of the day. As an example, passing {@link #getSunrise() sunrise} and {@link #getSunset() sunset} to this + * beginning of the day. As an example, passing {@link getSunrise() sunrise} and {@link getSunset() sunset} to this * method will return sof zman achilas chametz according to the opinion of the 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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. * @@ -675,7 +710,7 @@ public Instant getSofZmanBiurChametz(Instant startOfDay, Instant endOfDay, boole * passed to this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the sof zman achilas chametz based on the start and end of day times passed * to this method. If the date is not Erev Pesach or if the calculation can't be computed such as in the @@ -693,7 +728,7 @@ public Instant getSofZmanAchilasChametz(Instant startOfDay, Instant endOfDay, bo } /** - * A generic method for calculating the latest zman tfila that calls {@link #getSofZmanTfila(Instant, Instant, boolean)} + * A generic method for calculating the latest zman tfila that calls {@link getSofZmanTfila(Instant, Instant, boolean)} * 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 @@ -706,7 +741,7 @@ public Instant getSofZmanAchilasChametz(Instant startOfDay, Instant endOfDay, bo * 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 {@link AstronomicalCalendar} documentation. - * @see #getSofZmanShma(Instant, Instant, boolean) + * @see getSofZmanShma(Instant, Instant, boolean) */ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { return getSofZmanTfila(startOfDay, endOfDay, false); @@ -714,15 +749,15 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link #getShaahZmanisGRA() shaos zmaniyos }(solar hours) after {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according + * {@link getShaahZmanisGRA() shaos zmaniyos }(solar hours) after {@link getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the - * {@link #isUseElevation()} setting). + * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level + * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the + * {@link isUseElevation()} setting). * - * @see #getSofZmanTfila(Instant, Instant) - * @see #getShaahZmanisGRA() + * @see getSofZmanTfila(Instant, Instant) + * @see getShaahZmanisGRA() * @see ComprehensiveZmanimCalendar#getSofZmanTfilaBaalHatanya() * @return the Instant of the latest zman tfilah. 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 @@ -735,19 +770,19 @@ public Instant getSofZmanTfilaGRA() { /** - * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link #getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos72Minutes()}, according to the + * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * {@link + * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes()}, according to the * Magen Avraham (MGA). The day is calculated - * from 72 minutes before {@link #getSunriseBasedOnElevationSetting()} to 72 minutes after {@link - * #getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link #isUseElevation()} setting). + * from 72 minutes before {@link getSunriseBasedOnElevationSetting()} to 72 minutes after {@link + * getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link isUseElevation()} setting). * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. - * @see #getSofZmanTfila(Instant, Instan, boolean) - * @see #getShaahZmanis72Minutes() - * @see #getAlos72Minutes() + * @see getSofZmanTfila(Instant, Instan, boolean) + * @see getShaahZmanis72Minutes() + * @see getAlos72Minutes() */ public Instant getSofZmanTfilaMGA72Minutes() { return getSofZmanTfila(getAlos72Minutes(), getTzais72Minutes(), true); @@ -758,18 +793,18 @@ public Instant getSofZmanTfilaMGA72Minutes() { * 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 - * of the day. As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() 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 gedola according to the opinion of the + * of the day. As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() 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 gedola according to the opinion of the * GRA. Alternatively, this method uses {@link - * #isUseAstronomicalChatzosForOtherZmanim()} to control if the time is based on 6.5 shaos 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 + * 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 Geonim - * or some other variant. If the day is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based + * or some other variant. If the day is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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. * @@ -781,17 +816,17 @@ public Instant getSofZmanTfilaMGA72Minutes() { * to this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the time of Mincha gedola based on the start and end of day times * 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 {@link AstronomicalCalendar} documentation. - * @see #getSunTransit() - * @see #getChatzosAsHalfDay() - * @see #getChatzos() - * @see #isUseAstronomicalChatzos() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getSunTransit() + * @see getChatzosAsHalfDay() + * @see getChatzos() + * @see isUseAstronomicalChatzos() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { @@ -802,7 +837,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay, boolean syn } /** - * A generic method for calculating mincha gedola that calls {@link #getMinchaGedola(Instant, Instant, boolean)} passing + * A generic method for calculating mincha gedola that calls {@link getMinchaGedola(Instant, Instant, boolean)} 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. @@ -816,7 +851,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay, boolean syn * 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedola(Instant, Instant, boolean) + * @see getMinchaGedola(Instant, Instant, boolean) */ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { return getMinchaGedola(startOfDay, endOfDay, false); @@ -824,22 +859,22 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 * - * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according + * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() sunrise} or + * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting), according * to the GRA. Mincha gedola is the earliest * time one can pray mincha. The Ramba"m is of the opinion that it is better to delay mincha until - * {@link #getMinchaKetanaGRA() mincha ketana GRA} while the Ra"sh, Tur, GRA and others are of the + * {@link getMinchaKetanaGRA() mincha ketana GRA} 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 #getSeaLevelSunset() sea level - * sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} + * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level + * sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} * setting). * @todo Consider adjusting this to calculate the time as half an hour zmaniyos after either {@link - * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} - * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. + * getSunTransit() astronomical chatzos} or {@link getChatzosAsHalfDay() chatzos as half a day} + * for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. * - * @see #getMinchaGedola(Instant, Instant) - * @see #getShaahZmanisGRA() - * @see #getMinchaKetanaGRA() + * @see getMinchaGedola(Instant, Instant) + * @see getShaahZmanisGRA() + * @see getMinchaKetanaGRA() * @see ComprehensiveZmanimCalendar#getMinchaGedolaBaalHatanya() * @return the Instant of the time of mincha gedola. 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 @@ -852,12 +887,12 @@ public Instant getMinchaGedolaGRA() { /** * A generic method for calculating samuch lemincha ketana, / near mincha ketana time that is half - * an hour before {@link #getMinchaKetana(Instant, Instant)} or 9 * shaos zmaniyos (temporal hours) after the + * an hour before {@link getMinchaKetana(Instant, Instant)} or 9 * 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 * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day. - * For example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() sea - * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation + * For example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() 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 samuch lemincha ketana according to the opinion of the * GRA. See the Mechaber and Mishna Berurah 232 and zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the time of Mincha ketana based on the start and end of day times * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is @@ -891,7 +926,7 @@ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay, boo } /** - * A generic method for calculating samuch lemincha ketana that calls {@link #getSamuchLeMinchaKetana(Instant, Instant, boolean)} + * A generic method for calculating samuch lemincha ketana that calls {@link getSamuchLeMinchaKetana(Instant, Instant, boolean)} * 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 @@ -904,7 +939,7 @@ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay, boo * 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 {@link AstronomicalCalendar} documentation. - * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) + * @see getSamuchLeMinchaKetana(Instant, Instant, boolean) */ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay) { return getSamuchLeMinchaKetana(startOfDay, endOfDay, false); @@ -917,14 +952,14 @@ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay) { * 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 ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() sea - * level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} + * example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() 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 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based calculations} will be bypassed. + * is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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 +971,7 @@ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay) { * this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the time of Mincha ketana based on the start and end of day times * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is @@ -952,7 +987,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay, boolean syn } /** - * A generic method for calculating mincha ketana that calls {@link #getMinchaKetana(Instant, Instant, boolean)} passing + * A generic method for calculating mincha ketana that calls {@link getMinchaKetana(Instant, Instant, boolean)} 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 @@ -965,7 +1000,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay, boolean syn * 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaKetana(Instant, Instant, boolean) + * @see getMinchaKetana(Instant, Instant, boolean) */ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { return getMinchaKetana(startOfDay, endOfDay, false); @@ -974,17 +1009,17 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { /** * This method returns mincha ketana,the preferred earliest time to pray mincha in the * opinion of the Rambam and others, that is 9.5 - * * {@link #getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting), according + * * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() sunrise} or + * {@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 #getMinchaGedolaGRA() mincha gedola}. - * The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level - * sunset} or from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} + * documentation on {@link getMinchaGedolaGRA() mincha gedola}. + * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level + * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} * setting. * - * @see #getMinchaKetana(Instant, Instant) - * @see #getShaahZmanisGRA() - * @see #getMinchaGedolaGRA() + * @see getMinchaKetana(Instant, Instant) + * @see getShaahZmanisGRA() + * @see getMinchaGedolaGRA() * @see ComprehensiveZmanimCalendar#getMinchaKetanaBaalHatanya() * @return the Instant of the time of mincha ketana. 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 @@ -1001,14 +1036,14 @@ public Instant getMinchaKetanaGRA() { * the day passed to the method. * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunrise() sea level - * sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation + * example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() 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 plag mincha according to the opinion of the * 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 Geonim or some other variant. If the day - * is not synchronous a {@link #getHalfDayBasedZman(Instant, Instant, double) half-day based calculations} will be bypassed. It + * is not synchronous a {@link getHalfDayBasedZman(Instant, Instant, 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. * @@ -1020,7 +1055,7 @@ public Instant getMinchaKetanaGRA() { * this method. * @param synchronous * If the zman has a synchronous start and end of the day. If this is false, using a {@link - * #isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by + * isUseAstronomicalChatzosForOtherZmanim()} makes no sense and will be ignored even if set to true, since by * definition chatzos will not be the middle of the day for the zman. * @return the Instant of the time of plag hamincha based on the start and end of day times * passed to this method. If the calculation can't be computed such as in the Arctic Circle where there is @@ -1036,7 +1071,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay, boolean syn } /** - * A generic method for calculating plag hamincha that calls {@link #getPlagHamincha(Instant, Instant, boolean)} passing + * A generic method for calculating plag hamincha that calls {@link getPlagHamincha(Instant, Instant, boolean)} 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 @@ -1047,22 +1082,22 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay, boolean syn * 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 {@link AstronomicalCalendar} documentation. - * @see #getPlagHamincha(Instant, Instant, boolean) + * @see getPlagHamincha(Instant, Instant, boolean) */ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { return getPlagHamincha(startOfDay, endOfDay, false); } /** - * This method returns plag hamincha, that is 10.75 * {@link #getShaahZmanisGRA() shaos zmaniyos} - * (solar hours) after {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on - * the {@link #isUseElevation()} setting), according to the plag hamincha, that is 10.75 * {@link getShaahZmanisGRA() shaos zmaniyos} + * (solar hours) after {@link getSunriseWithElevation() 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 #getSeaLevelSunset() sea level - * sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} + * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level + * sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} * - * @see #getPlagHamincha(Instant, Instant, boolean) - * @see #getPlagHamincha(Instant, Instant) + * @see getPlagHamincha(Instant, Instant, boolean) + * @see getPlagHamincha(Instant, Instant) * @see ComprehensiveZmanimCalendar#getPlagHaminchaBaalHatanya() * @return the Instant of the time of plag hamincha. 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 @@ -1074,20 +1109,20 @@ public Instant getPlagHaminchaGRA() { } /** - * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}) according to + * A method that returns a shaah zmanis ({@link getTemporalHour(Instant, Instant) 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 level - * sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() - * 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 account for elevation. + * based on the opinion of the GRA that the day runs from from {@link getSeaLevelSunrise() sea level + * sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() + * 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 account for elevation. * * @return the long millisecond length of a shaah zmanis calculated from sunrise to 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, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See * detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getTemporalHour(Instant, Instant) - * @see #getSeaLevelSunrise() - * @see #getSeaLevelSunset() + * @see getTemporalHour(Instant, Instant) + * @see getSeaLevelSunrise() + * @see getSeaLevelSunset() * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() */ public long getShaahZmanisGRA() { @@ -1097,7 +1132,7 @@ public long getShaahZmanisGRA() { /** * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. As an * example passing 1.5 to this method as done in the {@link ComprehensiveZmanimCalendar#getTzais90Zmanis()} will return - * the time 90 minutes zmaniyos after {@link #getSunsetBasedOnElevationSetting()}, a zman known as + * the time 90 minutes zmaniyos after {@link getSunsetBasedOnElevationSetting()}, a zman known as * the achtel zman or 1/8th of the length of the day (12 * 60 = 720-minute day / 8 = 90 or 1.5 hours * zmaniyos) after sunset. * @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn @@ -1130,9 +1165,9 @@ public Instant getZmanisBasedOffset(double hours) { * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72-minute 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 #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() - * sea level sunrise} (depending on the {@link #isUseElevation()} elevation setting) and dusk is 72 minutes after {@link - * #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} elevation + * tfila). Dawn for this calculation is 72 minutes before {@link getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() + * sea level sunrise} (depending on the {@link isUseElevation()} elevation setting) and dusk is 72 minutes after {@link + * getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} elevation * setting). This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating * a shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComprehensiveZmanimCalendar}. * @@ -1166,28 +1201,28 @@ public ZmanimCalendar(GeoLocation location) { } /** - * A method to get the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} which + * A method to get the offset in minutes before {@link 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 * for candle lighting time. * * @return Returns the currently set candle lighting offset in minutes. - * @see #getCandleLighting() - * @see #setCandleLightingOffset(double) + * @see getCandleLighting() + * @see setCandleLightingOffset(double) */ public double getCandleLightingOffset() { return candleLightingOffset; } /** - * A method to set the offset in minutes before {@link AstronomicalCalendar#getSeaLevelSunset() sea level sunset} that is + * A method to set the offset in minutes before {@link 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. * * @param candleLightingOffset * The candle lighting offset to set in minutes. - * @see #getCandleLighting() - * @see #getCandleLightingOffset() + * @see getCandleLighting() + * @see getCandleLightingOffset() */ public void setCandleLightingOffset(double candleLightingOffset) { this.candleLightingOffset = candleLightingOffset; @@ -1196,8 +1231,8 @@ public void setCandleLightingOffset(double candleLightingOffset) { /** * This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition. * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this - * class. Sunset is the classes current day's {@link #getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the - * {@link #isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. + * class. Sunset is the classes current day's {@link getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the + * {@link isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. * * @param currentTime the current time * @param tzais the time of tzais @@ -1252,10 +1287,10 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr * 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 page. * - * @see #getSunriseWithElevation() - * @see #getSeaLevelSunrise() - * @see #getSunsetBaalHatanya() - * @see #ZENITH_1_POINT_583 + * @see getSunriseWithElevation() + * @see getSeaLevelSunrise() + * @see getSunsetBaalHatanya() + * @see ZENITH_1_POINT_583 */ protected Instant getSunriseBaalHatanya() { return getSunriseOffsetByDegrees(ZENITH_1_POINT_583); @@ -1283,23 +1318,23 @@ protected Instant getSunriseBaalHatanya() { * rise, and one where it does not set, a null will be returned. See detailed explanation on top of * the {@link AstronomicalCalendar} documentation. * - * @see #getSunsetWithElevation() - * @see #getSeaLevelSunset() - * @see #getSunriseBaalHatanya() - * @see #ZENITH_1_POINT_583 + * @see getSunsetWithElevation() + * @see getSeaLevelSunset() + * @see getSunriseBaalHatanya() + * @see ZENITH_1_POINT_583 */ protected Instant getSunsetBaalHatanya() { return getSunsetOffsetByDegrees(ZENITH_1_POINT_583); } /** - * 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 shaos zmaniyos passed to the - * method. This simplifies the code in other methods such as {@link #getPlagHamincha(Instant, Instant)} and cuts down on - * code replication. As an example, passing {@link #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() sunset} or {@link - * #getSeaLevelSunrise() sea level sunrise} and {@link #getSeaLevelSunset() sea level sunset} (depending on the - * {@link #isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha - * according to the opinion of the GRA. + * 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 shaos zmaniyos passed to the method. This + * simplifies the code in other methods such as {@link getPlagHamincha(Instant, Instant)} and cuts down on code replication. + * As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link + * getSeaLevelSunrise() sea level sunrise} and {@link getSeaLevelSunset() sea level sunset} (depending on the {@link + * isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha according to the + * opinion of the GRA. * * @param startOfDay * the start of day for calculating the zman. This can be sunrise or any alos passed @@ -1415,8 +1450,8 @@ public Instant getHalfDayBasedZman(Instant startOfHalfDay, Instant endOfHalfDay, * 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, {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getHalfDayBasedZman(Instant, Instant, double) - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getHalfDayBasedZman(Instant, Instant, double) + * @see isUseAstronomicalChatzosForOtherZmanim() * @todo Consider adjusting various shaah zmanis times to use this. */ public long getHalfDayBasedShaahZmanis(Instant startOfHalfDay, Instant endOfHalfDay) { From c058f382a6c3cb82a41a6e8897c31d7a3a9b51d6 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 26 Apr 2026 10:33:02 -0400 Subject: [PATCH 071/121] ZmanimCalendar JavaDoc - Add source information for chatzos calculation --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 3c721c1a..6b43e0d0 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -374,19 +374,20 @@ public Instant getChatzos() { } /** - * A method that returns chatzos (hayom or layla) calculated as halfway between the begin - * and end times passed in. If sunrise and sunset (or sunset and the following sunrise for chatzos halayla) - * are passed in, it will be close to, but not exactly occur when the Sun is chatzos (hayom or layla) calculated as halfway between the begin and end + * times passed in. If sunrise and sunset (or sunset and the following sunrise for chatzos halayla) are passed in, + * the zman returned will be close to, but not exactly, when the Sun is transiting the celestial meridian due to changes in declination (the - * lengthening or shortening day). A practical example of using this would be calculating chatzos halayla for - * the night of Pesach, where Rav Shlomo Zalman - * Auerbach in the Halichos Shlomo considered chatzos halayla for the end of zman achilas afikoman - * to be halfway between an early tzais that is earlier (degree-wise) than alos the next morning, thus - * making this time earlier than astronomical chatzos. See The Definition of Chatzos for a detailed - * explanation of the ways to calculate Chatzos. This method is a convenience method that calls the parent class's - * {@link getSunTransit(Instant, Instant)}. + * lengthening or shortening day). A practical example of using this would be calculating chatzos halayla for the for + * the end of zman achilas afikoman on Pesach night, where Rav Shlomo Zalman Auerbach in the Halichos Shlomo, Moadim Nisan + * - Av, ch. 9, no. 44, pages 289-292, questioned the common practice of considering chatzos halayla as astronomical + * chatzos, and felt that for this it should be chatzi halayla, halfway between sunset and alos or + * bedieved from an early tzais that is lower (degree-wise) than alos the next morning, thus making + * this zman significantly earlier. See The + * Definition of Chatzos for a detailed explanation of the ways to calculate Chatzos. This method is a + * convenience method that calls the parent class's {@link getSunTransit(Instant, Instant)}. * * @param begin * the beginning of day or night for calculating chatzos. For chatzos hayom, this can be From 125bb12a161fa472b05074720c1f5879fc279d47 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 17:12:25 -0400 Subject: [PATCH 072/121] =?UTF-8?q?Remove=20Tzais=205.88=C2=B0=20and=20add?= =?UTF-8?q?=20notes=20about=20the=20removal=20of=20zmanim=20that=20appear?= =?UTF-8?q?=20to=20be=20too=20early?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zmanim/ComprehensiveZmanimCalendar.java | 1903 ++++++++--------- 1 file changed, 935 insertions(+), 968 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 2bd12400..7e24a260 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -30,7 +30,7 @@ * 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 * {@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 #getSunriseWithElevation() sunrise} and {@link #getSunsetWithElevation() + * time based on degrees or time before or after {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() * sunset} and are of interest for calculation beyond zmanim calculations. Here are some examples. *

        First create the Calendar for the location you would like to calculate: * @@ -52,10 +52,10 @@ * "https://www.oracle.com/java/technologies/tzdata-versions.html">up to date time zone database, create a * {@link java.util.SimpleTimeZone} with the known start and end of DST. * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal), - * add {@link AstronomicalCalendar#GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time: + * add {@link GEOMETRIC_ZENITH} (90) to the 14° offset to get the desired time: *

        *

        - *  Instant alos14 = czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 14);
        + * Instant alos14 = czc.getSunriseOffsetByDegrees({@link GEOMETRIC_ZENITH} + 14);
      *

      * To get mincha gedola calculated based on the Magen Avraham (MGA) using a shaah zmanis based on the day starting @@ -75,12 +75,12 @@ * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais * do not use identical degree-based offsets, this leads to chatzos being at a time other than the - * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note + * {@link getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes. *
      *

      - * Instant plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
      - * 				czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
      + * Instant plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees({@link GEOMETRIC_ZENITH} + 12), + * czc.getSunsetOffsetByDegrees({@link 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 @@ -92,9 +92,9 @@ *

*
*
- * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
- * 						czc.getSunsetOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
- * Instant sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link AstronomicalCalendar#GEOMETRIC_ZENITH} + 12),
+ * long shaahZmanis = czc.getTemporalHour(czc.getSunriseOffsetByDegrees({@link GEOMETRIC_ZENITH} + 12),
+ * 						czc.getSunsetOffsetByDegrees({@link GEOMETRIC_ZENITH} + ZENITH_7_POINT_083));
+ * Instant sofZmanAchila = getTimeOffset(czc.getSunriseOffsetByDegrees({@link GEOMETRIC_ZENITH} + 12),
  * 					shaahZmanis * 9);
*

* Calculating this sof zman achila according to the GRA @@ -109,216 +109,191 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar { /** - * The zenith of 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim3Point7Degrees() + * The zenith of 3.7° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim3Point7Degrees() */ protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7; /** - * The zenith of 3.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim3Point8Degrees() + * The zenith of 3.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim3Point8Degrees() */ protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8; /** - * The zenith of 5.95° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim5Point95Degrees() + * The zenith of 5.95° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim5Point95Degrees() */ protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95; /** - * The zenith of 7.083° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as + * The zenith of 7.083° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as * 7°5' (7° and 5 minutes). * - * @see #getTzaisGeonim7Point083Degrees() - * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() + * @see getTzaisGeonim7Point083Degrees() + * @see getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() */ protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5.0 / 60); /** - * The zenith of 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getMisheyakir10Point2Degrees() + * The zenith of 10.2° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir10Point2Degrees() */ protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2; /** - * The zenith of 11° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getMisheyakir11Degrees() + * The zenith of 11° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir11Degrees() */ protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11; /** - * The zenith of 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getMisheyakir11Point5Degrees() + * The zenith of 11.5° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir11Point5Degrees() */ protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5; /** - * The zenith of 12.85° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getMisheyakir12Point85Degrees() + * The zenith of 12.85° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir12Point85Degrees() */ protected static final double ZENITH_12_POINT_85 = GEOMETRIC_ZENITH + 12.85; /** - * The zenith of 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getBainHashmashosRT13Point24Degrees + * The zenith of 13.24° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getBainHashmashosRT13Point24Degrees */ protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24; /** - * The zenith of 19° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getAlos19Degrees() - * @see #ZENITH_19_POINT_8 + * The zenith of 19° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getAlos19Degrees() + * @see ZENITH_19_POINT_8 */ protected static final double ZENITH_19_DEGREES = GEOMETRIC_ZENITH + 19; /** - * The zenith of 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzais19Point8Degrees() - * @see #getAlos19Point8Degrees() - * @see #ZENITH_19_DEGREES + * The zenith of 19.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzais19Point8Degrees() + * @see getAlos19Point8Degrees() + * @see ZENITH_19_DEGREES */ protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8; /** - * The zenith of 26° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getAlos26Degrees() - * @see #getTzais26Degrees() - * @see #getAlos120Minutes() - * @see #getTzais120Minutes() + * The zenith of 26° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getAlos26Degrees() + * @see getTzais26Degrees() + * @see getAlos120Minutes() + * @see getTzais120Minutes() */ protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0; /** - * The zenith of 4.42° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim4Point42Degrees() + * The zenith of 4.42° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim4Point42Degrees() */ protected static final double ZENITH_4_POINT_42 = GEOMETRIC_ZENITH + 4.42; /** - * The zenith of 4.66° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim4Point66Degrees() + * The zenith of 4.66° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim4Point66Degrees() */ protected static final double ZENITH_4_POINT_66 = GEOMETRIC_ZENITH + 4.66; /** - * The zenith of 4.8° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisGeonim4Point8Degrees() + * The zenith of 4.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim4Point8Degrees() */ protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8; - /** - * The zenith of 5.88° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @todo Add more documentation. - */ - protected static final double ZENITH_5_POINT_88 = GEOMETRIC_ZENITH + 5.88; - /** * The zenith of 16.9° below geometric zenith (90°). * - * @see #getAlosBaalHatanya() + * @see getAlosBaalHatanya() */ protected static final double ZENITH_16_POINT_9 = GEOMETRIC_ZENITH + 16.9; /** - * The zenith of 6° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). - * @see #getTzaisBaalHatanya() + * The zenith of 6° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisBaalHatanya() */ protected static final double ZENITH_6_DEGREES = GEOMETRIC_ZENITH + 6; /** - * The zenith of 6.45° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais (nightfall) according to some opinions. This is based on the calculations of Rabbi Yechiel Michel Tucazinsky of the position of - * the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset in Jerusalem, and at the - * height of the summer solstice, this zman is 28 minutes after shkiah. This computes to 6.45° - * below {@link #GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 it the commonly - * used zman in Israel. It is also used in the Luach Itim - * Lebinah It should be noted that this differs from the 6.1°/6.2° calculation for Rabbi Tucazinsky's time - * as calculated by the Hazmanim Bahalacha Vol II chapter 50:7 (page 515). - * @todo explain the contradiction between 28 and 31 minutes. - * - * @see #getTzaisGeonim6Point45Degrees() + * The zenith of 6.45° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim6Point45Degrees() */ protected static final double ZENITH_6_POINT_45 = GEOMETRIC_ZENITH + 6.45; /** - * The zenith of 7.65° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating misheyakir according to some opinions. - * - * @see #getMisheyakir7Point65Degrees() + * The zenith of 7.65° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir7Point65Degrees() */ protected static final double ZENITH_7_POINT_65 = GEOMETRIC_ZENITH + 7.65; /** - * The zenith of 7.67° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais according to some opinions. - * - * @see #getTzaisGeonim7Point67Degrees() + * The zenith of 7.67° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim7Point67Degrees() */ protected static final double ZENITH_7_POINT_67 = GEOMETRIC_ZENITH + 7.67; /** - * The zenith of 9.3° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating tzais (nightfall) according to some opinions. - * - * @see #getTzaisGeonim9Point3Degrees() + * The zenith of 9.3° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getTzaisGeonim9Point3Degrees() */ protected static final double ZENITH_9_POINT_3 = GEOMETRIC_ZENITH + 9.3; /** - * The zenith of 9.5° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for - * calculating misheyakir according to some opinions. - * - * @see #getMisheyakir9Point5Degrees() + * The zenith of 9.5° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). + * @see getMisheyakir9Point5Degrees() */ protected static final double ZENITH_9_POINT_5 = GEOMETRIC_ZENITH + 9.5; /** - * The zenith of 9.75° below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * The zenith of 9.75° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating alos (dawn) and tzais (nightfall) according to some opinions. * - * @see #getTzaisGeonim9Point75Degrees() + * @see getTzaisGeonim9Point75Degrees() */ protected static final double ZENITH_9_POINT_75 = GEOMETRIC_ZENITH + 9.75; /** - * The zenith of 2.1° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * The zenith of 2.1° above {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating the start of bain hashmashos (twilight) of 13.5 minutes before sunset converted to degrees * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction * and from the center of the sun. It would be 0.833° less without this. * - * @see #getBainHashmashosYereim2Point1Degrees() + * @see getBainHashmashosYereim2Point1Degrees() */ protected static final double ZENITH_MINUS_2_POINT_1 = GEOMETRIC_ZENITH - 2.1; /** - * The zenith of 2.8° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * The zenith of 2.8° above {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating the start of bain hashmashos (twilight) of 16.875 minutes before sunset converted to degrees * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction * and from the center of the sun. It would be 0.833° less without this. * - * @see #getBainHashmashosYereim2Point8Degrees() + * @see getBainHashmashosYereim2Point8Degrees() */ protected static final double ZENITH_MINUS_2_POINT_8 = GEOMETRIC_ZENITH - 2.8; /** - * The zenith of 3.05° above {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for + * The zenith of 3.05° above {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for * calculating the start of bain hashmashos (twilight) of 18 minutes before sunset converted to degrees * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction * and from the center of the sun. It would be 0.833° less without this. * - * @see #getBainHashmashosYereim3Point05Degrees() + * @see getBainHashmashosYereim3Point05Degrees() */ protected static final double ZENITH_MINUS_3_POINT_05 = GEOMETRIC_ZENITH - 3.05; /** * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah. - * @see #getTzaisAteretTorah() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) + * @see getTzaisAteretTorah() + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) */ private double ateretTorahSunsetOffset = 40; @@ -339,7 +314,7 @@ public ComprehensiveZmanimCalendar(GeoLocation location) { * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the calendar to the current date. * * @see AstronomicalCalendar#AstronomicalCalendar() - * @see #ComprehensiveZmanimCalendar(GeoLocation) + * @see ComprehensiveZmanimCalendar(GeoLocation) */ public ComprehensiveZmanimCalendar() { super(); @@ -381,8 +356,8 @@ public long getShaahZmanis18Degrees() { * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation * divides the day based on the opinion of the Magen * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is - * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when - * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is + * {@link getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when + * the sun is {@link getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this * method are extremely late or early and at a point when the sky is a long time past the 18° point where the * darkest point is reached, zmanim that use this should only be used lechumra, such as @@ -392,7 +367,7 @@ public long getShaahZmanis18Degrees() { * 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 {@link Long#MIN_VALUE} * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis120Minutes() + * @see getShaahZmanis120Minutes() */ public long getShaahZmanis26Degrees() { return getTemporalHour(getAlos26Degrees(), getTzais26Degrees()); @@ -410,13 +385,13 @@ public long getShaahZmanis26Degrees() { * where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE} * will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getAlos16Point1Degrees() - * @see #getTzais16Point1Degrees() - * @see #getSofZmanShmaMGA16Point1Degrees() - * @see #getSofZmanTfilaMGA16Point1Degrees() - * @see #getMinchaGedola16Point1Degrees() - * @see #getMinchaKetana16Point1Degrees() - * @see #getPlagHamincha16Point1Degrees() + * @see getAlos16Point1Degrees() + * @see getTzais16Point1Degrees() + * @see getSofZmanShmaMGA16Point1Degrees() + * @see getSofZmanTfilaMGA16Point1Degrees() + * @see getMinchaGedola16Point1Degrees() + * @see getMinchaKetana16Point1Degrees() + * @see getPlagHamincha16Point1Degrees() */ public long getShaahZmanis16Point1Degrees() { @@ -436,9 +411,9 @@ public long getShaahZmanis16Point1Degrees() { * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getAlos60Minutes() - * @see #getTzais60Minutes() - * @see #getPlagHamincha60Minutes() + * @see getAlos60Minutes() + * @see getTzais60Minutes() + * @see getPlagHamincha60Minutes() */ public long getShaahZmanis60Minutes() { return getTemporalHour(getAlos60Minutes(), getTzais60Minutes()); @@ -447,18 +422,18 @@ public long getShaahZmanis60Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation + * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day - * from {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. + * from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getAlos72Zmanis() - * @see #getTzais72Zmanis() + * @see getAlos72Zmanis() + * @see getTzais72Zmanis() */ public long getShaahZmanis72MinutesZmanis() { return getTemporalHour(getAlos72Zmanis(), getTzais72Zmanis()); @@ -481,19 +456,19 @@ public long getShaahZmanis90Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides + * "https://en.wikipedia.org/wiki/Avraham_Gombiner">Magen Avraham (MGA) based on alos being {@link + * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal - * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunriseWithElevation() sunrise} to - * {@link #getSunsetWithElevation() sunset}. + * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunriseWithElevation() sunrise} + * to {@link getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getAlos90Zmanis() - * @see #getTzais90Zmanis() + * @see getAlos90Zmanis() + * @see getTzais90Zmanis() */ public long getShaahZmanis90MinutesZmanis() { return getTemporalHour(getAlos90Zmanis(), getTzais90Zmanis()); @@ -502,18 +477,18 @@ public long getShaahZmanis90MinutesZmanis() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides the - * day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes - * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 - * equal parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from - * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. + * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides + * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes + * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 equal + * parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from {@link + * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getAlos96Zmanis() - * @see #getTzais96Zmanis() + * @see getAlos96Zmanis() + * @see getTzais96Zmanis() */ public long getShaahZmanis96MinutesZmanis() { return getTemporalHour(getAlos96Zmanis(), getTzais96Zmanis()); @@ -522,21 +497,21 @@ public long getShaahZmanis96MinutesZmanis() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th - * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before - * {@link #getSunriseWithElevation() sunrise}, and tzais is usually calculated as {@link #getTzaisAteretTorah() 40 - * minutes} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}) after {@link #getSunsetWithElevation() + * of sunrise to sunset day, or {@link getAlos72Zmanis() 72} minutes zmaniyos of such a day before + * {@link getSunriseWithElevation() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40 + * minutes} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}) after {@link getSunsetWithElevation() * sunset}. This day is split into 12 equal parts with 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 + * 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 * 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) */ public long getShaahZmanisAteretTorah() { return getTemporalHour(getAlos72Zmanis(), getTzaisAteretTorah()); @@ -546,10 +521,10 @@ public long getShaahZmanisAteretTorah() { * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of * Rabbi Yaakov Moshe Hillel as published in the * 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 + * 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 (midday) will not be the point - * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha + * 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. @@ -559,8 +534,8 @@ public long getShaahZmanisAteretTorah() { * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaKetanaAhavatShalom() - * @see #getPlagAhavatShalom() + * @see getMinchaKetanaAhavatShalom() + * @see getPlagAhavatShalom() */ public long getShaahZmanisAlos16Point1ToTzais3Point8() { return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point8Degrees()); @@ -570,10 +545,10 @@ public long getShaahZmanisAlos16Point1ToTzais3Point8() { * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of * Rabbi Yaakov Moshe Hillel as published in the * 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 + * 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 (midday) will not be the point - * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha + * that the sun is {@link getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha * Gedola calculation. * * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed @@ -581,7 +556,7 @@ public long getShaahZmanisAlos16Point1ToTzais3Point8() { * where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaGedolaAhavatShalom() + * @see getMinchaGedolaAhavatShalom() */ public long getShaahZmanisAlos16Point1ToTzais3Point7() { return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point7Degrees()); @@ -616,7 +591,7 @@ public long getShaahZmanis96Minutes() { * 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis26Degrees() + * @see getShaahZmanis26Degrees() */ public long getShaahZmanis120Minutes() { return getTemporalHour(getAlos120Minutes(), getTzais120Minutes()); @@ -625,21 +600,20 @@ public long getShaahZmanis120Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This calculation divides - * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is - * 120 minutes zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is - * split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/6th of the day from - * {@link #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset}. Since zmanim that use this method are - * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point - * is reached, zmanim that use this should only be used lechumra such as delaying the start of - * nighttime mitzvos. + * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides + * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes + * zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is split into 12 equal + * parts with each part being a shaah zmanis. This is identical to 1/6th of the day from {@link + * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. Since zmanim that use this method are + * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached, + * zmanim that use this should only be used lechumra such as delaying the start of nighttime mitzvos. * * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. - * @see #getAlos120Zmanis() - * @see #getTzais120Zmanis() + * @see getAlos120Zmanis() + * @see getTzais120Zmanis() */ public long getShaahZmanis120MinutesZmanis() { return getTemporalHour(getAlos120Zmanis(), getTzais120Zmanis()); @@ -648,8 +622,8 @@ public long getShaahZmanis120MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha based on sunrise * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after - * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after - * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very + * {@link getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link getShaahZmanis120MinutesZmanis()} after + * {@link getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very * late tzais, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -662,11 +636,11 @@ public long getShaahZmanis120MinutesZmanis() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanis120MinutesZmanis() - * @see #getAlos120Minutes() - * @see #getTzais120Minutes() - * @see #getPlagHamincha26Degrees() - * @see #getPlagHamincha120Minutes() + * @see getShaahZmanis120MinutesZmanis() + * @see getAlos120Minutes() + * @see getTzais120Minutes() + * @see getPlagHamincha26Degrees() + * @see getPlagHamincha120Minutes() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha120MinutesZmanis() { @@ -676,8 +650,8 @@ public Instant getPlagHamincha120MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is - * calculated as 10.75 hours after {@link #getAlos120Minutes() dawn 120 minutes}. The formula used is 10.75 {@link - * #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes()}. Since the zman based on an extremely early + * calculated as 10.75 hours after {@link getAlos120Minutes() dawn 120 minutes}. The formula used is 10.75 {@link + * getShaahZmanis120Minutes()} after {@link getAlos120Minutes()}. Since the zman based on an extremely early * alos and a very late tzais, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -690,8 +664,8 @@ public Instant getPlagHamincha120MinutesZmanis() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanis120Minutes() - * @see #getPlagHamincha26Degrees() + * @see getShaahZmanis120Minutes() + * @see getPlagHamincha26Degrees() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha120Minutes() { @@ -699,8 +673,8 @@ public Instant getPlagHamincha120Minutes() { } /** - * Method to return alos (dawn) calculated as 60 minutes before {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is the + * Method to return alos (dawn) calculated as 60 minutes before {@link getSunriseWithElevation() sunrise} or + * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is the * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch. 90, though the Mekor Chaim in Ch. 58 and in the Rishonim who stated that the time * of the neshef (time between dawn and sunrise) does not vary by the time of year or location but purely depends on - * the time it takes to walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that + * the time it takes to walk the distance of 4* mil. {@link getTzaisGeonim9Point75Degrees()} is a related zman that * is a degree-based calculation based on 60 minutes. * * @return the Instant representing the time. If the calculation can't be computed such as in the Arctic @@ -723,9 +697,9 @@ public Instant getPlagHamincha120Minutes() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}. * documentation. * - * @see #getTzais60Minutes() - * @see #getPlagHamincha60Minutes() - * @see #getShaahZmanis60Minutes() + * @see getTzais60Minutes() + * @see getPlagHamincha60Minutes() + * @see getShaahZmanis60Minutes() */ public Instant getAlos60Minutes() { return getTimeOffset(getSunriseBasedOnElevationSetting(), -60 * MINUTE_MILLIS); @@ -735,10 +709,10 @@ public Instant getAlos60Minutes() { * Method to return 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 day being from {@link #getSeaLevelSunrise() sea - * level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link - * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link - * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars + * 72 minutes which is 1/10th 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 getSunriseWithElevation() sunrise} to {@link + * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} setting). The actual calculation is {@link + * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * @@ -746,15 +720,15 @@ public Instant getAlos60Minutes() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGRA() + * @see getShaahZmanisGRA() */ public Instant getAlos72Zmanis() { return getZmanisBasedOffset(-1.2); } /** - * Method to return alos (dawn) calculated using 96 minutes before {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) that is based + * Method to return alos (dawn) calculated using 96 minutes before {@link getSunriseWithElevation() 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 alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before - * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link - * #isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 mil is 90 minutes - * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} - * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link - * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is - * {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.5). + * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} + * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link + * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is + * {@link getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.5). * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGRA() + * @see getShaahZmanisGRA() */ public Instant getAlos90Zmanis() { return getZmanisBasedOffset(-1.5); @@ -793,27 +767,27 @@ public Instant getAlos90Zmanis() { /** * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before - * {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link - * #isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 minutes - * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise} - * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunriseWithElevation() sunrise} to {@link - * #getSunsetWithElevation() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link - * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.6). + * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} + * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link + * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is {@link + * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.6). * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getShaahZmanisGRA() + * @see getShaahZmanisGRA() */ public Instant getAlos96Zmanis() { return getZmanisBasedOffset(-1.6); } /** - * Method to return alos (dawn) calculated using 90 minutes before {@link #getSunriseWithElevation() sunrise} or - * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) based on the time + * Method to return alos (dawn) calculated using 90 minutes before {@link getSunriseWithElevation() sunrise} or + * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) based on the time * to walk the distance of 4 mil at * 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between @@ -831,8 +805,8 @@ public Instant getAlos90Minutes() { /** * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes - * before {@link #getSunriseWithElevation() sunrise} or {@link #getSeaLevelSunrise() sea level sunrise} (depending on the - * {@link #isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a * mil. Time based offset calculations for alos are based on the* opinion of the Rishonim who stated that the time of the neshef (time @@ -851,8 +825,8 @@ public Instant getAlos90Minutes() { * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * - * @see #getTzais120Minutes() - * @see #getAlos26Degrees() + * @see getTzais120Minutes() + * @see getAlos26Degrees() */ @Deprecated (forRemoval=false) public Instant getAlos120Minutes() { @@ -861,13 +835,13 @@ public Instant getAlos120Minutes() { /** * This method should be used lechumra only and method returns alos (dawn) calculated using - * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunriseWithElevation() sunrise} or {@link - * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based + * 120 minutes zmaniyos or 1/6th of the day before {@link getSunriseWithElevation() sunrise} or {@link + * getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is based * on a 24-minute 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 #getSeaLevelSunset() sea level sunset} or {@link - * #getSunriseWithElevation() sunrise} to {@link #getSunsetWithElevation() sunset} (depending on the {@link - * #isUseElevation()}. The actual calculation used is {@link #getSunriseWithElevation()} - ({@link #getShaahZmanisGRA()} + * {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link + * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link + * isUseElevation()}. The actual calculation used is {@link getSunriseWithElevation()} - ({@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 performed during the day. * @@ -880,8 +854,8 @@ public Instant getAlos120Minutes() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getAlos120Minutes() - * @see #getAlos26Degrees() + * @see getAlos120Minutes() + * @see getAlos26Degrees() */ @Deprecated (forRemoval=false) public Instant getAlos120Zmanis() { @@ -890,11 +864,11 @@ public Instant getAlos120Zmanis() { /** * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link - * #ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same - * calculation of {@link #getAlos120Minutes() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes. This - * calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which - * calculates to 26° below {@link #GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should + * calculates to 26° below {@link GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should * only be used lechumra only, such as not eating after this time on a fast day, and not as the start time for * mitzvos that can only be performed during the day. * @@ -907,10 +881,9 @@ public Instant getAlos120Zmanis() { * 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. - * @see #ZENITH_26_DEGREES - * @see #getAlos120Minutes() - * @see #getTzais120Minutes() - * @see #getTzais26Degrees() + * @see getAlos120Minutes() + * @see getTzais120Minutes() + * @see getTzais26Degrees() */ @Deprecated (forRemoval=false) public Instant getAlos26Degrees() { @@ -918,21 +891,21 @@ public Instant getAlos26Degrees() { } /** - * A method to return alos (dawn) calculated when the sun is {@link #ASTRONOMICAL_ZENITH 18°} below the + * A method to return alos (dawn) calculated when the sun is {@link ASTRONOMICAL_ZENITH 18°} below the * eastern geometric horizon before sunrise. * * @return the Instant representing alos. 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. - * @see #ASTRONOMICAL_ZENITH + * @see ASTRONOMICAL_ZENITH */ public Instant getAlos18Degrees() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } /** - * A method to return alos (dawn) calculated when the sun is {@link #ZENITH_19_DEGREES 19°} below the + * A method to return alos (dawn) calculated when the sun is {@link ZENITH_19_DEGREES 19°} below the * eastern geometric horizon before sunrise. This is the Rambam's alos according to Rabbi Moshe Kosower's Maaglei Tzedek, page 88, alos (dawn) calculated when the sun is {@link #ZENITH_19_POINT_8 19.8°} below the + * Method to return alos (dawn) calculated when the sun is {@link ZENITH_19_POINT_8 19.8°} below the * eastern geometric horizon before sunrise. This calculation is based on the same calculation of - * {@link #getAlos90Minutes() 90 minutes} before sunrise, but uses a degree-based calculation instead of 90 exact minutes. + * {@link getAlos90Minutes() 90 minutes} before sunrise, but uses a degree-based calculation instead of 90 exact minutes. * This calculation is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which - * calculates to 19.8° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * calculates to 19.8° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return the Instant representing alos. 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. - * @see #getAlos90Minutes() - * @see #getTzais19Point8Degrees() + * @see getAlos90Minutes() + * @see getTzais19Point8Degrees() */ public Instant getAlos19Point8Degrees() { return getSunriseOffsetByDegrees(ZENITH_19_POINT_8); } /** - * This method returns misheyakir based on the position of the sun {@link #ZENITH_12_POINT_85 12.85°} - * below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly - * later than 57 minutes before {@link #getSunriseWithElevation() sunrise} in Jerusalem misheyakir based on the position of the sun {@link ZENITH_12_POINT_85 12.85°} + * below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly + * later than 57 minutes before {@link getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux. This * zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and null will be returned. See * detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #ZENITH_12_POINT_85 + * @see ZENITH_12_POINT_85 */ @Deprecated (forRemoval=false) public Instant getMisheyakir12Point85Degrees() { @@ -1013,63 +986,63 @@ public Instant getMisheyakir12Point85Degrees() { } /** - * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES - * 11.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating + * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES + * 11.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes - * before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, - * which calculates to 11.5° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * which calculates to 11.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * @todo recalculate. * * @return the Instant of misheyakir. 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. - * @see #ZENITH_11_POINT_5 + * @see ZENITH_11_POINT_5 */ public Instant getMisheyakir11Point5Degrees() { return getSunriseOffsetByDegrees(ZENITH_11_POINT_5); } /** - * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_11_DEGREES - * 11°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating + * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES + * 11°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes - * before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, - * which calculates to 11° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * which calculates to 11° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return 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. - * @see #ZENITH_11_DEGREES + * @see ZENITH_11_DEGREES */ public Instant getMisheyakir11Degrees() { return getSunriseOffsetByDegrees(ZENITH_11_DEGREES); } /** - * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_10_POINT_2 - * 10.2°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating + * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_10_POINT_2 + * 10.2°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes - * before {@link #getSunriseWithElevation() sunrise} in Jerusalem around the equinox which calculates - * to 10.2° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * to 10.2° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return the Instant of misheyakir. 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. - * @see #ZENITH_10_POINT_2 + * @see ZENITH_10_POINT_2 */ public Instant getMisheyakir10Point2Degrees() { return getSunriseOffsetByDegrees(ZENITH_10_POINT_2); } /** - * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_7_POINT_65 - * 7.65°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute + * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_7_POINT_65 + * 7.65°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). The degrees are based on a 35/36 minute * zman around the * equinox / equilux, when the neshef (twilight) is the shortest. This time is based on Rabbi Moshe Feinstein who writes in null will be returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #ZENITH_7_POINT_65 - * @see #getMisheyakir9Point5Degrees() + * @see ZENITH_7_POINT_65 + * @see getMisheyakir9Point5Degrees() */ public Instant getMisheyakir7Point65Degrees() { return getSunriseOffsetByDegrees(ZENITH_7_POINT_65); } /** - * This method returns misheyakir based on the position of the sun when it is {@link #ZENITH_9_POINT_5 - * 9.5°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on misheyakir based on the position of the sun when it is {@link ZENITH_9_POINT_5 + * 9.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is based on Rabbi Dovid Kronglass's Calculation of 45 minutes in Baltimore * as mentioned in Divrei Chachamim No. 24 * brought down by the Birur Halacha, Tinyana, Ch. @@ -1121,8 +1094,8 @@ public Instant getMisheyakir7Point65Degrees() { * 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. * - * @see #ZENITH_9_POINT_5 - * @see #getMisheyakir7Point65Degrees() + * @see ZENITH_9_POINT_5 + * @see getMisheyakir7Point65Degrees() */ public Instant getMisheyakir9Point5Degrees() { return getSunriseOffsetByDegrees(ZENITH_9_POINT_5); @@ -1131,38 +1104,37 @@ public Instant getMisheyakir9Point5Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunriseWithElevation() sunrise}. This - * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link - * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunriseWithElevation() sunrise}. This + * time is 3 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link + * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall * with both being 19.8° below sunrise or sunset. This returns the time of 3 * - * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. + * {@link getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. - * @see #getShaahZmanis19Point8Degrees() - * @see #getAlos19Point8Degrees() + * @see getShaahZmanis19Point8Degrees() + * @see getAlos19Point8Degrees() */ public Instant getSofZmanShmaMGA19Point8Degrees() { return getSofZmanShma(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); } /** - * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the - * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time - * is 3 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after - * {@link #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from - * dawn to nightfall with both being 16.1° below sunrise or sunset. This returns the time of - * 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. + * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of + * the Magen Avraham (MGA) based on alos being {@link + * getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link + * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based on + * the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. + * This returns the time of 3 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. - * @see #getShaahZmanis16Point1Degrees() - * @see #getAlos16Point1Degrees() + * @see getShaahZmanis16Point1Degrees() + * @see getAlos16Point1Degrees() */ public Instant getSofZmanShmaMGA16Point1Degrees() { return getSofZmanShma(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); @@ -1171,18 +1143,18 @@ public Instant getSofZmanShmaMGA16Point1Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunriseWithElevation() sunrise}. This time is 3 - * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn} + * on alos being {@link getAlos18Degrees() 18°} before {@link getSunriseWithElevation() sunrise}. This time is 3 + * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° - * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after - * {@link #getAlos18Degrees() dawn}. + * below sunrise or sunset. This returns the time of 3 * {@link getShaahZmanis18Degrees()} after + * {@link getAlos18Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. - * @see #getShaahZmanis18Degrees() - * @see #getAlos18Degrees() + * @see getShaahZmanis18Degrees() + * @see getAlos18Degrees() */ public Instant getSofZmanShmaMGA18Degrees() { return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees(), true); @@ -1191,21 +1163,21 @@ public Instant getSofZmanShmaMGA18Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before - * {@link #getSunriseWithElevation() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} - * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated - * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before - * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes - * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 * - * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. + * on alos being {@link getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before + * {@link getSunriseWithElevation() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} + * (solar hours) after {@link getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated + * from a {@link getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before + * {@link getSeaLevelSunrise() sea level sunrise} to {@link getTzais72Zmanis() nightfall} of 72 minutes + * zmaniyos after {@link getSeaLevelSunset() sea level sunset}. This returns the time of 3 * + * {@link getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72MinutesZmanis() - * @see #getAlos72Zmanis() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis72MinutesZmanis() + * @see getAlos72Zmanis() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA72MinutesZmanis() { return getSofZmanShma(getAlos72Zmanis(), getTzais72Zmanis(), true); @@ -1214,19 +1186,19 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 - * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to - * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * - * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}. + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 + * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to + * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * + * {@link getShaahZmanis90Minutes()} after {@link getAlos90Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis90Minutes() - * @see #getAlos90Minutes() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis90Minutes() + * @see getAlos90Minutes() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA90Minutes() { return getSofZmanShma(getAlos90Minutes(), getTzais90Minutes(), true); @@ -1235,41 +1207,41 @@ public Instant getSofZmanShmaMGA90Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() - * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after - * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link - * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} - * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()} - * after {@link #getAlos90Zmanis() dawn}. + * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() + * sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after + * {@link getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link + * getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} + * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link getShaahZmanis90MinutesZmanis()} + * after {@link getAlos90Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis90MinutesZmanis() - * @see #getAlos90Zmanis() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis90MinutesZmanis() + * @see getAlos90Zmanis() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA90MinutesZmanis() { return getSofZmanShma(getAlos90Zmanis(), getTzais90Zmanis(), true); } /** - * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the - * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos96Minutes() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 3 - * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before - * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link - * #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}. + * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of + * the Magen Avraham (MGA) based on alos being {@link + * getAlos96Minutes() 96} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link + * getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on the opinion + * of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link + * getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis96Minutes()} + * after {@link getAlos96Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis96Minutes() - * @see #getAlos96Minutes() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis96Minutes() + * @see getAlos96Minutes() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA96Minutes() { return getSofZmanShma(getAlos96Minutes(), getTzais96Minutes(), true); @@ -1278,20 +1250,20 @@ public Instant getSofZmanShmaMGA96Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() - * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after - * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link - * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} - * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()} - * after {@link #getAlos96Zmanis() dawn}. + * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() + * sunrise}. This time is 3 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after + * {@link getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link + * getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} + * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link getShaahZmanis96MinutesZmanis()} + * after {@link getAlos96Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis96MinutesZmanis() - * @see #getAlos96Zmanis() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis96MinutesZmanis() + * @see getAlos96Zmanis() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA96MinutesZmanis() { return getSofZmanShma(getAlos96Zmanis(), getTzais96Zmanis(), true); @@ -1299,7 +1271,7 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated - * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link ZmanimCalendar#getChatzos()}. + * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link getChatzos()}. * Generally known as part of the "Komarno" zmanim after Rav Yitzchak Eizik of * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the @@ -1318,9 +1290,9 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() { * 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 * {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getChatzos() - * @see #getSofZmanTfila2HoursBeforeChatzos() - * @see #isUseAstronomicalChatzos() + * @see getChatzos() + * @see getSofZmanTfila2HoursBeforeChatzos() + * @see isUseAstronomicalChatzos() */ public Instant getSofZmanShma3HoursBeforeChatzos() { return getTimeOffset(getChatzos(), -180 * MINUTE_MILLIS); @@ -1329,46 +1301,46 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link #getAlos120Minutes() 120} minutes or 1/6th of the day before {@link #getSunriseWithElevation() sunrise}. - * This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120Minutes() - * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120 minutes - * before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of 3 - * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman that + * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunriseWithElevation() + * sunrise}. This time is 3 {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link + * getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} + * of 120 minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of + * 3 {@link getShaahZmanis120Minutes()} after {@link getAlos120Minutes() dawn}. This is an extremely early zman that * is very much a chumra. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis120Minutes() - * @see #getAlos120Minutes() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis120Minutes() + * @see getAlos120Minutes() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanShmaMGA120Minutes() { return getSofZmanShma(getAlos120Minutes(), getTzais120Minutes(), true); } /** - * This method returns the latest zman krias shema (time to recite Shema in the morning) based - * on the opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at - * {@link #getSeaLevelSunset() sea level sunset}. This is the opinion of the zman krias shema (time to recite Shema in the morning) based on the + * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link + * getSeaLevelSunset() sea level sunset}. This is the opinion of the \u05D7\u05D9\u05D3\u05D5\u05E9\u05D9 * \u05D5\u05DB\u05DC\u05DC\u05D5\u05EA \u05D4\u05E8\u05D6\u05F4\u05D4 and the \u05DE\u05E0\u05D5\u05E8\u05D4 \u05D4\u05D8\u05D4\u05D5\u05E8\u05D4 as * mentioned by Yisrael Vehazmanim vol 1, sec. 7, * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link - * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours) - * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link - * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}. + * getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours) + * after {@link getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link + * getAlos16Point1Degrees() alos 16.1°} to {@link getSeaLevelSunset() sea level sunset}. * Note: Based on this calculation chatzos will not be at midday and {@link - * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. + * isUseAstronomicalChatzosForOtherZmanim()} will be ignored. * * @return the Instant of the latest zman krias shema based on this day. 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. - * @see #getAlos16Point1Degrees() - * @see #getSeaLevelSunset() + * @see getAlos16Point1Degrees() + * @see getSeaLevelSunset() */ public Instant getSofZmanShmaAlos16Point1ToSunset() { return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); @@ -1376,22 +1348,22 @@ public Instant getSofZmanShmaAlos16Point1ToSunset() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the - * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at - * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated - * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3 - * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on - * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to - * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. + * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at + * {@link getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated + * based on this day and added to {@link getAlos16Point1Degrees() alos} to reach this time. This time is 3 + * shaos zmaniyos (temporal hours) after {@link getAlos16Point1Degrees() alos 16.1°} based on + * the opinion that the day is calculated from a {@link getAlos16Point1Degrees() alos 16.1°} to + * {@link getTzaisGeonim7Point083Degrees() tzais 7.083°}. * Note: Based on this calculation chatzos will not be at midday and {@link - * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored. + * isUseAstronomicalChatzosForOtherZmanim()} will be ignored. * * @return the Instant of the latest zman krias shema based on this calculation. 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. - * @see #getAlos16Point1Degrees() - * @see #getTzaisGeonim7Point083Degrees() + * @see getAlos16Point1Degrees() + * @see getTzaisGeonim7Point083Degrees() */ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { return getSofZmanShma(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); @@ -1400,20 +1372,20 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunriseWithElevation() sunrise}. This time - * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link - * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunriseWithElevation() sunrise}. This time + * is 4 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link + * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link - * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}. + * getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. * - * @see #getShaahZmanis19Point8Degrees() - * @see #getAlos19Point8Degrees() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanis19Point8Degrees() + * @see getAlos19Point8Degrees() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getSofZmanTfilaMGA19Point8Degrees() { return getSofZmanTfila(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true); @@ -1422,19 +1394,19 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time - * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link - * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to + * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time + * is 4 {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link + * getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link - * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}. + * getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. * - * @see #getShaahZmanis16Point1Degrees() - * @see #getAlos16Point1Degrees() + * @see getShaahZmanis16Point1Degrees() + * @see getAlos16Point1Degrees() */ public Instant getSofZmanTfilaMGA16Point1Degrees() { return getSofZmanTfila(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); @@ -1443,19 +1415,19 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn} + * alos being {@link getAlos18Degrees() 18°} before {@link getSunriseWithElevation() sunrise}. This time is 4 + * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° - * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after - * {@link #getAlos18Degrees() dawn}. + * below sunrise or sunset. This returns the time of 4 * {@link getShaahZmanis18Degrees()} after + * {@link getAlos18Degrees() dawn}. * * @return the Instant of the latest zman krias shema. 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. * - * @see #getShaahZmanis18Degrees() - * @see #getAlos18Degrees() + * @see getShaahZmanis18Degrees() + * @see getAlos18Degrees() */ public Instant getSofZmanTfilaMGA18Degrees() { return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees(), true); @@ -1464,18 +1436,18 @@ public Instant getSofZmanTfilaMGA18Degrees() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn} - * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 - * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos - * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. + * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is 4 + * {@link getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos72Zmanis() dawn} + * based on the opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 + * minutes zmaniyos before sunrise to {@link getTzais72Zmanis() nightfall} of 72 minutes zmaniyos + * after sunset. This returns the time of 4 * {@link getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72MinutesZmanis() - * @see #getAlos72Zmanis() + * @see getShaahZmanis72MinutesZmanis() + * @see getAlos72Zmanis() */ public Instant getSofZmanTfilaMGA72MinutesZmanis() { return getSofZmanTfila(getAlos72Zmanis(), getTzais72Zmanis(), true); @@ -1484,18 +1456,18 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to - * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 * - * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}. + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunriseWithElevation() sunrise}. This time is 4 + * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to + * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 * + * {@link getShaahZmanis90Minutes()} after {@link getAlos90Minutes() dawn}. * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis90Minutes() - * @see #getAlos90Minutes() + * @see getShaahZmanis90Minutes() + * @see getAlos90Minutes() */ public Instant getSofZmanTfilaMGA90Minutes() { return getSofZmanTfila(getAlos90Minutes(), getTzais90Minutes(), true); @@ -1504,19 +1476,19 @@ public Instant getSofZmanTfilaMGA90Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is - * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis() - * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn} - * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes - * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after - * {@link #getAlos90Zmanis() dawn}. + * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is + * 4 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos90Zmanis() + * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos90Zmanis() dawn} + * of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} of 90 minutes + * zmaniyos after sunset. This returns the time of 4 * {@link getShaahZmanis90MinutesZmanis()} after + * {@link getAlos90Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis90MinutesZmanis() - * @see #getAlos90Zmanis() + * @see getShaahZmanis90MinutesZmanis() + * @see getAlos90Zmanis() */ public Instant getSofZmanTfilaMGA90MinutesZmanis() { return getSofZmanTfila(getAlos90Zmanis(), getTzais90Zmanis(), true); @@ -1525,18 +1497,18 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos96Minutes() 96} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 4 - * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on - * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before - * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * - * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}. + * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunriseWithElevation() sunrise}. This time is 4 + * {@link getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on + * the opinion of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before + * sunrise to {@link getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * + * {@link getShaahZmanis96Minutes()} after {@link getAlos96Minutes() dawn}. * * @return the Instant 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis96Minutes() - * @see #getAlos96Minutes() + * @see getShaahZmanis96Minutes() + * @see getAlos96Minutes() */ public Instant getSofZmanTfilaMGA96Minutes() { return getSofZmanTfila(getAlos96Minutes(), getTzais96Minutes(), true); @@ -1545,19 +1517,19 @@ public Instant getSofZmanTfilaMGA96Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunriseWithElevation() sunrise}. This time is - * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis() - * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn} - * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes - * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after - * {@link #getAlos96Zmanis() dawn}. + * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is + * 4 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos96Zmanis() + * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos96Zmanis() dawn} + * of 96 minutes zmaniyos before sunrise to {@link getTzais96Zmanis() nightfall} of 96 minutes + * zmaniyos after sunset. This returns the time of 4 * {@link getShaahZmanis96MinutesZmanis()} after + * {@link getAlos96Zmanis() dawn}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis90MinutesZmanis() - * @see #getAlos90Zmanis() + * @see getShaahZmanis90MinutesZmanis() + * @see getAlos90Zmanis() */ public Instant getSofZmanTfilaMGA96MinutesZmanis() { return getSofZmanTfila(getAlos96Zmanis(), getTzais96Zmanis(), true); @@ -1566,19 +1538,19 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link #getAlos120Minutes() 120} minutes before {@link #getSunriseWithElevation() sunrise} . This time is 4 - * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120Minutes() dawn} - * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120 - * minutes before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of - * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman + * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunriseWithElevation() sunrise} . This time is 4 + * {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link getAlos120Minutes() dawn} + * based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} of 120 + * minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of + * 4 * {@link getShaahZmanis120Minutes()} after {@link getAlos120Minutes() dawn}. This is an extremely early zman * that is very much a chumra. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis120Minutes() - * @see #getAlos120Minutes() + * @see getShaahZmanis120Minutes() + * @see getAlos120Minutes() */ public Instant getSofZmanTfilaMGA120Minutes() { return getSofZmanTfila(getAlos120Minutes(), getTzais120Minutes(), true); @@ -1586,43 +1558,43 @@ public Instant getSofZmanTfilaMGA120Minutes() { /** * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours - * before {@link ZmanimCalendar#getChatzos()}. This is based on the opinions that calculate - * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours - * before {@link ZmanimCalendar#getChatzos()}. + * before {@link getChatzos()}. This is based on the opinions that calculate + * sof zman krias shema as {@link getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours + * before {@link getChatzos()}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getChatzos() - * @see #getSofZmanShma3HoursBeforeChatzos() + * @see getChatzos() + * @see getSofZmanShma3HoursBeforeChatzos() */ public Instant getSofZmanTfila2HoursBeforeChatzos() { return getTimeOffset(getChatzos(), -120 * MINUTE_MILLIS); } /** - * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzos() chatzos} - * and not 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} after {@link #getChatzos() chatzos} as - * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when - * 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See - * {@link #getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One - * should not use this time to start mincha before the standard {@link #getMinchaGedolaGRA() mincha gedola}. + * This method returns mincha gedola calculated as 30 minutes after {@link getChatzos() chatzos} + * and not 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} after {@link getChatzos() chatzos} as + * calculated by {@link getMinchaGedola}. Some use this time to delay the start of mincha in the winter when + * 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See + * {@link getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One + * should not use this time to start mincha before the standard {@link getMinchaGedolaGRA() mincha gedola}. * See Shulchan Aruch Orach Chayim 234:1 and * the Shaar Hatziyon seif katan ches. Since this calculation is a fixed 30 minutes of regular clock time after - * chatzos, even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha - * gedola time will be affected by {@link #isUseAstronomicalChatzos()} and not by - * {@link #isUseAstronomicalChatzosForOtherZmanim()}. + * chatzos, even if {@link isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha + * gedola time will be affected by {@link isUseAstronomicalChatzos()} and not by + * {@link isUseAstronomicalChatzosForOtherZmanim()}. * * @return the Instant of 30 minutes after chatzos. 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 * {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedolaGRA() - * @see #getMinchaGedolaGreaterThan30(Instant) - * @see #getChatzos() - * @see #isUseAstronomicalChatzos() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getMinchaGedolaGRA() + * @see getMinchaGedolaGreaterThan30(Instant) + * @see getChatzos() + * @see isUseAstronomicalChatzos() + * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getMinchaGedola30Minutes() { return getTimeOffset(getChatzos(), MINUTE_MILLIS * 30); @@ -1631,19 +1603,19 @@ public Instant getMinchaGedola30Minutes() { /** * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72 * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For - * more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is - * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * - * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}. If {@link - * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} - * and {@link #getTzais72Minutes()} after {@link #getChatzos()}. - * - * @see #getAlos72Minutes() - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaGRA() - * @see ZmanimCalendar#getMinchaGedolaGRA() - * @see #getChatzos() - * @see #isUseAstronomicalChatzosForOtherZmanim() + * more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is + * calculated as 6.5 {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 * + * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos}. If {@link + * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 + * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzos()} + * and {@link getTzais72Minutes()} after {@link getChatzos()}. + * + * @see getAlos72Minutes() + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaGRA() + * @see getMinchaGedolaGRA() + * @see getChatzos() + * @see isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the time of mincha gedola. 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 @@ -1660,15 +1632,15 @@ public Instant getMinchaGedola72Minutes() { /** * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on - * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 6.5 - * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 * - * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. If {@link - * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzos()} - * and {@link #getAlos16Point1Degrees()} after {@link #getChatzos()}. - * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaGRA() + * this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is calculated as 6.5 + * {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 * + * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() alos}. If {@link + * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 + * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzos()} + * and {@link getAlos16Point1Degrees()} after {@link getChatzos()}. + * @see getShaahZmanis16Point1Degrees() + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaGRA() * @return the Instant of the time of mincha gedola. 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. @@ -1688,22 +1660,22 @@ public Instant getMinchaGedola16Point1Degrees() { * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">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 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. + * {@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(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola. - * For more information about mincha gedola see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. + * getMinchaGedolaGreaterThan30(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola. + * For more information about mincha gedola see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. * Since calculation of this zman involves chatzos that is offset from the center of the astronomical day, - * {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here. + * {@link isUseAstronomicalChatzosForOtherZmanim()} is N/A here. * @return the Instant of the mincha gedola. 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. * - * @see #getAlos16Point1Degrees() - * @see #getTzaisGeonim3Point7Degrees() - * @see #getShaahZmanisAlos16Point1ToTzais3Point7() - * @see #getMinchaGedolaGreaterThan30(Instant) + * @see getAlos16Point1Degrees() + * @see getTzaisGeonim3Point7Degrees() + * @see getShaahZmanisAlos16Point1ToTzais3Point7() + * @see getMinchaGedolaGreaterThan30(Instant) */ public Instant getMinchaGedolaAhavatShalom() { if (getChatzos() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) { @@ -1716,21 +1688,21 @@ public Instant getMinchaGedolaAhavatShalom() { /** * This is a convenience method that returns the later of the minchaGedola passed in 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 the minchaGedola passed in will be + * getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} is less + * than 30 minutes {@link getMinchaGedola30Minutes()} will be returned, otherwise the minchaGedola passed in will be * returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah - * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha - * time may be affected by {@link #isUseAstronomicalChatzos()}. + * zmanis), even if {@link isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha + * time may be affected by {@link isUseAstronomicalChatzos()}. * * @param minchaGedola - * the mincha gedola to be compared to {@link #getMinchaGedola30Minutes()}. - * @return the Instant of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}. + * the mincha gedola to be compared to {@link getMinchaGedola30Minutes()}. + * @return the Instant of the later of {@link getMinchaGedolaGRA()} and {@link getMinchaGedola30Minutes()}. * 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 {@link AstronomicalCalendar} documentation. - * @see #getMinchaGedolaGRA() - * @see #getMinchaGedola30Minutes() - * @see #isUseAstronomicalChatzos() + * @see getMinchaGedolaGRA() + * @see getMinchaGedola30Minutes() + * @see isUseAstronomicalChatzos() * */ public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) { @@ -1746,13 +1718,13 @@ public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) { * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the * opinion of the Rambam and others. For more information on - * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 9.5 - * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 * - * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. + * this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is calculated as 9.5 + * {@link getTemporalHour() solar hours} after alos. The calculation used is 9.5 * + * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() alos}. * - * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaGRA() + * @see getShaahZmanis16Point1Degrees() + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaGRA() * @return the Instant 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 @@ -1766,20 +1738,20 @@ public Instant getMinchaKetana16Point1Degrees() { * This method returns the time of mincha ketana 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 ketana is calculated as 2.5 shaos - * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos - * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at + * zmaniyos before {@link getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos + * calculated based on a day starting at {@link getAlos16Point1Degrees() alos 16.1°} and ending at * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to * the opinion of the Rambam and others. For more information - * on this see the documentation on {@link #getMinchaKetanaGRA() mincha ketana}. + * on this see the documentation on {@link getMinchaKetanaGRA() mincha ketana}. * * @return the Instant 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. * - * @see #getShaahZmanisAlos16Point1ToTzais3Point8() - * @see #getMinchaGedolaAhavatShalom() - * @see #getPlagAhavatShalom() + * @see getShaahZmanisAlos16Point1ToTzais3Point8() + * @see getMinchaGedolaAhavatShalom() + * @see getPlagAhavatShalom() */ public Instant getMinchaKetanaAhavatShalom() { return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 2.5); @@ -1789,13 +1761,13 @@ public Instant getMinchaKetanaAhavatShalom() { * This method returns the time of mincha ketana according to the Magen Avraham with the day * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray * mincha according to the opinion of the Rambam - * and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. - * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 * - * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}. + * and others. For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. + * This is calculated as 9.5 {@link getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 * + * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos}. * - * @see #getShaahZmanis16Point1Degrees() - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaGRA() + * @see getShaahZmanis16Point1Degrees() + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaGRA() * @return the Instant of the time of mincha ketana. 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 @@ -1808,16 +1780,16 @@ public Instant getMinchaKetana72Minutes() { /** * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60 * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after - * {@link #getAlos60Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60Minutes()}. + * {@link getAlos60Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis60Minutes()} after {@link getAlos60Minutes()}. * * @return the Instant of the time of plag hamincha. 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 * {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanis60Minutes() - * @see #getAlos60Minutes() - * @see #getTzais60Minutes() + * @see getShaahZmanis60Minutes() + * @see getAlos60Minutes() + * @see getTzais60Minutes() */ public Instant getPlagHamincha60Minutes() { return getPlagHamincha(getAlos60Minutes(), getTzais60Minutes(), true); @@ -1826,8 +1798,8 @@ public Instant getPlagHamincha60Minutes() { /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated - * as 10.75 hours after {@link #getAlos72Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after - * {@link #getAlos72Minutes()}. Since plag by this calculation can occur after sunset, it should only be used + * as 10.75 hours after {@link getAlos72Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis72Minutes()} after + * {@link getAlos72Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1840,7 +1812,7 @@ public Instant getPlagHamincha60Minutes() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanis72Minutes() + * @see getShaahZmanis72Minutes() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha72Minutes() { @@ -1850,8 +1822,8 @@ public Instant getPlagHamincha72Minutes() { /** * This method should be used lechumra only and returns the time of plag hamincha according to the * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated - * as 10.75 hours after {@link #getAlos90Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after - * {@link #getAlos90Minutes()}. Since plag by this calculation can occur after sunset, it should only be used + * as 10.75 hours after {@link getAlos90Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis90Minutes()} after + * {@link getAlos90Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1864,7 +1836,7 @@ public Instant getPlagHamincha72Minutes() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanis90Minutes() + * @see getShaahZmanis90Minutes() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha90Minutes() { @@ -1874,8 +1846,8 @@ public Instant getPlagHamincha90Minutes() { /** * This method should be used lechumra only and returns the time of plag hamincha according to the Magen * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75 - * hours after {@link #getAlos96Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after - * {@link #getAlos96Minutes()}. Since plag by this calculation can occur after sunset, it should only be used + * hours after {@link getAlos96Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis96Minutes()} after + * {@link getAlos96Minutes()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1887,7 +1859,7 @@ public Instant getPlagHamincha90Minutes() { * 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 * {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis96Minutes() + * @see getShaahZmanis96Minutes() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha96Minutes() { @@ -1896,8 +1868,8 @@ public Instant getPlagHamincha96Minutes() { /** * This method should be used lechumra only and returns the time of plag hamincha. This is calculated - * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link - * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can + * as 10.75 hours after {@link getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link + * getShaahZmanis96MinutesZmanis()} after {@link getAlos96Zmanis() dawn}. Since plag by this calculation can * occur after sunset, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1917,8 +1889,8 @@ public Instant getPlagHamincha96MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha. This is calculated - * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link - * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can + * as 10.75 hours after {@link getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link + * getShaahZmanis90MinutesZmanis()} after {@link getAlos90Zmanis() dawn}. Since plag by this calculation can * occur after sunset, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1938,8 +1910,8 @@ public Instant getPlagHamincha90MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as - * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after - * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used + * 10.75 hours after {@link getAlos72Zmanis()}. The formula used is 10.75 * {@link getShaahZmanis72MinutesZmanis()} after + * {@link getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1959,10 +1931,10 @@ public Instant getPlagHamincha72MinutesZmanis() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the - * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link - * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos - * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()} - * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it + * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link + * getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos + * after {@link getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis16Point1Degrees()} + * after {@link getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it * should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -1975,7 +1947,7 @@ public Instant getPlagHamincha72MinutesZmanis() { * 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. * - * @see #getShaahZmanis16Point1Degrees() + * @see getShaahZmanis16Point1Degrees() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha16Point1Degrees() { @@ -1984,10 +1956,10 @@ public Instant getPlagHamincha16Point1Degrees() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the - * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link - * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos - * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link - * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this + * opinion that the day starts at {@link getAlos19Point8Degrees() alos 19.8°} and ends at {@link + * getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos + * after {@link getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link + * getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees()}. Since plag by this * calculation can occur after sunset, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -2000,7 +1972,7 @@ public Instant getPlagHamincha16Point1Degrees() { * 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. * - * @see #getShaahZmanis19Point8Degrees() + * @see getShaahZmanis19Point8Degrees() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha19Point8Degrees() { @@ -2009,10 +1981,10 @@ public Instant getPlagHamincha19Point8Degrees() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the - * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link - * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link - * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link - * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late + * opinion that the day starts at {@link getAlos26Degrees() alos 26°} and ends at {@link + * getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link + * getAlos26Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis26Degrees()} after {@link + * getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late * tzais, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -2025,8 +1997,8 @@ public Instant getPlagHamincha19Point8Degrees() { * 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. * - * @see #getShaahZmanis26Degrees() - * @see #getPlagHamincha120Minutes() + * @see getShaahZmanis26Degrees() + * @see getPlagHamincha120Minutes() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha26Degrees() { @@ -2035,10 +2007,10 @@ public Instant getPlagHamincha26Degrees() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the - * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link - * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link - * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link - * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used + * opinion that the day starts at {@link getAlos18Degrees() alos 18°} and ends at {@link + * getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link + * getAlos18Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis18Degrees()} after {@link + * getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used * lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -2051,7 +2023,7 @@ public Instant getPlagHamincha26Degrees() { * 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. * - * @see #getShaahZmanis18Degrees() + * @see getShaahZmanis18Degrees() */ @Deprecated (forRemoval=false) public Instant getPlagHamincha18Degrees() { @@ -2059,13 +2031,13 @@ public Instant getPlagHamincha18Degrees() { } /** - * This method should be used lechumra only and returns the time of plag hamincha based on the opinion - * that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunsetWithElevation() sunset}. - * 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees() + * This method should be used lechumra only and returns the time of plag hamincha based on the opinion that + * the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getSunsetWithElevation() + * sunset}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link getAlos16Point1Degrees() * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link - * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() - * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 * - * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this + * getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link getAlos16Point1Degrees() + * dawn} of 16.1 degrees before sunrise to {@link getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 * + * the calculated shaah zmanis after {@link getAlos16Point1Degrees() dawn}. Since plag by this * calculation can occur after sunset, it should only be used lechumra. * * @deprecated This method should be used lechumra only since it returns a very late time (often after @@ -2078,8 +2050,8 @@ public Instant getPlagHamincha18Degrees() { * low enough below the horizon for this calculation, a null will be returned. See detailed * explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getAlos16Point1Degrees() - * @see #getSeaLevelSunset() + * @see getAlos16Point1Degrees() + * @see getSeaLevelSunset() */ @Deprecated (forRemoval=false) public Instant getPlagAlosToSunset() { @@ -2088,21 +2060,21 @@ public Instant getPlagAlosToSunset() { /** * This method returns the time of plag hamincha based on the opinion that the day starts at - * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees() + * {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getTzaisGeonim7Point083Degrees() * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link - * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal - * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a - * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to - * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated - * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. + * getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal + * hours) after {@link getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a + * {@link getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to + * {@link getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated + * shaah zmanis after {@link getAlos16Point1Degrees() dawn}. * * @return the Instant of the plag. 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. * - * @see #getAlos16Point1Degrees() - * @see #getTzaisGeonim7Point083Degrees() + * @see getAlos16Point1Degrees() + * @see getTzaisGeonim7Point083Degrees() */ public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { return getPlagHamincha(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false); @@ -2112,8 +2084,8 @@ public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the * opinion of Rabbi Yaakov Moshe Hillel as published in * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated - * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos - * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and + * as 1.25 shaos zmaniyos before {@link getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos + * zmaniyos calculated based on a day starting at {@link getAlos16Point1Degrees() alos 16.1°} and * ending at tzais 3.8°. * * @return the Instant of the plag. If the calculation can't be computed such as northern and @@ -2121,9 +2093,9 @@ public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() { * reach low enough below the horizon for this calculation, a null will be returned. See detailed * explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getShaahZmanisAlos16Point1ToTzais3Point8() - * @see #getMinchaGedolaAhavatShalom() - * @see #getMinchaKetanaAhavatShalom() + * @see getShaahZmanisAlos16Point1ToTzais3Point8() + * @see getMinchaGedolaAhavatShalom() + * @see getMinchaKetanaAhavatShalom() */ public Instant getPlagAhavatShalom() { return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 1.25); @@ -2131,12 +2103,12 @@ public Instant getPlagAhavatShalom() { /** * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is - * {@link #ZENITH_13_POINT_24 13.24°} below the western {@link #GEOMETRIC_ZENITH geometric horizon} (90°) - * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes() + * {@link ZENITH_13_POINT_24 13.24°} below the western {@link GEOMETRIC_ZENITH geometric horizon} (90°) + * after sunset. This calculation is based on the same calculation of {@link getBainHashmashosRT58Point5Minutes() * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux, - * which calculates to 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * which calculates to 13.24° below {@link GEOMETRIC_ZENITH geometric zenith}. * NOTE: As per Yisrael Vehazmanim Vol. III page 1028, No. 50, a dip of slightly less than 13° should be used. * Calculations show that the proper dip to be 13.2456° (truncated to 13.24 that provides about 1.5 second * earlier (lechumra) time) below the horizon at that time. This makes a difference of 1 minute and 10 @@ -2144,13 +2116,13 @@ public Instant getPlagAhavatShalom() { * 13.24° versus 13°. For NY during the solstice, the difference is 1 minute 56 seconds. * @todo recalculate the above based on equilux/equinox calculations. * - * @return the Instant of the sun being 13.24° below {@link #GEOMETRIC_ZENITH geometric zenith} + * @return the Instant of the sun being 13.24° below {@link GEOMETRIC_ZENITH geometric zenith} * (90°). 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. * - * @see #getBainHashmashosRT58Point5Minutes() + * @see getBainHashmashosRT58Point5Minutes() */ public Instant getBainHashmashosRT13Point24Degrees() { return getSunsetOffsetByDegrees(ZENITH_13_POINT_24); @@ -2175,14 +2147,14 @@ public Instant getBainHashmashosRT58Point5Minutes() { /** * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an * 18-minute mil) before - * shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}. + * shkiah calculated as {@link getTzaisGeonim7Point083Degrees() 7.083°}. * * @return the Instant of the bain hashmashos of Rabbeinu Tam in this calculation. 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. - * @see #getTzaisGeonim7Point083Degrees() + * @see getTzaisGeonim7Point083Degrees() */ public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS); @@ -2220,7 +2192,7 @@ public Instant getBainHashmashosRT2Stars() { * 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 * {@link AstronomicalCalendar} documentation. - * @see #getBainHashmashosYereim3Point05Degrees() + * @see getBainHashmashosYereim3Point05Degrees() */ public Instant getBainHashmashosYereim18Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS); @@ -2238,7 +2210,7 @@ public Instant getBainHashmashosYereim18Minutes() { * traditional 0.566° is used. This is more inline with the actual refraction in Eretz Yisrael and is * brought down by Rabbi - * Yedidya Manet in his Zmanei Halacha + * Yedidya Manet in his Zmanei HaHalacha * Lema'aseh (p. 11). That is the first source that I am aware of that calculates degree-based Yereim * zmanim. The 0.5166° refraction is also used by the Luach Itim * Lebinah. Calculating the Yereim's bain hashmashos using 18-minute based degrees is also suggested @@ -2251,10 +2223,10 @@ public Instant getBainHashmashosYereim18Minutes() { * rise, and one where it does not set, a null will be returned. See detailed explanation on * top of the {@link AstronomicalCalendar} documentation. * - * @see #ZENITH_MINUS_3_POINT_05 - * @see #getBainHashmashosYereim18Minutes() - * @see #getBainHashmashosYereim2Point8Degrees() - * @see #getBainHashmashosYereim2Point1Degrees() + * @see ZENITH_MINUS_3_POINT_05 + * @see getBainHashmashosYereim18Minutes() + * @see getBainHashmashosYereim2Point8Degrees() + * @see getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim3Point05Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_3_POINT_05); @@ -2273,7 +2245,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() { * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getBainHashmashosYereim2Point8Degrees() + * @see getBainHashmashosYereim2Point8Degrees() */ public Instant getBainHashmashosYereim16Point875Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS); @@ -2288,17 +2260,17 @@ public Instant getBainHashmashosYereim16Point875Minutes() { * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil before sunset. According to * the Yereim, bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall * starts at sunset. Details, including how the degrees were calculated can be seen in the documentation of - * {@link #getBainHashmashosYereim3Point05Degrees()}. + * {@link getBainHashmashosYereim3Point05Degrees()}. * * @return the Instant of the sun's position 2.8° minutes before 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, and one where it does not set, a null will be returned. See detailed explanation on * top of the {@link AstronomicalCalendar} documentation. * - * @see #ZENITH_MINUS_2_POINT_8 - * @see #getBainHashmashosYereim16Point875Minutes() - * @see #getBainHashmashosYereim3Point05Degrees() - * @see #getBainHashmashosYereim2Point1Degrees() + * @see ZENITH_MINUS_2_POINT_8 + * @see getBainHashmashosYereim16Point875Minutes() + * @see getBainHashmashosYereim3Point05Degrees() + * @see getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim2Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_8); @@ -2316,7 +2288,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() { * not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getBainHashmashosYereim2Point1Degrees() + * @see getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim13Point5Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS); @@ -2325,23 +2297,23 @@ public Instant getBainHashmashosYereim13Point5Minutes() { /** * This method returns the beginning of bain hashmashos according to the Yereim (Rabbi Eliezer of Metz) calculated as the sun's - * position 2.1° above the horizon above the horizon around the equinox / equilux in * Yerushalayim, its position 13.5 minutes or 3/4 of an 18-minute mil before sunset. According to the * Yereim, bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts * at sunset. Details, including how the degrees were calculated can be seen in the documentation of - * {@link #getBainHashmashosYereim3Point05Degrees()}. + * {@link getBainHashmashosYereim3Point05Degrees()}. * * @return the Instant of the sun's position 2.1° minutes before 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, and * one where it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #ZENITH_MINUS_2_POINT_1 - * @see #getBainHashmashosYereim13Point5Minutes() - * @see #getBainHashmashosYereim2Point8Degrees() - * @see #getBainHashmashosYereim3Point05Degrees() + * @see ZENITH_MINUS_2_POINT_1 + * @see getBainHashmashosYereim13Point5Minutes() + * @see getBainHashmashosYereim2Point8Degrees() + * @see getBainHashmashosYereim3Point05Degrees() */ public Instant getBainHashmashosYereim2Point1Degrees() { return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_1); @@ -2349,16 +2321,18 @@ public Instant getBainHashmashosYereim2Point1Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the sun's - * position at {@link #ZENITH_3_POINT_7 3.7°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°), calculated + * position at {@link ZENITH_3_POINT_7 3.7°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°), calculated * as the position of the sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a mil at 18 minutes a mil, or 13.5 minutes - * after sunset. The sun is 3.7° below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. This does * not cover the 26.46 it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi) at the pace - * of an 18-minute mil. + * of an 18-minute mil. It should be noted that Rabbi Yedidya Manet in his Zmanei HaHalacha Lema'aseh (4th edition part 2, pages and 22 + * and 24) lists 3.65° that appears to be a drop too early. * * @return the Instant representing the time when the sun is 3.7° below sea level. - * @see #ZENITH_3_POINT_7 + * @see ZENITH_3_POINT_7 */ @Deprecated (forRemoval=false) public Instant getTzaisGeonim3Point7Degrees() { @@ -2367,16 +2341,16 @@ public Instant getTzaisGeonim3Point7Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the sun's - * position at {@link #ZENITH_3_POINT_7 3.8°} below {@link #GEOMETRIC_ZENITH geometric zenith} (90°), calculated + * position at {@link ZENITH_3_POINT_7 3.8°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°), calculated * as the position of the sun 13.5 minutes after sunset, the time it takes to walk 3/4 of a mil at 18 minutes a mil, plus 30 seconds * for the time it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi). With this being * on an 18-minutes mil, 49 amos would take 26.46, rounded to 30 seconds), for a total of 14 minutes after sunset. The sun is - * {@link #ZENITH_3_POINT_8 3.8°} below {@link #GEOMETRIC_ZENITH geometric zenith} at this time in Jerusalem around the equinox / equilux. * * @return the Instant representing the time when the sun is 3.8° below sea level. - * @see #ZENITH_3_POINT_8 + * @see ZENITH_3_POINT_8 */ @Deprecated (forRemoval=false) public Instant getTzaisGeonim3Point8Degrees() { @@ -2385,7 +2359,7 @@ public Instant getTzaisGeonim3Point8Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated at the - * sun's position at {@link #ZENITH_5_POINT_95 5.95°} below below {@link #GEOMETRIC_ZENITH geometric zenith} + * sun's position at {@link ZENITH_5_POINT_95 5.95°} below below {@link GEOMETRIC_ZENITH geometric zenith} * (90°), calculated as the position of the sun 24 minutes after sunset in Jerusalem around the equinox / equilux. The * 24 minutes is based on the Baal Hatanya's calculation of 18 minutes (3/4 of a 24 minute mil) + 4 minutes for @@ -2394,14 +2368,17 @@ public Instant getTzaisGeonim3Point8Degrees() { * >Vol III, ch. 13, no. 53, p. 1026. Among sources he mentions for this zman is Rabbi Yehuda (Leo) Levi's calculations in Jewish Chrononomy * and other sources. Calculations show that the time is closer to 5.93° and was seemingly rounded to 5.95°. - * Chabad calendars usually use the 6°-based {@link #getTzaisBaalHatanya()} that is built on this same calculation. + * Chabad calendars usually use the 6°-based {@link getTzaisBaalHatanya()} that is built on this same calculation. + * It should be noted that Rabbi Yedidya Manet in his Zmanei HaHalacha Lema'aseh (4th edition part 2, pages and 22 and 24) lists 5.88° that appears to be a drop + * too early. * * @return the Instant representing the time when the sun is 5.95° below sea level. 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. - * @see #getTzaisBaalHatanya() + * @see getTzaisBaalHatanya() */ public Instant getTzaisGeonim5Point95Degrees() { return getSunsetOffsetByDegrees(ZENITH_5_POINT_95); @@ -2410,10 +2387,10 @@ public Instant getTzaisGeonim5Point95Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 * of a mil based on a - * 24-minute mil, or 18 minutes. It is the sun's position at {@link #ZENITH_4_POINT_66 4.66°} below the + * 24-minute mil, or 18 minutes. It is the sun's position at {@link ZENITH_4_POINT_66 4.66°} below the * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance. * This does not cover the 35.28 seconds it takes to walk 49 amos (the heref ayin of bain hashmashos - * of Rav Yosi) at the pace of a 24-minute mil. See {@link #getTzaisGeonim4Point8Degrees()} for a time that covers the + * of Rav Yosi) at the pace of a 24-minute mil. See {@link getTzaisGeonim4Point8Degrees()} for a time that covers the * heref ayin. * * @return the Instant representing the time when the sun is 4.66° below sea level. If the calculation @@ -2421,8 +2398,8 @@ public Instant getTzaisGeonim5Point95Degrees() { * 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. - * @see #ZENITH_4_POINT_66 - * @see #getTzaisGeonim4Point8Degrees() + * @see ZENITH_4_POINT_66 + * @see getTzaisGeonim4Point8Degrees() */ @Deprecated (forRemoval=false) public Instant getTzaisGeonim4Point66Degrees() { @@ -2432,50 +2409,32 @@ public Instant getTzaisGeonim4Point66Degrees() { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 * of a mil, based on a - * 22.5-minute mil, or 16 7/8 minutes. It is the sun's position at {@link #ZENITH_4_POINT_42 4.42°} below the western + * 22.5-minute mil, or 16 7/8 minutes. It is the sun's position at {@link ZENITH_4_POINT_42 4.42°} below the western * horizon. This is a very early zman and should not be relied on without Rabbinical guidance. This does * not cover the 33.07 seconds it takes to walk 49 amos (the heref ayin of bain hashmashos of Rav Yosi) - * at the pace of a 22.5 minute-mil. + * at the pace of a 22.5 minute-mil. It should be noted that Rabbi Yedidya Manet in his Zmanei HaHalacha Lema'aseh (4th edition part 2, pages and 22 + * and 24) lists 4.37° that appears to be a drop too early. * * @return the Instant representing the time when the sun is 4.42° below sea level. 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. - * @see #ZENITH_4_POINT_42 + * @see ZENITH_4_POINT_42 */ @Deprecated (forRemoval=false) public Instant getTzaisGeonim4Point42Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_42); } - /** - * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as 3/4 - * of a 24-minute mil, - * based on a mil being 24 minutes, and is calculated as 18 + 2 + 4 for a total of 24 minutes. It is the - * sun's position at {@link #ZENITH_5_POINT_88 5.88°} below the western horizon. This is a very early - * zman and should not be relied on without Rabbinical guidance. - * - * @todo Additional detailed documentation needed. - * FIXME - actual calculations show this to be 5.93°, not 5.88°. - * @return the Instant representing the time when the sun is 5.88° below sea level. 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. - * @see #ZENITH_5_POINT_88 - */ - public Instant getTzaisGeonim5Point88Degrees() { - return getSunsetOffsetByDegrees(ZENITH_5_POINT_88); - } - /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated as the * sun's position below the horizon at a time of 18.6 minutes after sunset. This is calculated as 3/4 of a 24-minute * mil, plus 0.6 minutes for the * time to walk 49 amos for bain hashmashos of Rav Yosi (with this zman based on a 24-minute mil, 49 * amos would take 35.28 seconds to walk), for a total of 18.6 minutes after sunset. This calculates to the sun's position - * at {@link #ZENITH_4_POINT_8 4.8°} below the western horizon. This is based on Rav Yechiel Michel Shlezinger's sefer Aizehu Bain Hashmashos, Rabbi Yehuda (Leo) Levi's @@ -2492,27 +2451,32 @@ public Instant getTzaisGeonim5Point88Degrees() { * 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. - * @see #ZENITH_4_POINT_8 + * @see ZENITH_4_POINT_8 */ public Instant getTzaisGeonim4Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_4_POINT_8); } /** - * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by - * Rabbi Yechiel Michel Tucazinsky. It is - * based on of the position of the sun no later than {@link #getTzaisGeonim6Point45Degrees() 31 minutes} after sunset - * in Jerusalem the height of the summer solstice and is 28 minutes after shkiah around the equinox / equilux. This - * computes to 6.45° below the western horizon. - * @todo Additional documentation details needed and explain 28/31 minute contradiction. + * This method returns the tzais (nightfall) based on the opinion of the Geonim as calculated by Rabbi Yechiel Michel Tucazinsky as the position of + * the sun no later than 31 minutes after sea-level sunset in Jerusalem (the Birur halacha shows that Rav Tucazinsky's + * calculations for sunset, listed as 28 minutes in this case, were about 3 minutes later than reality), and at the height of + * the summer solstice,this zman, calculatons show that 30.75 minutes after shkiah computes to 6.45° below + * {@link GEOMETRIC_ZENITH geometric zenith}. This calculation is found in the Birur Halacha Yoreh Deah 262 and it is the commonly used + * zman in Israel. It is also used in the Luach Itim Lebinah. it + * should be noted that this differs from the 6.1° / 6.2° calculation for Rabbi Tucazinsky's time as calculated by the + * Hazmanim Bahalacha Vol II chapter 50:7 (page 515). Calculations show that 6.45° at the equinox is 26.5 minutes after + * shkiah around the equinox / + * equilux. * * @return the Instant representing the time when the sun is 6.45° below sea level. 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. - * @see #ZENITH_6_POINT_45 + * @see ZENITH_6_POINT_45 */ public Instant getTzaisGeonim6Point45Degrees() { return getSunsetOffsetByDegrees(ZENITH_6_POINT_45); @@ -2520,7 +2484,7 @@ public Instant 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 + * 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 * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben für @@ -2541,7 +2505,7 @@ public Instant getTzaisGeonim6Point45Degrees() { * 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. - * @see #ZENITH_7_POINT_083 + * @see ZENITH_7_POINT_083 */ public Instant getTzaisGeonim7Point083Degrees() { return getSunsetOffsetByDegrees(ZENITH_7_POINT_083); @@ -2550,7 +2514,7 @@ public Instant getTzaisGeonim7Point083Degrees() { /** * This method returns tzais (nightfall) based on the opinion of the Geonim calculated as 45 minutes * after sunset during the summer solstice in New York, when the neshef (twilight) is the longest. The sun's - * position at this time computes to {@link #ZENITH_7_POINT_67 7.75°} below the western horizon. See Igros Moshe Even Haezer 4, Ch. 4 (regarding * tzais for krias Shema). It is also mentioned in Rabbi Heber's Shaarei Zmanim on in @@ -2569,7 +2533,7 @@ public Instant getTzaisGeonim7Point083Degrees() { * 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. - * @see #ZENITH_7_POINT_67 + * @see ZENITH_7_POINT_67 */ public Instant getTzaisGeonim7Point67Degrees() { return getSunsetOffsetByDegrees(ZENITH_7_POINT_67); @@ -2578,7 +2542,7 @@ public Instant getTzaisGeonim7Point67Degrees() { /** * This method returns the tzais (nightfall) based on the calculations used in the Luach Itim Lebinah as the stringent time for tzais. It is - * calculated at the sun's position at {@link #ZENITH_9_POINT_3 9.3°} below the western horizon. + * calculated at the sun's position at {@link ZENITH_9_POINT_3 9.3°} below the western horizon. * * @return the Instant representing the time when the sun is 9.3° below sea level. If the calculation * can't be computed such as northern and southern locations even south of the Arctic Circle and north of @@ -2595,7 +2559,7 @@ public Instant getTzaisGeonim9Point3Degrees() { * minutes after sunset around the equinox / equilux, the * day that a solar hour is 60 minutes in New York. The sun's position at this time computes to - * {@link #ZENITH_9_POINT_75 9.75°} below the western horizon. This is the opinion of Rabbi Eliyahu Henkin. This also follows the opinion of * Rabbi Shmuel Kamenetsky. Rabbi Yaakov Shakow presented * these degree-based times to Rabbi Shmuel Kamenetsky who agreed to them. @@ -2607,7 +2571,7 @@ public Instant getTzaisGeonim9Point3Degrees() { * null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. * - * @see #getTzais60Minutes() + * @see getTzais60Minutes() */ public Instant getTzaisGeonim9Point75Degrees() { return getSunsetOffsetByDegrees(ZENITH_9_POINT_75); @@ -2619,17 +2583,17 @@ public Instant 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 #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link - * #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60Minutes()}. + * for 4 mil after {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the + * {@link isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link getAlos60Minutes()}. * * @return the Instant 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, * and one where it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getAlos60Minutes() - * @see #getPlagHamincha60Minutes() - * @see #getShaahZmanis60Minutes() + * @see getAlos60Minutes() + * @see getPlagHamincha60Minutes() + * @see getShaahZmanis60Minutes() */ public Instant getTzais60Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS); @@ -2637,19 +2601,19 @@ public Instant getTzais60Minutes() { /** * 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 + * {@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 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 changed - * by calling {@link #setAteretTorahSunsetOffset(double)}. + * by calling {@link setAteretTorahSunsetOffset(double)}. * - * @return the Instant representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset}) + * @return the Instant representing 40 minutes (configurable via {@link setAteretTorahSunsetOffset}) * 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, and one where it does not set, a null will * be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) */ public Instant getTzaisAteretTorah() { return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); @@ -2661,7 +2625,7 @@ public Instant getTzaisAteretTorah() { * This affects most zmanim, since almost all zmanim use subset as part of their calculation. * * @return the number of minutes after sunset for Tzait. - * @see #setAteretTorahSunsetOffset(double) + * @see setAteretTorahSunsetOffset(double) */ public double getAteretTorahSunsetOffset() { return ateretTorahSunsetOffset; @@ -2675,7 +2639,7 @@ public double getAteretTorahSunsetOffset() { * * @param ateretTorahSunsetOffset * the number of minutes after sunset to use as an offset for the Ateret Torah tzais - * @see #getAteretTorahSunsetOffset() + * @see getAteretTorahSunsetOffset() */ public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { this.ateretTorahSunsetOffset = ateretTorahSunsetOffset; @@ -2684,23 +2648,23 @@ public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts - * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending - * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via - * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added - * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3 - * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after - * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos + * {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending + * {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via + * {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added + * to {@link getAlos72Zmanis() alos} to reach this time. This time is 3 + * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after + * {@link getAlos72Zmanis() alos 72 zmaniyos}. Note: Based on this calculation chatzos * will not be at midday. * * @return the Instant 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 * explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) - * @see #getShaahZmanisAteretTorah() + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) + * @see getShaahZmanisAteretTorah() */ public Instant getSofZmanShmaAteretTorah() { return getSofZmanShma(getAlos72Zmanis(), getTzaisAteretTorah(), false); @@ -2708,22 +2672,22 @@ public Instant getSofZmanShmaAteretTorah() { /** * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation - * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() - * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes - * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos - * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time - * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after - * {@link #getAlos72Zmanis() alos 72 zmaniyos}. + * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis() + * 1/10th of the day} before sunrise and is usually calculated as ending {@link getTzaisAteretTorah() 40 minutes + * after sunset} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos + * are calculated based on this day and added to {@link getAlos72Zmanis() alos} to reach this time. This time + * is 4 * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after + * {@link getAlos72Zmanis() alos 72 zmaniyos}. * Note: Based on this calculation chatzos will not be at midday. * * @return the Instant 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 * explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getShaahZmanisAteretTorah() - * @see #setAteretTorahSunsetOffset(double) + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getShaahZmanisAteretTorah() + * @see setAteretTorahSunsetOffset(double) */ public Instant getSofZmanTfilaAteretTorah() { return getSofZmanTfila(getAlos72Zmanis(), getTzaisAteretTorah(), false); @@ -2731,22 +2695,22 @@ public Instant getSofZmanTfilaAteretTorah() { /** * This method returns the time of mincha gedola based on the calculation of Chacham Yosef - * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} - * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} - * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest + * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis() 1/10th of the day} + * before sunrise and is usually calculated as ending {@link getTzaisAteretTorah() 40 minutes after sunset} + * (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}). This is the preferred earliest * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha - * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah() solar hours} after alos. The - * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}. - * - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getShaahZmanisAteretTorah() - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaAteretTorah() - * @see ZmanimCalendar#getMinchaGedolaGRA() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) + * >Rambam and others. For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha + * gedola}. This is calculated as 6.5 {@link getShaahZmanisAteretTorah() solar hours} after alos. The + * calculation used is 6.5 * {@link getShaahZmanisAteretTorah()} after {@link getAlos72Zmanis() alos}. + * + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getShaahZmanisAteretTorah() + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaAteretTorah() + * @see getMinchaGedolaGRA() + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) * * @return the Instant of the time of mincha gedola. 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 @@ -2760,21 +2724,21 @@ public Instant getMinchaGedolaAteretTorah() { /** * This method returns the time of mincha ketana based on the calculation of * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts - * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending - * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via - * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha + * {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending + * {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via + * {@link setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha * according to the opinion of the Rambam and others. - * For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is - * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}. - * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}. - * - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getShaahZmanisAteretTorah() - * @see #getAteretTorahSunsetOffset() - * @see #setAteretTorahSunsetOffset(double) - * @see #getMinchaGedolaGRA() - * @see #getMinchaKetanaGRA() + * For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is + * calculated as 9.5 {@link getShaahZmanisAteretTorah() solar hours} after {@link getAlos72Zmanis() alos}. + * The calculation used is 9.5 * {@link getShaahZmanisAteretTorah()} after {@link getAlos72Zmanis() alos}. + * + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getShaahZmanisAteretTorah() + * @see getAteretTorahSunsetOffset() + * @see setAteretTorahSunsetOffset(double) + * @see getMinchaGedolaGRA() + * @see getMinchaKetanaGRA() * @return the Instant of the time of mincha ketana. 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 @@ -2786,29 +2750,29 @@ public Instant getMinchaKetanaAteretTorah() { /** * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful - * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is - * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset - * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and - * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75 - * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis() + * of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is + * usually calculated as ending {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset + * via {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and + * added to {@link getAlos72Zmanis() alos} to reach this time. This time is 10.75 + * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() * dawn}. * * @return the Instant of the plag. 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 {@link AstronomicalCalendar} documentation. - * @see #getAlos72Zmanis() - * @see #getTzaisAteretTorah() - * @see #getShaahZmanisAteretTorah() - * @see #setAteretTorahSunsetOffset(double) - * @see #getAteretTorahSunsetOffset() + * @see getAlos72Zmanis() + * @see getTzaisAteretTorah() + * @see getShaahZmanisAteretTorah() + * @see setAteretTorahSunsetOffset(double) + * @see getAteretTorahSunsetOffset() */ public Instant getPlagHaminchaAteretTorah() { return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah(), false); } /** - * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after - * {@link #getSeaLevelSunset() sea level sunset}. This is the way that the tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after {@link + * getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's * 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 @@ -2820,7 +2784,7 @@ public Instant getPlagHaminchaAteretTorah() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getAlos72Zmanis() + * @see getAlos72Zmanis() */ public Instant getTzais72Zmanis() { return getZmanisBasedOffset(1.2); @@ -2828,14 +2792,14 @@ public Instant getTzais72Zmanis() { /** * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link - * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth) + * getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth) * zman used in various kehilos. * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getAlos90Zmanis() + * @see getAlos90Zmanis() */ public Instant getTzais90Zmanis() { return getZmanisBasedOffset(1.5); @@ -2843,33 +2807,33 @@ public Instant getTzais90Zmanis() { /** * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after - * {@link #getSeaLevelSunset() sea level sunset}. + * {@link getSeaLevelSunset() sea level sunset}. * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getAlos96Zmanis() + * @see getAlos96Zmanis() */ public Instant getTzais96Zmanis() { return getZmanisBasedOffset(1.6); } /** - * Method to return tzais (dusk) calculated as 90 minutes after {@link #getSunsetWithElevation() sunset} or {@link - * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). This method returns + * Method to return tzais (dusk) calculated as 90 minutes after {@link getSunsetWithElevation() sunset} or {@link + * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). This method returns * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a mil according to the Rambam's opinion is 18 minutes, for a total of 90 minutes based on the * opinion of Ula who calculated tzais as 5 mil after elevation adjusted shkiah (sunset). A similar - * calculation {@link #getTzais19Point8Degrees()} uses solar position* calculations based on this time. + * calculation {@link getTzais19Point8Degrees()} uses solar position* calculations based on this time. * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getTzais19Point8Degrees() - * @see #getAlos90Minutes() + * @see getTzais19Point8Degrees() + * @see getAlos90Minutes() */ public Instant getTzais90Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 90 * MINUTE_MILLIS); @@ -2877,12 +2841,12 @@ public Instant getTzais90Minutes() { /** * This method should be used lechumra only and returns tzais (nightfall) based on the calculations - * of Rav Chaim Naeh that the time to walk the - * distance of a mil - * according to the Rambam's opinion is 2/5 of an hour (24 minutes) - * for a total of 120 minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link - * #getSunsetWithElevation() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). - * A similar calculation {@link #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. + * of Rav Chaim Naeh that the time to walk the distance + * of a mil according to the Rambam's opinion is 2/5 of an hour (24 minutes) for a total of 120 + * minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link getSunsetWithElevation() + * sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). + * A similar calculation {@link getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. * Since the zman is extremely late and at a point that 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. * @@ -2894,8 +2858,8 @@ public Instant getTzais90Minutes() { * 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 {@link AstronomicalCalendar}. * documentation. - * @see #getTzais26Degrees() - * @see #getAlos120Minutes() + * @see getTzais26Degrees() + * @see getAlos120Minutes() */ @Deprecated (forRemoval=false) public Instant getTzais120Minutes() { @@ -2904,7 +2868,7 @@ public Instant getTzais120Minutes() { /** * 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 + * zmaniyos after {@link getSeaLevelSunset() sea level sunset}. Since the zman * is extremely late and at a time when the sun is well below the 18° point (scientifically the darkest point) in * most places on the globe, it should only be used lechumra, such as delaying the start of nighttime * mitzvos. @@ -2917,9 +2881,9 @@ public Instant getTzais120Minutes() { * 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 {@link AstronomicalCalendar} * documentation. - * @see #getAlos120Zmanis() - * @see #getTzais120Minutes() - * @see #getTzais26Degrees() + * @see getAlos120Zmanis() + * @see getTzais120Minutes() + * @see getTzais26Degrees() */ @Deprecated (forRemoval=false) public Instant getTzais120Zmanis() { @@ -2934,17 +2898,17 @@ public Instant getTzais120Zmanis() { * Jerusalem. The question of equinox VS equilux is complex, with Rabbi Meir Posen in the Ohr Meir of the opinion that the equilux should be used. See * Yisrael Vehazmanim vol I, 34:1:4. Rabbi Yedidya Manet in his Zmanei Halacha Lema'aseh (4th edition part 2, pages + * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh (4th edition part 2, pages * and 22 and 24) and Rabbi Yonah Mertzbuch (in a letter published by Rabbi Manet) are of the opinion that the * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a - * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}. + * difference. For information on how this is calculated see the comments on {@link getAlos16Point1Degrees()}. * * @return the Instant representing the time. 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. - * @see #getTzais72Minutes() - * @see #getAlos16Point1Degrees() for more information on this calculation. + * @see getTzais72Minutes() + * @see getAlos16Point1Degrees() for more information on this calculation. */ public Instant getTzais16Point1Degrees() { return getSunsetOffsetByDegrees(ZENITH_16_POINT_1); @@ -2952,7 +2916,7 @@ public Instant getTzais16Point1Degrees() { /** * This method should be used lechumra only and returns tzais based on when the sun is 26° - * below the horizon. For information on how this is calculated see the comments on {@link #getAlos26Degrees()}. + * below the horizon. For information on how this is calculated see the comments on {@link getAlos26Degrees()}. * Since the zman 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. @@ -2965,8 +2929,8 @@ public Instant getTzais16Point1Degrees() { * 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. - * @see #getTzais120Minutes() - * @see #getAlos26Degrees() + * @see getTzais120Minutes() + * @see getAlos26Degrees() */ @Deprecated (forRemoval=false) public Instant getTzais26Degrees() { @@ -2974,42 +2938,42 @@ public Instant getTzais26Degrees() { } /** - * For information on how this is calculated see the comments on {@link #getAlos18Degrees()} + * For information on how this is calculated see the comments on {@link getAlos18Degrees()} * * @return the Instant representing the time. 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. - * @see #getAlos18Degrees() + * @see getAlos18Degrees() */ public Instant getTzais18Degrees() { return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); } /** - * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}. + * For information on how this is calculated see the comments on {@link getAlos19Point8Degrees()}. * * @return the Instant representing the time. 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. - * @see #getTzais90Minutes() - * @see #getAlos19Point8Degrees() + * @see getTzais90Minutes() + * @see getAlos19Point8Degrees() */ public Instant getTzais19Point8Degrees() { return getSunsetOffsetByDegrees(ZENITH_19_POINT_8); } /** - * A method to return tzais (dusk) calculated as 96 minutes after {@link #getSunsetWithElevation() sunset} or {@link - * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how - * this is calculated see the comments on {@link #getAlos96Minutes()}. + * A method to return tzais (dusk) calculated as 96 minutes after {@link getSunsetWithElevation() sunset} or {@link + * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). For information on how + * this is calculated see the comments on {@link getAlos96Minutes()}. * * @return the Instant 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, * a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} * documentation. - * @see #getAlos96Minutes() + * @see getAlos96Minutes() */ public Instant getTzais96Minutes() { return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS); @@ -3032,7 +2996,7 @@ public Instant getTzais96Minutes() { * * @return the Instant representing the local chatzos * @see GeoLocation#getLocalMeanTimeOffset(Instant) - * @see AstronomicalCalendar#getLocalMeanTime(LocalTime) + * @see getLocalMeanTime(LocalTime) */ public Instant getFixedLocalChatzos() { return getLocalMeanTime(LocalTime.NOON); @@ -3058,8 +3022,8 @@ public Instant getFixedLocalChatzos() { * @return the Instant representing the moment halfway between molad and molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. - * @see #getSofZmanKidushLevanaBetweenMoldos() - * @see #getSofZmanKidushLevana15Days(Instant, Instant) + * @see getSofZmanKidushLevanaBetweenMoldos() + * @see getSofZmanKidushLevana15Days(Instant, Instant) * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() */ public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) { @@ -3121,13 +3085,13 @@ private Instant getMoladBasedTime(Instant moladBasedTime, Instant alos, Instant * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between * molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad. * The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between - * tzais and alos, see {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}. + * tzais and alos, see {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}. * * @return the Instant representing the moment halfway between molad and molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this * day, a null will be returned. - * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) - * @see #getSofZmanKidushLevana15Days() + * @see getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) + * @see getSofZmanKidushLevana15Days() * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos() */ public Instant getSofZmanKidushLevanaBetweenMoldos() { @@ -3139,7 +3103,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() { * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the * Rema who brings down the opinion of the Maharil's of calculating - * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of + * {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during @@ -3159,7 +3123,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() { * tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. * - * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) + * @see getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) * @see JewishCalendar#getSofZmanKidushLevana15Days() */ public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { @@ -3180,18 +3144,18 @@ public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) { * the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the * Rema who brings down the opinion of the Maharil's of calculating - * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of + * {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject, * See Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei * Zmanim. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to - * between tzais and alos, see {@link #getSofZmanKidushLevana15Days(Instant, Instant)}. + * between tzais and alos, see {@link getSofZmanKidushLevana15Days(Instant, Instant)}. * * @return the Instant representing the moment 15 days after the molad. If the time occurs between * alos and tzais, alos will be returned. If the zman will not occur on this day, a * null will be returned. * - * @see #getSofZmanKidushLevana15Days(Instant, Instant) - * @see #getSofZmanKidushLevanaBetweenMoldos() + * @see getSofZmanKidushLevana15Days(Instant, Instant) + * @see getSofZmanKidushLevanaBetweenMoldos() * @see JewishCalendar#getSofZmanKidushLevana15Days() * */ @@ -3203,12 +3167,12 @@ public Instant getSofZmanKidushLevana15Days() { * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the * molad. The time will be returned even if it occurs during the day when Kiddush Levana can't be said. - * Use {@link #getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours. + * Use {@link getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours. * * @return the Instant representing the moment 3 days after the molad. If the zman will not occur on this day, a * null will be returned. - * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) - * @see #getTchilasZmanKidushLevana7Days() + * @see getTchilasZmanKidushLevana3Days(Instant, Instant) + * @see getTchilasZmanKidushLevana7Days() * @see JewishCalendar#getTchilasZmanKidushLevana3Days() */ public Instant getTchilasZmanKidushLevana3Days() { @@ -3219,12 +3183,12 @@ public Instant getTchilasZmanKidushLevana3Days() { * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the molad. * If the time of tchilas zman Kiddush Levana occurs during the day (between alos and tzais passed to - * this method) it will return the following tzais. If null is passed for either alos or tzais, the actual - * tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not. + * this method) it will return the following tzais. If null is passed for either alos or tzais, the + * actual tchilas zman Kiddush Levana will be returned, regardless of if it is during the day or not. * * @param alos - * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending - * at tzais), the time returned will be tzais. If either the alos or tzais parameters + * the beginning of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at + * tzais), the time returned will be tzais. If either the alos or tzais parameters * are null, no daytime adjustment will be made. * @param tzais * the end of the Jewish day. If Kidush Levana occurs during the day (starting at alos and ending at @@ -3234,8 +3198,8 @@ public Instant getTchilasZmanKidushLevana3Days() { * @return the Instant representing the moment 3 days after the molad. If the time occurs between alos and * tzais, tzais will be returned. If the zman will not occur on this day, a * null will be returned. - * @see #getTchilasZmanKidushLevana3Days() - * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) + * @see getTchilasZmanKidushLevana3Days() + * @see getTchilasZmanKidushLevana7Days(Instant, Instant) * @see JewishCalendar#getTchilasZmanKidushLevana3Days() */ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { @@ -3252,8 +3216,8 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { Instant zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), alos, tzais, true); - //Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when - // kiddush Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) + // Get the following month's zman kiddush Levana for the extreme case of Rapa Iti in French Polynesia on Dec 2027 when kiddush + // Levana can be said on Rosh Chodesh (the evening of the 30th). See Rabbi Dovid Heber's Shaarei Zmanim chapter 4 (page 32) if (zman == null && jewishCalendar.getJewishDayOfMonth() == 30) { jewishCalendar.plusMonths(1); zman = getMoladBasedTime(jewishCalendar.getTchilasZmanKidushLevana3Days(), null, null, true); @@ -3270,8 +3234,8 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) { * @return the Instant representing the moment of the molad. If the molad does not occur on this day, a * null will be returned. * - * @see #getTchilasZmanKidushLevana3Days() - * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) + * @see getTchilasZmanKidushLevana3Days() + * @see getTchilasZmanKidushLevana7Days(Instant, Instant) * @see JewishCalendar#getMoladAsInstant() */ public Instant getZmanMolad() { @@ -3296,7 +3260,7 @@ public Instant getZmanMolad() { /** * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between - * {@link ZmanimCalendar#getAlos72Minutes() alos} and {@link ZmanimCalendar#getTzais72Minutes() tzais}) it + * {@link getAlos72Minutes() alos} and {@link getTzais72Minutes() tzais}) it * return the next tzais. * * @param alos @@ -3311,8 +3275,8 @@ public Instant getZmanMolad() { * @return the Instant representing the moment 7 days after the molad. If the time occurs between alos and * tzais, tzais will be returned. If the zman will not occur on this day, a * null will be returned. - * @see #getTchilasZmanKidushLevana3Days(Instant, Instant) - * @see #getTchilasZmanKidushLevana7Days() + * @see getTchilasZmanKidushLevana3Days(Instant, Instant) + * @see getTchilasZmanKidushLevana7Days() * @see JewishCalendar#getTchilasZmanKidushLevana7Days() */ public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { @@ -3333,13 +3297,13 @@ public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) { /** * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7 * days after the molad. The time will be returned even if it occurs during the day when Kiddush Levana - * can't be recited. Use {@link #getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours. + * can't be recited. Use {@link getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours. * * @return the Instant representing the moment 7 days after the molad regardless of it is day or night. If the zman * will not occur on this day, a null will be returned. - * @see #getTchilasZmanKidushLevana7Days(Instant, Instant) + * @see getTchilasZmanKidushLevana7Days(Instant, Instant) * @see JewishCalendar#getTchilasZmanKidushLevana7Days() - * @see #getTchilasZmanKidushLevana3Days() + * @see getTchilasZmanKidushLevana3Days() */ public Instant getTchilasZmanKidushLevana7Days() { return getTchilasZmanKidushLevana7Days(null, null); @@ -3348,18 +3312,18 @@ public Instant getTchilasZmanKidushLevana7Days() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to * the opinion of the GRA. This time is identical to the {@link - * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are + * getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the * GRA that the day is calculated from sunrise to sunset. - * This returns the time 4 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it + * This returns the time 4 * {@link getShaahZmanisGRA()} after {@link getSeaLevelSunrise() sea level sunrise}. If it * is not erev Pesach, a null will be returned. * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGRA() - * @see ZmanimCalendar#getSofZmanTfilaGRA() - * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) + * @see getShaahZmanisGRA() + * @see getSofZmanTfilaGRA() + * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzGRA() { return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); @@ -3368,44 +3332,45 @@ public Instant getSofZmanAchilasChametzGRA() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the - * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link - * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the - * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link - * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()} after - * {@link #getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. + * being {@link getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is identical to the + * {@link getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link + * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the + * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link + * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link getShaahZmanis72Minutes()} + * after {@link getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. * * @return the Instant 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 * the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72Minutes() - * @see #getAlos72Minutes() - * @see #getSofZmanTfilaMGA72Minutes() - * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) + * @see getShaahZmanis72Minutes() + * @see getAlos72Minutes() + * @see getSofZmanTfilaMGA72Minutes() + * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA72Minutes() { return getSofZmanAchilasChametz(getAlos72Minutes(), getTzais72Minutes(), true); } /** - * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the - * opinion of the Magen Avraham (MGA) based on alos - * being {@link #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunriseWithElevation() sunrise}. This time is identical to the - * {@link #getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link #getShaahZmanis72MinutesZmanis() - * shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the opinion of the MGA that the day is - * calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis - * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not - * erev Pesach, a null will be returned. + * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion + * of the Magen Avraham (MGA) based on alos being {@link + * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunriseWithElevation() sunrise}. This time is identical to the + * {@link getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link + * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the + * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to + * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 4 * {@link + * getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be + * returned. * * @return the Instant 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 * the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72MinutesZmanis() - * @see #getAlos72Zmanis() - * @see #getSofZmanTfilaMGA72MinutesZmanis() - * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) + * @see getShaahZmanis72MinutesZmanis() + * @see getAlos72Zmanis() + * @see getSofZmanTfilaMGA72MinutesZmanis() + * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { return getSofZmanAchilasChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); @@ -3414,20 +3379,20 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunriseWithElevation() sunrise}. This time is 4 {@link - * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn} - * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° - * below sunrise or sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after - * {@link #getAlos16Point1Degrees() dawn}. If it is not erev Pesach, a null will be returned. + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time is 4 {@link + * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based + * on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or + * sunset. This returns the time of 4 {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. + * If it is not erev Pesach, a null will be returned. * * @return the Instant of the latest time of eating chametz. If it is not erev Pesach or 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 + * 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. - * @see #getShaahZmanis16Point1Degrees() - * @see #getAlos16Point1Degrees() - * @see #getSofZmanTfilaMGA16Point1Degrees() - * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) + * @see getShaahZmanis16Point1Degrees() + * @see getAlos16Point1Degrees() + * @see getSofZmanTfilaMGA16Point1Degrees() + * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { return getSofZmanAchilasChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); @@ -3437,54 +3402,55 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { * 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 - * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea + * sunrise to sunset. This returns the time 5 * {@link getShaahZmanisGRA()} after {@link getSeaLevelSunrise() sea * level sunrise}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see ZmanimCalendar#getShaahZmanisGRA() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanisGRA() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzGRA() { return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** - * 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 #getAlos72Minutes() 72} minutes before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link - * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the opinion of - * the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link - * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanis72Minutes()} after - * {@link #getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. + * 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 + * getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is 5 {@link + * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the + * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link + * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link getShaahZmanis72Minutes()} + * after {@link getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72Minutes() - * @see #getAlos72Minutes() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanis72Minutes() + * @see getAlos72Minutes() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA72Minutes() { return getSofZmanBiurChametz(getAlos72Minutes(), getTzais72Minutes(), true); } /** - * 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 #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunriseWithElevation() sunrise}. This time is 5 {@link - * #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of - * the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to {@link - * #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link #getShaahZmanis72MinutesZmanis()} after - * {@link #getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be returned. + * 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 + * getAlos72Zmanis() 72} minutes zmanis before {@link getSunriseWithElevation() sunrise}. This time is 5 {@link + * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() dawn} based on the + * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to + * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link + * getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be + * returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanis72MinutesZmanis() - * @see #getAlos72Zmanis() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanis72MinutesZmanis() + * @see getAlos72Zmanis() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { return getSofZmanBiurChametz(getAlos72Zmanis(), getTzais72Zmanis(), true); @@ -3493,20 +3459,20 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { /** * 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 #getSunriseWithElevation() sunrise}. This time is 5 - * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time is 5 + * {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° - * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after - * {@link #getAlos16Point1Degrees() dawn}. If it is not erev Pesach, a null will be returned. + * below sunrise or sunset. This returns the time of 5 {@link getShaahZmanis16Point1Degrees()} after + * {@link getAlos16Point1Degrees() dawn}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 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. * - * @see #getShaahZmanis16Point1Degrees() - * @see #getAlos16Point1Degrees() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanis16Point1Degrees() + * @see getAlos16Point1Degrees() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { return getSofZmanBiurChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); @@ -3514,29 +3480,29 @@ public Instant getSofZmanBiurChametzMGA16Point1Degrees() { /** * A method that returns the Baal Hatanya's - * a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the + * a shaah zmanis ({@link getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the * Baal Hatanya's day based calculations that are calculated as a 1.583° 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. - * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}) calculated + * A method that returns a shaah zmanis ({@link getTemporalHour(Instant, Instant) temporal hour}) calculated * based on the Baal Hatanya's netz * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides - * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti} - * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link - * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}. + * the day based on the opinion of the Baal Hatanya that the day runs from {@link getSunriseBaalHatanya() netz amiti} + * to {@link getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link + * getSunriseBaalHatanya() sea level netz amiti} to {@link getSunsetBaalHatanya() sea level shkiah amiti}. * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link - * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset. + * getTemporalHour}, but all calculations are based on a sea level sunrise and sunset. * @return the long millisecond length of a shaah zmanis calculated from - * {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti + * {@link getSunriseBaalHatanya() netz amiti (sunrise)} to {@link getSunsetBaalHatanya() shkiah amiti * ("real" 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, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See * detailed explanation on top of the {@link AstronomicalCalendar} documentation. * - * @see #getTemporalHour(Instant, Instant) - * @see #getSunriseBaalHatanya() - * @see #getSunsetBaalHatanya() - * @see #ZENITH_1_POINT_583 + * @see getTemporalHour(Instant, Instant) + * @see getSunriseBaalHatanya() + * @see getSunsetBaalHatanya() + * @see ZENITH_1_POINT_583 */ public long getShaahZmanisBaalHatanya() { return getTemporalHour(getSunriseBaalHatanya(), getSunsetBaalHatanya()); @@ -3544,13 +3510,13 @@ public long getShaahZmanisBaalHatanya() { /** * Returns the Baal Hatanya's alos - * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link #GEOMETRIC_ZENITH geometric horizon} - * before {@link #getSunriseWithElevation() sunrise}. It is based on the calculation that the time between dawn and + * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link GEOMETRIC_ZENITH geometric horizon} + * before {@link getSunriseWithElevation() sunrise}. It is based on the calculation that the time between dawn and * netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes * a mil (Rambam and others). The sun's position at 72 - * minutes before {@link #getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem netz amiti (sunrise)} in Jerusalem around the equinox / equilux is - * 16.9° below {@link #GEOMETRIC_ZENITH geometric zenith}. + * 16.9° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return The Instant of dawn. 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 @@ -3563,13 +3529,13 @@ public Instant getAlosBaalHatanya() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3 - * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() + * {@link getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link getSunriseBaalHatanya() * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from - * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() + * sunrise to sunset. This returns the time 3 * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() * netz amiti (sunrise)}. * - * @see ZmanimCalendar#getSofZmanShma(Instant, Instant) - * @see #getShaahZmanisBaalHatanya() + * @see getSofZmanShma(Instant, Instant) + * @see getShaahZmanisBaalHatanya() * @return the Instant of the latest zman shema according to the Baal Hatanya. 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 @@ -3582,11 +3548,11 @@ public Instant getSofZmanShmaBaalHatanya() { /** * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4 * hours into the day based on the opinion of the Baal Hatanya that the day is - * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after - * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. + * calculated from sunrise to sunset. This returns the time 4 * {@link getShaahZmanisBaalHatanya()} after + * {@link getSunriseBaalHatanya() netz amiti (sunrise)}. * - * @see ZmanimCalendar#getSofZmanTfila(Instant, Instant) - * @see #getShaahZmanisBaalHatanya() + * @see getSofZmanTfila(Instant, Instant) + * @see getShaahZmanisBaalHatanya() * @return the Instant of the latest zman tfilah. 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 @@ -3598,18 +3564,18 @@ public Instant getSofZmanTfilaBaalHatanya() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the - * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman + * opinion of the Baal Hatanya. This time is identical to the {@link getSofZmanTfilaBaalHatanya() Sof zman * tfilah Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day - * is calculated from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after - * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be + * is calculated from sunrise to sunset. This returns the time 4 {@link getShaahZmanisBaalHatanya()} after + * {@link getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be * returned. * @return the Instant one is allowed eating 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 returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanisBaalHatanya() - * @see #getSofZmanTfilaBaalHatanya() - * @see #getSofZmanAchilasChametz(Instant, Instant, boolean) + * @see getShaahZmanisBaalHatanya() + * @see getSofZmanTfilaBaalHatanya() + * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzBaalHatanya() { return getSofZmanAchilasChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); @@ -3618,14 +3584,14 @@ public Instant getSofZmanAchilasChametzBaalHatanya() { /** * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated - * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after - * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be returned. + * from sunrise to sunset. This returns the time 5 * {@link getShaahZmanisBaalHatanya()} after + * {@link getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not erev Pesach, a null will be returned. * @return the Instant 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 * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. - * @see #getShaahZmanisBaalHatanya() - * @see #getSofZmanBiurChametz(Instant, Instant, boolean) + * @see getShaahZmanisBaalHatanya() + * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzBaalHatanya() { return getSofZmanBiurChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true); @@ -3634,20 +3600,20 @@ public Instant getSofZmanBiurChametzBaalHatanya() { /** * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray * mincha. The Rambam is of the opinion that it is - * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the + * better to delay mincha until {@link getMinchaKetanaBaalHatanya() mincha ketana} while the * Ra"sh, * Tur, GRA and others are of the opinion that mincha can be prayed - * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya() - * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based + * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link getShaahZmanisBaalHatanya() + * sea level solar hours} after {@link getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5 - * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti ("real" sunrise)}. + * * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() netz amiti ("real" sunrise)}. * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos minutes after either {@link - * #getSunTransit() astronomical chatzos} or {@link #getChatzosAsHalfDay() chatzos as half a day} - * for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}. - * @see #getMinchaGedola(Instant, Instant) - * @see #getShaahZmanisBaalHatanya() - * @see #getMinchaKetanaBaalHatanya() + * getSunTransit() astronomical chatzos} or {@link getChatzosAsHalfDay() chatzos as half a day} + * for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. + * @see getMinchaGedola(Instant, Instant) + * @see getShaahZmanisBaalHatanya() + * @see getMinchaKetanaBaalHatanya() * @return the Instant of the time of mincha gedola according to the Baal Hatanya. 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 @@ -3660,15 +3626,15 @@ public Instant getMinchaGedolaBaalHatanya() { /** * This method returns the time of mincha ketana. This is the preferred earliest time to pray * mincha in the opinion of the Rambam and others. - * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}. - * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya() sea level solar hours} after {@link #getSunriseBaalHatanya() + * For more information on this see the documentation on {@link getMinchaGedolaBaalHatanya() mincha gedola}. + * This is calculated as 9.5 {@link getShaahZmanisBaalHatanya() sea level solar hours} after {@link getSunriseBaalHatanya() * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the - * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link - * #getSunriseBaalHatanya() netz amiti (sunrise)}. + * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link getShaahZmanisBaalHatanya()} after {@link + * getSunriseBaalHatanya() netz amiti (sunrise)}. * - * @see #getMinchaKetana(Instant, Instant) - * @see #getShaahZmanisBaalHatanya() - * @see #getMinchaGedolaBaalHatanya() + * @see getMinchaKetana(Instant, Instant) + * @see getShaahZmanisBaalHatanya() + * @see getMinchaGedolaBaalHatanya() * @return the Instant of the time of mincha ketana. 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 @@ -3681,11 +3647,11 @@ public Instant getMinchaKetanaBaalHatanya() { /** * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This calculation * is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time - * 10.75 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. See + * 10.75 * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() netz amiti (sunrise)}. See * About Our * Zmanim Calculations @ Chabad.org for more details on this calculation. * - * @see #getPlagHamincha(Instant, Instant) + * @see getPlagHamincha(Instant, Instant) * @return the Instant of the time of plag hamincha. 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 @@ -3697,25 +3663,25 @@ public Instant getPlagHaminchaBaalHatanya() { /** * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon (90°) - * after {@link #getSunsetWithElevation() sunset}. This tzais / nightfall based on the opinion of the tzais / nightfall based on the opinion of the Baal Hatanya. This calculation is based on the position of the - * sun about 24 minutes after {@link #getSeaLevelSunset() sunset} in Jerusalem around the equinox / equilux, which - * is 6° below {@link #GEOMETRIC_ZENITH geometric zenith}. See About Our Zmanim - * Calculations @ Chabad.org that is based on {@link ZmanimCalendar#getSunsetBaalHatanya() shkiah amitis as + * Calculations @ Chabad.org that is based on {@link getSunsetBaalHatanya() shkiah amitis as * 1.583° below the horizon} calculated around the equinox / equilux that computes 3.516 minutes after sunset. To this, 18 minutes of 3/4 of a 24-minute mil and * two minutes for bain hashmashos of Rav Yosi is added. This calculation computes the the sun being 5.83° below - * the horizon (very close to the slightly later {@link #getTzaisGeonim5Point95Degrees()} that was calculated based on 4 fixed + * the horizon (very close to the slightly later {@link getTzaisGeonim5Point95Degrees()} that was calculated based on 4 fixed * minutes) and it is rounded up to 6°. * * @return The Instant of nightfall. 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. - * @see #getTzaisGeonim5Point95Degrees() - * @see ZmanimCalendar#getSunsetBaalHatanya() + * @see getTzaisGeonim5Point95Degrees() + * @see getSunsetBaalHatanya() */ public Instant getTzaisBaalHatanya() { return getSunsetOffsetByDegrees(ZENITH_6_DEGREES); @@ -3726,16 +3692,16 @@ public Instant getTzaisBaalHatanya() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzos() fixed local + * at alos defined as {@link getAlos18Degrees() 18°} and ends at {@link getFixedLocalChatzos() fixed local * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see #getAlos18Degrees() - * @see #getFixedLocalChatzos() - * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) + * @see getAlos18Degrees() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzos(), 3); @@ -3744,18 +3710,18 @@ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { /** * This method returns Rav Moshe Feinstein's opinion of the * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the - * opinion of the Magen Avraham (MGA) that the - * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzos() fixed local - * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day. + * opinion of the Magen Avraham (MGA) that the day is calculated + * from dawn to nightfall, but calculated using the first half of the day only. The half a day starts at alos defined + * as {@link getAlos16Point1Degrees() 16.1°} and ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof Zman + * Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see #getAlos16Point1Degrees() - * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Instant, Instant, double) + * @see getAlos16Point1Degrees() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzos(), 3); @@ -3766,7 +3732,7 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos90Minutes() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() + * at alos defined as {@link getAlos90Minutes() 90 minutes before sunrise} and ends at {@link getFixedLocalChatzos() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3774,9 +3740,9 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * 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. - * @see #getAlos90Minutes() - * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Instant, Instant, double) + * @see getAlos90Minutes() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzos(), 3); @@ -3787,7 +3753,7 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link #getAlos72Minutes() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzos() + * at alos defined as {@link getAlos72Minutes() 72 minutes before sunrise} and ends at {@link getFixedLocalChatzos() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3795,9 +3761,9 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * 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. - * @see #getAlos72Minutes() - * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Instant, Instant, double) + * @see getAlos72Minutes() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzos(), 3); @@ -3805,19 +3771,19 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { /** * This method returns Rav Moshe Feinstein's opinion of the - * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the - * opinion of the GRA that the day is calculated from - * sunrise to sunset, but calculated using the first half of the day only. The half a day starts at {@link #getSunriseWithElevation() - * sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos - * zmaniyos (solar hours) after sunrise or half of this half-day. + * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion + * of the GRA that the day is calculated from sunrise to sunset, but + * calculated using the first half of the day only. The half a day starts at {@link getSunriseWithElevation() sunrise} and + * ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar + * hours) after sunrise or half of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see #getSunriseWithElevation() - * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Instant, Instant, double) + * @see getSunriseWithElevation() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 3); @@ -3828,16 +3794,16 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers)) * according to the opinion of the GRA that the day is * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at - * {@link #getSunriseWithElevation() sunrise} and ends at {@link #getFixedLocalChatzos() fixed local chatzos}. Sof zman tefila - * is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. + * {@link getSunriseWithElevation() sunrise} and ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof zman + * tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see #getSunriseWithElevation() - * @see #getFixedLocalChatzos() - * @see #getHalfDayBasedZman(Instant, Instant, double) + * @see getSunriseWithElevation() + * @see getFixedLocalChatzos() + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 4); @@ -3846,7 +3812,7 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { /** * This method returns Rav Moshe Feinstein's opinion of * the calculation of mincha gedola, the earliest time one can pray mincha according to theGRA calculated as 30 minutes after {@link #getFixedLocalChatzos() fixed + * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA calculated as 30 minutes after {@link getFixedLocalChatzos() fixed * local chatzos}. * * @return the Instant of the time of mincha gedola. If the calculation can't be computed such as @@ -3854,9 +3820,9 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { * does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaGedolaGRA() - * @see #getFixedLocalChatzos() - * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset + * @see getMinchaGedolaGRA() + * @see getFixedLocalChatzos() + * @see getMinchaKetanaGRAFixedLocalChatzosToSunset */ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { return getTimeOffset(getFixedLocalChatzos(), MINUTE_MILLIS * 30); @@ -3867,17 +3833,17 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to * the opinion of the Rambam and others) calculated according * to the GRA that is 3.5 shaos zmaniyos (solar - * hours) after {@link #getFixedLocalChatzos() fixed local chatzos}. + * hours) after {@link getFixedLocalChatzos() fixed local chatzos}. * * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. * - * @see #getMinchaGedolaGRA() - * @see #getFixedLocalChatzos() - * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes - * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) + * @see getMinchaGedolaGRA() + * @see getFixedLocalChatzos() + * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 3.5); @@ -3887,26 +3853,26 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * This method returns Rav Moshe Feinstein's opinion * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the * GRA that the day ends at sunset and is 4.75 shaos - * zmaniyos (solar hours) after {@link #getFixedLocalChatzos() fixed local chatzos}. + * zmaniyos (solar hours) after {@link getFixedLocalChatzos() fixed local chatzos}. * * @return the Instant of the time of mincha gedola. 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 * {@link AstronomicalCalendar} documentation. * - * @see #getPlagHaminchaGRA() - * @see #getFixedLocalChatzos() - * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset - * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes - * @see ZmanimCalendar#getHalfDayBasedZman(Instant, Instant, double) + * @see getPlagHaminchaGRA() + * @see getFixedLocalChatzos() + * @see getMinchaKetanaGRAFixedLocalChatzosToSunset + * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes + * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 4.75); } /** - * Method to return tzais (dusk) calculated as 50 minutes after {@link #getSunsetWithElevation() sunset} or {@link - * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). This method returns + * Method to return tzais (dusk) calculated as 50 minutes after {@link getSunsetWithElevation() sunset} or {@link + * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). 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 other than ones similar to the latitude of the NY area. * @@ -3921,17 +3887,17 @@ public Instant getTzais50Minutes() { /** * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of + * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of * the day, calculated according to the GRA using a day starting at * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link #getShaahZmanisGRA()} after {@link #getSunriseWithElevation() sunrise} or {@link - * #getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the + * The calculation used is 9 * {@link getShaahZmanisGRA()} after {@link getSunriseWithElevation() sunrise} or {@link + * getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link isUseElevation()} setting). See the * Mechaber and Mishna Berurah 232 and 249:2. * - * @see #getShaahZmanisGRA() - * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) - * @see #isUseAstronomicalChatzosForOtherZmanim() + * @see getShaahZmanisGRA() + * @see getSamuchLeMinchaKetana(Instant, Instant, boolean) + * @see isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the time of samuch lemincha 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 @@ -3944,15 +3910,16 @@ public Instant getSamuchLeMinchaKetanaGRA() { /** * * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based - * on a day from and ending a day starting at {@link #getMinchaGedola16Point1Degrees() alos 16.1°} and ending - * at {@link #getTzais72Minutes() tzais 16.1°}. This is the time that eating or other activity can't begin prior to praying - * mincha. The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() - * alos 16.1°}. See the Mechaber and Mishna - * Berurah 232 and 249:2. - * - * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) - * @see #getShaahZmanis16Point1Degrees() + * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based + * on a day from and ending a day starting at {@link getMinchaGedola16Point1Degrees() alos 16.1°} and ending + * at {@link getTzais72Minutes() tzais 16.1°}. This is the time that eating or other activity can't begin prior to + * praying mincha. The calculation used is 9 * {@link getShaahZmanis16Point1Degrees()} after {@link + * getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232 and 249:2. + * + * @see getSamuchLeMinchaKetana(Instant, Instant, boolean) + * @see getShaahZmanis16Point1Degrees() * @return the Instant of the time of samuch lemincha 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. @@ -3965,15 +3932,15 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() { /** * * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based - * on a day from and ending a day starting at {@link #getAlos72Minutes() alos 72 minutes} and ending at {@link #getTzais72Minutes() - * tzais 72 minutes}. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos 72 minutes}. See the Mechaber and Mishna Berurah 232 and 249:2. - * - * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean) - * @see #getShaahZmanis72Minutes() + * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based + * on a day from and ending a day starting at {@link getAlos72Minutes() alos 72 minutes} and ending at {@link + * getTzais72Minutes() tzais 72 minutes}. This is the time that eating or other activity can't begin prior to praying + * mincha. The calculation used is 9 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos + * 72 minutes}. See the Mechaber and Mishna Berurah + * 232 and 249:2. + * + * @see getSamuchLeMinchaKetana(Instant, Instant, boolean) + * @see getShaahZmanis72Minutes() * @return the Instant of the time of samuch lemincha 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. From ae03c11a6b5585b4320dcdd0885ab450f8cf13c4 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 17:17:58 -0400 Subject: [PATCH 073/121] remove reference to no longer available 5.88 tzais --- .../zmanim/hebrewcalendar/RegressionTestFileWriter.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index cfa63236..a889dccd 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -85,7 +85,7 @@ public static void main(String[] args) throws IOException { zcal.getBainHashmashosYereim13Point5Minutes(), zcal.getBainHashmashosYereim2Point1Degrees(), zcal.getTzaisGeonim3Point7Degrees(), zcal.getTzaisGeonim3Point8Degrees(), zcal.getTzaisGeonim5Point95Degrees(),zcal.getTzaisGeonim4Point66Degrees(), - zcal.getTzaisGeonim4Point42Degrees(), zcal.getTzaisGeonim5Point88Degrees(), + zcal.getTzaisGeonim4Point42Degrees(), zcal.getTzaisGeonim4Point8Degrees(), zcal.getTzaisGeonim6Point45Degrees(), zcal.getTzaisGeonim7Point083Degrees(), zcal.getTzaisGeonim7Point67Degrees(), zcal.getTzaisGeonim8Point5Degrees(), zcal.getTzaisGeonim9Point3Degrees(), @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException { } static class FullZmanim { - public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point66Degrees,getTzaisGeonim4Point42Degrees,getTzaisGeonim5Point88Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; + public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point66Degrees,getTzaisGeonim4Point42Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; @Override public String toString() { @@ -259,7 +259,6 @@ public String toString() { .add(getTzaisGeonim5Point95Degrees.toString()) .add(getTzaisGeonim4Point66Degrees.toString()) .add(getTzaisGeonim4Point42Degrees.toString()) - .add(getTzaisGeonim5Point88Degrees.toString()) .add(getTzaisGeonim4Point8Degrees.toString()) .add(getTzaisGeonim6Point45Degrees.toString()) .add(getTzaisGeonim7Point083Degrees.toString()) @@ -364,7 +363,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre Instant getBainHashmashosYereim2Point1Degrees, Instant getTzaisGeonim3Point7Degrees, Instant getTzaisGeonim3Point8Degrees, Instant getTzaisGeonim5Point95Degrees, Instant getTzaisGeonim4Point66Degrees, Instant getTzaisGeonim4Point42Degrees, - Instant getTzaisGeonim5Point88Degrees, Instant getTzaisGeonim4Point8Degrees, + Instant getTzaisGeonim4Point8Degrees, Instant getTzaisGeonim6Point45Degrees, Instant getTzaisGeonim7Point083Degrees, Instant getTzaisGeonim7Point67Degrees, Instant getTzaisGeonim8Point5Degrees, Instant getTzaisGeonim9Point3Degrees, Instant getTzaisGeonim9Point75Degrees, Instant getTzais60, @@ -487,7 +486,6 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre this.getTzaisGeonim5Point95Degrees = getTzaisGeonim5Point95Degrees; this.getTzaisGeonim4Point66Degrees = getTzaisGeonim4Point66Degrees; this.getTzaisGeonim4Point42Degrees = getTzaisGeonim4Point42Degrees; - this.getTzaisGeonim5Point88Degrees = getTzaisGeonim5Point88Degrees; this.getTzaisGeonim4Point8Degrees = getTzaisGeonim4Point8Degrees; this.getTzaisGeonim6Point45Degrees = getTzaisGeonim6Point45Degrees; this.getTzaisGeonim7Point083Degrees = getTzaisGeonim7Point083Degrees; @@ -648,7 +646,6 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre public final Instant getTzaisGeonim5Point95Degrees; public final Instant getTzaisGeonim4Point66Degrees; public final Instant getTzaisGeonim4Point42Degrees; - public final Instant getTzaisGeonim5Point88Degrees; public final Instant getTzaisGeonim4Point8Degrees; public final Instant getTzaisGeonim6Point45Degrees; public final Instant getTzaisGeonim7Point083Degrees; From 023a3620f8aa840eeef22b81d0c3d2c6147109b9 Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Mon, 27 Apr 2026 21:19:07 -0400 Subject: [PATCH 074/121] Use adjusted local date for civil time calculation (#263) --- src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 7369c49d..22fe5216 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -745,7 +745,7 @@ public double getSunsetSolarDipFromOffset(double minutes) { * @see GeoLocation#getLocalMeanTimeOffset(Instant) */ public Instant getLocalMeanTime(LocalTime localTime) { - Instant civilTime = ZonedDateTime.of(getLocalDate(), localTime, getGeoLocation().getZoneId()).toInstant(); + Instant civilTime = ZonedDateTime.of(getAdjustedLocalDate(), localTime, getGeoLocation().getZoneId()).toInstant(); return getTimeOffset(civilTime, -getGeoLocation().getLocalMeanTimeOffset(civilTime)); } From 7b27fd52d06c62efaae8f1f38f31d13992eb14b2 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 21:21:22 -0400 Subject: [PATCH 075/121] Remove unnecessary comment in AstronomicalCalendar --- .../com/kosherjava/zmanim/AstronomicalCalendar.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 22fe5216..24e1045a 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -545,7 +545,7 @@ public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new */ public Instant getSunTransit() { double noon = getAstronomicalCalculator().getUTCNoon(getAdjustedLocalDate(), getGeoLocation()); - return getInstantFromTime(noon, SolarEvent.NOON); //FIXME NEW CODE + return getInstantFromTime(noon, SolarEvent.NOON); } /** @@ -579,11 +579,10 @@ public Instant getSolarMidnight() { } /** - * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. In this class it is - * calculated as halfway between the sunrise and sunset passed to this method. This time can be slightly off the - * real transit time due to changes in declination (the lengthening or shortening day). + * A method that returns sundial or solar noon (or midnight) calculated as halfway between the times passed in. It is + * close to, but not exactly occurs when the Sun is transiting the celestial meridian. It + * will not exactly match the astronomical transitdue to changes in declination (the lengthening or shortening day). * * @param startOfDay * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or From 11ffd5c636cdfff1a800905ca91fb2c3918862ac Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 21:32:13 -0400 Subject: [PATCH 076/121] Update CHANGELOG to the changes in master --- CHANGELOG.md | 86 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79822449..4e257dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,77 @@ ## 3.0.0 (future) ### Includes breaking changes -* Remove deprecated methods flagged for removal. -* Remove deprecated classes such as the redundant [GeoLocationUtils](https://github.com/KosherJava/zmanim/blob/master/src/main/java/com/kosherjava/zmanim/util/GeoLocationUtils.java). -* Possibly rename some classes such as the confusingly named [ComplexZmanimCalendar](https://github.com/KosherJava/zmanim/blob/master/src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java). +* Remove deprecated methods flagged for removal, including + * `ComprehensiveZmanimcalendar` class + * `getSofZmanShmaKolEliyahu()` + * `getTzaisGeonim3Point65Degrees()` - was prior to 13.5 minutes in Yerushalayim at the equinox/equilux. + * `getTzaisGeonim3Point676Degrees()` - was prior to 13.5 minutes in Yerushalayim at the equinox/equilux. + * `getSofZmanTfilahAteretTorah()` - use the `getSofZmanTfilaAteretTorah()` + * `getSofZmanShmaFixedLocal()` + * `getSofZmanTfilaFixedLocal()` + * `getMinchaGedolaBaalHatanyaGreaterThan30()` should now be calculated via `ZmanimCalendar.getMinchaGedolaGreaterThan30(Instant minchaGedolaBaalHatanya)` + * `getFixedLocalChatzosBasedZmanim(Date, Date, double)` + * Move ErevPesach zmanim to generic methods in the parent `ZmanimCalendar` class. + * Move `getSunriseBaalHatanya()` and `getSunsetBaalHatanya()` to the parent `ZmanimCalendar` class. + * various mispelled getBainHasmashos based zmanim (use the properly spelled getBainHasmashos versions + * `JewishCalendar` class + * `isVeseinTalUmatarStartDate()` - use `TefilaRules.isVeseinTalUmatarStartDate()` + * `isVeseinTalUmatarStartingTonight()` - use `TefilaRules.isVeseinTalUmatarStartingTonight()` + * `isVeseinTalUmatarRecited()` - use `TefilaRiles.isVeseinTalUmatarRecited()` + * `isVeseinBerachaRecited()` - use `TefilaRules.isVeseinBerachaRecited()` + * `isMashivHaruachStartDate` - use `TefilaRules.isMashivHaruachStartDate()` + * `isMashivHaruachEndDate()` - use `TefilaRules.isMashivHaruachEndDate()` + * `isMashivHaruachRecited()` - use `TefilaRules.isMashivHaruachRecited()` + * `isMoridHatalRecited()` - use `TefilaRules.isMoridHatalRecited()` +* Remove deprecated redundant [GeoLocationUtils](https://github.com/KosherJava/zmanim/blob/master/src/main/java/com/kosherjava/zmanim/util/GeoLocationUtils.java). Use the GeoLocation class instead. +* Move some methods from `ComprehensiveZmanimCalendar` to the parent `ZaminCalendar` classes. + * `getShaahZmanis72Minutes()` + * `getAlos16Point1Degrees()` + * `getSofZmanShmaMGA72Minutes()` + * `getSofZmanTfilaMGA72Minutes()` + * `getTzaisGeonim8Point5Degrees()` + * `getZmanisBasedOffset(double)` +* `ZmanimCalendar` class rename some genericly named method names to be more specific. The actual zmanim were not chnaged. + * rename `getTzais()` -> `getTzaisGeonim8Point5Degrees()` + * `getAlosHashachar()` -> `getAlos16Point1Degrees()` + * `getSofZmanShmaMGA()` -> `getSofZmanShmaMGA72Minutes()` + * `getSofZmanTfilaMGA()` -> `getSofZmanTfilaMGA72Minutes()` + * `getMinchaGedola()` -> `getMinchaGedolaGRA()` + * `getMinchaKetana()` -> `getMinchaKetanaGRA()` + * `getPlagHamincha()` -> `getPlagHaminchaGRA()` + * `getShaahZmanisMGA() ` -> `getShaahZmanis72Minutes()` + * `getAlos72()` -> `getAlos72Minutes()` + * `getTzais72()` -> `getTzais72Minutes()` + * `getShaahZmanisGra()` -> `getShaahZmanisGRA()` + * `getAlos120()` -> `getAlos120Minutes()` + * `getAlos96()` -> `getAlos96Minutes()` + * `getAlos90()` -> `getAlos90Minutes()` + * `getAlos72()` -> `getAlos72Minutes()` + * `getAlos60()` -> `getAlos60Minutes()` + * `getTzais50()` -> `getTzais50Minutes()` + * `getTzais60()` -> `getTzais60Minutes()` + * `getTzais72()` -> `getTzais72Minutes()` + * `getTzais90()` -> `getTzais90Minutes()` + * `getTzais96()` -> `getTzais96Minutes()` + * `getTzais120()` -> `getTzais120Minutes()` +* Rename some classes the confusingly named `ComplexZmanimCalendar` to `ComrehensiveZmanimCalendar`. +* Move "legacy" classes to `java.time` equivelants + * All zmanim now return `Instant`s insead of `Date` objects. + * Replace `SimpledateFormat` with `DateTimeFormatter` + * `Calendar` and `GregorianCalendar` were replaced with `LocalDate` or `ZonedDateTime`. + * `TimeZone` was replace with `ZoneId` + * `GeoLocation.getLocalMeanTimeOffset()` and `getAntimeridianAdjustment()` now takes in `Instant` parameter. + * Remove the no longer necessary `NOAACalculator.adjustHourForTimeZone(Calendar)` * `getSofZman*Chametz*` times will retun null if it is not _Erev Pesach_. -* Possibly increase the minimum supported JRE version from version 8 (the code currently almost certainly works on 6 today). -* ... - -## [2.6.0](https://github.com/KosherJava/zmanim/compare/2.5.0...master) (future) - +* Increase the minimum supported JRE version from version 8 (the code currently almost certainly works on 6 today) to Java 11 or higher. +* `JewishCalendar` now has plus and minus methods (matching the `java.time.LocalDate` class) for years, months and days. +* Tweaked logic in `AstronomicalCalendar.getInstantFromTime()` to address issues near the dateline. +* Improve null handling in `ComprehensiveZmanimCalendar.getMoladBasedTime()` +* Add `ComprehensiveZmanimCalendar.getMisheyakir12Point85Degrees()` +* `ComprehensiveZmanimcalendar.getMinchaGedolaGreaterThan30()` was moved to the parent `ZmanimCalendar.getMinchaGedolaGreaterThan30(Instant)` that allows it to work with any mincha gedola claculation. +* Change / remove `ComprehensiveZmanimcalendar` zmanim that were too early. + * `getTzaisGeonim4Point37Degrees()` -> `getTzaisGeonim4Point42Degrees()`. + * `getTzaisGeonim4Point61Degrees()` -> `getTzaisGeonim4Point66Degrees()` + * Remove `getTzaisGeonim5Point88Degrees()` since it is a drop too early * `ZmanimCalendar` [Astronomical Chatzos based changes](https://github.com/KosherJava/zmanim/commit/c523424b327f173d70f024bdf207ccae0413d487): * Add setting `useAstronomicalChatzos` (defaulted to true) to keep the mistaken compat break introduced in the v2.5.0 release. * Add setting `useAstronomicalChatzosForOtherZmanim` (defaulted to false). @@ -16,16 +79,15 @@ * Use `useAstronomicalChatzos` to control if `getChatzos()` returns `getSunTransit()` (astronomical chatzos) or getChatzosAsHalfDay(). * Add `getHalfDayBasedZman(Date startOfHalfDay, Date endOfHalfDay, double hours)` to allow other zmanim to be impacted by chatzos. * Use `useAstronomicalChatzosForOtherZmanim`. - * `ZmanimCalendar` - add utility method [getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset)`](https://github.com/KosherJava/zmanim/commit/60d1f09322835835035afa507ac2dc852f1cb033) to simplify zmaniyos time calculations. This allows calculations of various percentage of the day zmanim calculations. + * `ZmanimCalendar` - add utility method `[getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset)`](https://github.com/KosherJava/zmanim/commit/60d1f09322835835035afa507ac2dc852f1cb033) to simplify zmaniyos time calculations. This allows calculations of various percentage of the day zmanim calculations. * Use Astronomical Chatzos Halayla (as opposed as halfway between sunset and sunrise or 12 hours after chatzos hayom) * `AstronomicalCalculator` - [add `getSunLowerTransit()`](https://github.com/KosherJava/zmanim/commit/a76a3b65aeb45912bfdb02ce354f74bb97a9d9b2) * `AstronomicalCalculator` - [add abstract method `getUTCMidnight()`](https://github.com/KosherJava/zmanim/commit/f1904b12393c48b069d1333a7397fce66804958d) * `NOAACalculator` - [implement `getUTCMidnight()`](https://github.com/KosherJava/zmanim/commit/b93eea3388bfdcc2dd526bbcb1be37ddb88fee08) * `AstronomicalCalculator` - [add abstract method `getUTCMidnight()`](https://github.com/KosherJava/zmanim/commit/1223dd0b6ad2b492818aacc5eb478747989e0ace) -* `ComplexZmanimCalendar` - [significant updates](https://github.com/KosherJava/zmanim/commit/46800aa750ac56c2da9bc55fbf976ea1a092221d) - * Deprecate `getTzaisGeonim3Point65Degrees()` and `getTzaisGeonim3Point676Degrees()`, very early tzais geonim time that are earlier than 13.5 minutes in Yerushalayim at the equinox / equilux. +* `ComprehensiveZmanimCalendar` - [significant updates](https://github.com/KosherJava/zmanim/commit/46800aa750ac56c2da9bc55fbf976ea1a092221d) * Started coding some zmanim to use the half-day zmanim config. - * Deprecate `getFixedLocalChatzosBasedZmanim()` in favor of `getHalfDayBasedZman()` in the parent ZmanimCalendar class. + * Change `getFixedLocalChatzosBasedZmanim()` in favor of `getHalfDayBasedZman()` in the parent `ZmanimCalendar class. * `getFixedLocalChatzos()` now just calls the new getLocalMeanTime(12.0) in the grandparent AstronomicalCalendar class. * Remove `getSolarMidnight()` that was added to the AstronomicalCalendar grandparent class. * Undeprecate `getPlagAlosToSunset()` since it is not a zman that can be too late. From 0d0d8114d6b4577d3d4289b0256fcad71f7a8232 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 22:27:12 -0400 Subject: [PATCH 077/121] AstronomicalCalendar. - minor JavaDoc chnages --- .../zmanim/AstronomicalCalendar.java | 374 ++++++++---------- 1 file changed, 174 insertions(+), 200 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 24e1045a..a224af45 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -30,20 +30,19 @@ import com.kosherjava.zmanim.util.ZmanimFormatter; /** - * A Java calendar that calculates astronomical times such as {@link #getSunriseWithElevation() sunrise}, {@link #getSunsetWithElevation() - * sunset} and twilight times. This class contains a {@link #getLocalDate() LocalDate} and can therefore use the standard - * Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can be - * changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it with - * the {@link #setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine - * implementations are included in the util package. - * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This - * is usually caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never - * happen on that date. This is common when calculating twilight with a deep dip below the horizon for locations as far - * south of the North Pole as London, in the northern hemisphere. The sun never reaches this dip at certain times of the - * year. When the calculations encounter this condition a null will be returned when a - * {@link java.time.Instant} 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. + * A Java calendar that calculates astronomical times such as {@link getSunriseWithElevation() sunrise}, {@link + * getSunsetWithElevation() sunset} and twilight times. This class contains a {@link getLocalDate() LocalDate} and can therefore + * use the standard Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can + * be changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it withthe {@link + * setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations are included in the + * util package. + * Note: There are times when the algorithms can't calculate proper values for sunrise, sunset and twilight. This is usually + * caused by trying to calculate times for areas either very far North or South, where sunrise / sunset never happen on that date. + * This is common when calculating twilight with a deep dip below the horizon for locations as far south of the North Pole as London, + * in the northern hemisphere. The sun never reaches this dip at certain times of the year. When the calculations encounter this + * condition a null will be returned when a {@link java.time.Instant} 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: @@ -72,11 +71,11 @@ public class AstronomicalCalendar implements Cloneable { /** - * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below - * the horizon at sunrise and sunset. - * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith - * adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not - * be used for calculations above or below 90° since they are usually calculated as an offset to 90°. + * 90° below the vertical. Used as a basis for most calculations since the location of the sun is 90° below the horizon + * at sunrise and sunset. + * Note : it is important to note that for sunrise and sunset the {@link AstronomicalCalculator#adjustZenith(double, + * double) adjusted zenith} is required to account for the radius of the sun and refraction. The adjusted zenith should not be + * used for calculations above or below 90° since they are usually calculated as an offset to 90°. */ public static final double GEOMETRIC_ZENITH = 90; @@ -111,20 +110,19 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The getSunriseWithElevation method returns a Instant 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 - * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction - * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. + * The getSunriseWithElevation method returns a Instant 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 {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of + * refraction and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. * - * @return the Instant representing the exact sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith - * @see #getSeaLevelSunrise() - * @see AstronomicalCalendar#getUTCSunrise + * @return the Instant representing the exact sunrise 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, a + * null will be returned. See detailed explanation on top of the page. + * @see AstronomicalCalculator#adjustZenith(double, double) + * @see getSeaLevelSunrise() + * @see getUTCSunrise(double) */ public Instant getSunriseWithElevation() { double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); @@ -135,17 +133,15 @@ public Instant getSunriseWithElevation() { } } /** - * @deprecated Use {@link #getSunriseWithElevation()} instead. - * This method already accounts for the observer's elevation, but the name - * does not clearly indicate this behavior. The replacement method has a - * clearer and more descriptive name. + * @deprecated Use {@link getSunriseWithElevation()} instead. This method already accounts for the observer's elevation, but the + * name does not clearly indicate this behavior. The replacement method has a clearer and more descriptive name. * * @return the Instant representing the exact sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith - * @see #getSeaLevelSunrise() - * @see AstronomicalCalendar#getUTCSunrise + * @see AstronomicalCalculator#adjustZenith(double, double) + * @see getSeaLevelSunrise() + * @see getUTCSunrise(double) */ @Deprecated(forRemoval = false) public Instant getSunrise() { @@ -161,9 +157,9 @@ public Instant getSunrise() { * @return the Instant representing the exact sea-level sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getSunriseWithElevation - * @see AstronomicalCalendar#getUTCSeaLevelSunrise - * @see #getSeaLevelSunset() + * @see getSunriseWithElevation() + * @see getUTCSeaLevelSunrise(double) + * @see getSeaLevelSunset() */ public Instant getSeaLevelSunrise() { double sunrise = getUTCSeaLevelSunrise(GEOMETRIC_ZENITH); @@ -176,37 +172,32 @@ public Instant getSeaLevelSunrise() { /** * A method that returns the beginning of civil twilight - * (dawn) using a zenith of {@link #CIVIL_ZENITH 96°}. + * (dawn) using a zenith of {@link CIVIL_ZENITH 96°}. * * @return The Instant of the beginning of civil twilight using a zenith of 96°. If the calculation * can't be computed, null will be returned. See detailed explanation on top of the page. - * @see #CIVIL_ZENITH */ public Instant getBeginCivilTwilight() { return getSunriseOffsetByDegrees(CIVIL_ZENITH); } /** - * A method that returns the beginning of nautical twilight using a zenith of {@link - * #NAUTICAL_ZENITH 102°}. + * A method that returns the beginning of nautical twilight + * using a zenith of {@link NAUTICAL_ZENITH 102°}. * * @return The Instant of the beginning of nautical twilight using a zenith of 102°. If the calculation * can't be computed null will be returned. See detailed explanation on top of the page. - * @see #NAUTICAL_ZENITH */ public Instant getBeginNauticalTwilight() { return getSunriseOffsetByDegrees(NAUTICAL_ZENITH); } /** - * A method that returns the beginning of astronomical twilight using a zenith of - * {@link #ASTRONOMICAL_ZENITH 108°}. + * A method that returns the beginning of astronomical + * twilight using a zenith of {@link ASTRONOMICAL_ZENITH 108°}. * * @return The Instant of the beginning of astronomical twilight using a zenith of 108°. If the calculation * can't be computed, null will be returned. See detailed explanation on top of the page. - * @see #ASTRONOMICAL_ZENITH */ public Instant getBeginAstronomicalTwilight() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); @@ -214,22 +205,22 @@ public Instant getBeginAstronomicalTwilight() { /** * The getSunsetWithElevation method returns an Instant 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 - * {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction - * and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. - * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. Note: - * In certain cases the calculates sunset will occur before sunrise. This will typically happen when a timezone - * other than the local timezone is used (calculating Los Angeles sunset using a GMT timezone for example). In this - * case the sunset date will be incremented to the following date. + * {@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 {@link AstronomicalCalculator} to add approximately 50/60 of a + * degree to account for 34 archminutes of refraction and 16 archminutes for the sun's radius for a total of {@link + * AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See documentation for the specific implementation of the + * {@link AstronomicalCalculator} that you are using. + * Note: In certain cases the calculates sunset will occur before sunrise. This will typically happen when a time zone other than + * the local timezone is used (calculating Los Angeles sunset using a GMT time zone for example). In this case the sunset date + * will be incremented to the following date. * - * @return the Instant representing the exact sunset 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith - * @see #getSeaLevelSunset() - * @see AstronomicalCalendar#getUTCSunset + * @return the Instant representing the exact sunset 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, a + * null will be returned. See detailed explanation on top of the page. + * @see AstronomicalCalculator#adjustZenith(double, double) + * @see getSeaLevelSunset() + * @see getUTCSunset(double) */ public Instant getSunsetWithElevation() { double sunset = getUTCSunset(GEOMETRIC_ZENITH); @@ -241,17 +232,15 @@ public Instant getSunsetWithElevation() { } /** - * @deprecated Use {@link #getSunsetWithElevation()} instead. - * This method already accounts for the observer's elevation, but its name - * does not clearly reflect that behavior. The replacement method provides - * a more accurate and descriptive name. + * @deprecated Use {@link getSunsetWithElevation()} instead. This method already accounts for the observer's elevation, but its + * name does not clearly reflect that behavior. The replacement method provides a more accurate and descriptive name. * - * @return the Instant representing the exact sunset 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith - * @see #getSeaLevelSunset() - * @see AstronomicalCalendar#getUTCSunset + * @return the Instant representing the exact sunset 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, a + * null will be returned. See detailed explanation on top of the page. + * @see AstronomicalCalculator#adjustZenith(double, double) + * @see getSeaLevelSunset() + * @see getUTCSunset(double) */ @Deprecated(forRemoval = false) public Instant getSunset() { @@ -259,17 +248,16 @@ public Instant getSunset() { } /** - * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation - * adjustment}. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light, - * something that is not affected by elevation. This method returns sunset calculated at sea level. This forms the - * base for dusk calculations that are calculated as a dip below the horizon after sunset. + * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjustment}. + * Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light, something that is not + * affected by elevation. This method returns sunset calculated at sea level. This forms the base for dusk calculations that are + * calculated as a dip below the horizon after sunset. * * @return the Instant representing the exact sea-level sunset 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getSunsetWithElevation - * @see AstronomicalCalendar#getUTCSeaLevelSunset - * @see #getSunsetWithElevation() + * @see getSunsetWithElevation() + * @see getUTCSeaLevelSunset(double) */ public Instant getSeaLevelSunset() { double sunset = getUTCSeaLevelSunset(GEOMETRIC_ZENITH); @@ -282,35 +270,32 @@ public Instant getSeaLevelSunset() { /** * A method that returns the end of civil twilight - * using a zenith of {@link #CIVIL_ZENITH 96°}. + * using a zenith of {@link CIVIL_ZENITH 96°}. * - * @return The Instant of the end of civil twilight using a zenith of {@link #CIVIL_ZENITH 96°}. If the + * @return The Instant of the end of civil twilight using a zenith of {@link CIVIL_ZENITH 96°}. If the * calculation can't be computed, null will be returned. See detailed explanation on top of the page. - * @see #CIVIL_ZENITH */ public Instant getEndCivilTwilight() { return getSunsetOffsetByDegrees(CIVIL_ZENITH); } /** - * A method that returns the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}. + * A method that returns the end of nautical twilight using a zenith of {@link NAUTICAL_ZENITH 102°}. * - * @return The Instant of the end of nautical twilight using a zenith of {@link #NAUTICAL_ZENITH 102°}. If + * @return The Instant of the end of nautical twilight using a zenith of {@link NAUTICAL_ZENITH 102°}. If * the calculation can't be computed, null will be returned. See detailed explanation on top of the * page. - * @see #NAUTICAL_ZENITH */ public Instant getEndNauticalTwilight() { return getSunsetOffsetByDegrees(NAUTICAL_ZENITH); } /** - * A method that returns the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH 108°}. + * A method that returns the end of astronomical twilight using a zenith of {@link ASTRONOMICAL_ZENITH 108°}. * - * @return the Instant of the end of astronomical twilight using a zenith of {@link #ASTRONOMICAL_ZENITH + * @return the Instant of the end of astronomical twilight using a zenith of {@link ASTRONOMICAL_ZENITH * 108°}. If the calculation can't be computed, null will be returned. See detailed * explanation on top of the page. - * @see #ASTRONOMICAL_ZENITH */ public Instant getEndAstronomicalTwilight() { return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH); @@ -318,7 +303,7 @@ public Instant getEndAstronomicalTwilight() { /** * A utility method that returns a date offset by the offset time passed in as a parameter. This method casts the - * offset as a long and calls {@link #getTimeOffset(Instant, long)}. + * offset as a long and calls {@link getTimeOffset(Instant, long)}. * * @param time * the start time @@ -331,10 +316,10 @@ public static Instant getTimeOffset(Instant time, double offset) { } /** - * A utility method that returns an Instant offset by the offset time passed in. Please note that the - * level of light during twilight is not affected by elevation, so if this is being used to calculate an offset before - * sunrise or after sunset with the intent of getting a rough "level of light" calculation, the sunrise or sunset time - * passed to this method should be sea level sunrise and sunset. + * A utility method that returns an Instant offset by the offset time passed in. Please note that the level of light + * during twilight is not affected by elevation, so if this is being used to calculate an offset before sunrise or after sunset + * with the intent of getting a rough "level of light" calculation, the sunrise or sunset time passed to this method should be + * sea level sunrise and sunset. * * @param time * the start time @@ -350,16 +335,15 @@ public static Instant getTimeOffset(Instant time, long offsetMillis) { } /** - * A utility method that returns the time of an offset by degrees below or above the horizon of - * {@link #getSunriseWithElevation() sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° - * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. + * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunriseWithElevation() + * sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° before sunrise, an offset of 14 + * + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees before {@link #getSunriseWithElevation()} to use in the calculation. For time after sunrise use - * negative numbers. Note that the degree offset is from the vertical, so for a calculation of 14° - * before sunrise, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a - * parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunriseWithElevation()}. If the calculation + * the degrees before {@link getSunriseWithElevation()} to use in the calculation. For time after sunrise use negative + * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° before sunrise, an offset + * of 14 + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. + * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunriseWithElevation()}. 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 page. @@ -371,18 +355,17 @@ public Instant getSunriseOffsetByDegrees(double offsetZenith) { } /** - * A utility method that returns the time of an offset by degrees below or above the horizon of {@link #getSunsetWithElevation() - * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an - * offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. + * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunsetWithElevation() + * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an offset of 14 + + * {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees after {@link #getSunsetWithElevation()} to use in the calculation. For time before sunset use negative - * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after - * sunset, an offset of 14 + {@link #GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link #getSunsetWithElevation()}. 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 page. + * the degrees after {@link getSunsetWithElevation()} to use in the calculation. For time before sunset use negative + * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an offset + * of 14 + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. + * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunsetWithElevation()}. 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 + * and one where it does not set, a null will be returned. See detailed explanation on top of the page. */ public Instant getSunsetOffsetByDegrees(double offsetZenith) { double sunset = getUTCSunset(offsetZenith); @@ -391,22 +374,22 @@ public Instant getSunsetOffsetByDegrees(double offsetZenith) { } /** - * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default - * {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} and default the LocalDate to the current date. + * Default constructor will set a default {@link GeoLocation#GeoLocation()}, a default {@link AstronomicalCalculator#getDefault() + * AstronomicalCalculator} and default the LocalDate to the current date. */ public AstronomicalCalendar() { this(new GeoLocation()); } /** - * A constructor that takes in geolocation information as a - * parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar - * calculations is the more accurate {@link com.kosherjava.zmanim.util.NOAACalculator}. + * A constructor that takes in geolocation information as a parameter. + * The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar calculations is the more + * accurate {@link com.kosherjava.zmanim.util.NOAACalculator}. * * @param geoLocation * The location information used for calculating astronomical sun times. * - * @see #setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class. + * @see setAstronomicalCalculator(AstronomicalCalculator) for changing the calculator class. */ public AstronomicalCalendar(GeoLocation geoLocation) { setLocalDate(LocalDate.now(geoLocation.getZoneId())); @@ -415,8 +398,8 @@ public AstronomicalCalendar(GeoLocation geoLocation) { } /** - * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using - * daylight savings time. + * A method that returns the sunrise in UTC time without correction for time zone offset from GMT and without using daylight + * savings time. * * @param zenith * the degrees below the horizon. For time after sunrise use negative numbers. @@ -439,8 +422,8 @@ public double getUTCSunrise(double zenith) { * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. 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, {@link Double#NaN} will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getUTCSunrise - * @see AstronomicalCalendar#getUTCSeaLevelSunset + * @see getUTCSunrise(double) + * @see getUTCSeaLevelSunset(double) */ public double getUTCSeaLevelSunrise(double zenith) { return getAstronomicalCalculator().getUTCSunrise(getAdjustedLocalDate(), getGeoLocation(), zenith, false); @@ -455,39 +438,37 @@ public double getUTCSeaLevelSunrise(double zenith) { * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. 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, {@link Double#NaN} will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getUTCSeaLevelSunset + * @see getUTCSeaLevelSunset(double) */ public double getUTCSunset(double zenith) { return getAstronomicalCalculator().getUTCSunset(getAdjustedLocalDate(), getGeoLocation(), zenith, true); } /** - * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and - * without using daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the - * amount of visible light, something that is not affected by elevation. This method returns UTC sunset calculated - * at sea level. This forms the base for dusk calculations that are calculated as a dip below the horizon after - * sunset. + * A method that returns the sunset in UTC time without correction for elevation, time zone offset from GMT and without using + * daylight savings time. Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light, + * something that is not affected by elevation. This method returns UTC sunset calculated at sea level. This forms the base for + * dusk calculations that are calculated as a dip below the horizon after sunset. * * @param zenith * the degrees below the horizon. For time before sunset use negative numbers. * @return The time in the format: 18.75 for 18:45:00 UTC/GMT. 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, {@link Double#NaN} will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalendar#getUTCSunset - * @see AstronomicalCalendar#getUTCSeaLevelSunrise + * @see getUTCSunset(double) + * @see getUTCSeaLevelSunrise(double) */ public double getUTCSeaLevelSunset(double zenith) { return getAstronomicalCalculator().getUTCSunset(getAdjustedLocalDate(), getGeoLocation(), zenith, false); } /** - * A method that returns a sea-level based temporal (solar) hour. The day from {@link #getSeaLevelSunrise() - * sea-level sunrise} to {@link #getSeaLevelSunset() sea-level sunset} is split into 12 equal parts with each - * one being a temporal hour. + * A method that returns a sea-level based temporal (solar) hour. The day from {@link getSeaLevelSunrise() sea-level sunrise} to + * {@link getSeaLevelSunset() sea-level sunset} is split into 12 equal parts with each one being a temporal hour. * - * @see #getSeaLevelSunrise() - * @see #getSeaLevelSunset() - * @see #getTemporalHour(Instant, Instant) + * @see getSeaLevelSunrise() + * @see getSeaLevelSunset() + * @see getTemporalHour(Instant, Instant) * * @return the long millisecond length of a temporal hour. If the calculation can't be computed, * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page. @@ -498,10 +479,9 @@ public long getTemporalHour() { } /** - * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset - * passed as parameters to this method. An example of the use of this method would be the calculation of a - * elevation adjusted temporal hour by passing in {@link #getSunriseWithElevation() sunrise} and - * {@link #getSunsetWithElevation() sunset} as parameters. + * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset passed as + * parameters to this method. An example of the use of this method would be the calculation of a elevation adjusted temporal + * hour by passing in {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} as parameters. * * @param startOfDay * The start of the day. @@ -511,7 +491,7 @@ public long getTemporalHour() { * @return the long millisecond length of the temporal hour. If the calculation can't be computed a * {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the page. * - * @see #getTemporalHour() + * @see getTemporalHour() */ public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new code if (startOfDay == null || endOfDay == null) { @@ -524,22 +504,21 @@ public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new /** * A method that returns sundial or solar noon. It occurs when the Sun is transiting the celestial meridian. The calculations used by - * this class depend on the {@link AstronomicalCalculator} used. If this calendar instance is {@link - * #setAstronomicalCalculator(AstronomicalCalculator) set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator} - * (the default) it will calculate astronomical noon. If the calendar instance is to use the - * {@link com.kosherjava.zmanim.util.SunTimesCalculator}, that does not have code to calculate astronomical noon, the - * sun transit is calculated as halfway between sea level sunrise and sea level sunset, which can be slightly off the - * real transit time due to changes in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper + * href="https://en.wikipedia.org/wiki/Meridian_%28astronomy%29">celestial meridian. The calculations used by this class + * depend on the {@link AstronomicalCalculator} used. If this calendar instance is {@link setAstronomicalCalculator( + * AstronomicalCalculator) set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator} (the default) it will calculate + * astronomical noon. If the calendar instance is to use the {@link com.kosherjava.zmanim.util.SunTimesCalculator}, that does + * not have code to calculate astronomical noon, the sun transit is calculated as halfway between sea level sunrise and sea level + * sunset, which can be slightly off the real transit time due to changes in declination (the lengthening or shortening day). See + * The Definition of Chatzos for details on the proper * definition of solar noon / midday. * - * @return the Instant representing Sun's transit. If the calculation can't be computed such as when using - * the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not support getting solar - * noon for 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 page. - * @see #getSunTransit(Instant, Instant) - * @see #getTemporalHour() + * @return the Instant representing Sun's transit. If the calculation can't be computed such as when using the {@link + * com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not support getting solar noon for 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 page. + * @see getSunTransit(Instant, Instant) + * @see getTemporalHour() * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ @@ -549,27 +528,26 @@ public Instant getSunTransit() { } /** - * A method that returns solar midnight at the end of the current day (that may actually be after midnight of the day it - * is being calculated for). It occurs when the Sun is transiting the lower celestial meridian, or - * when the sun is at it's nadir. The calculations used by this class - * depend on the {@link AstronomicalCalculator} used. If this calendar instance is {@link - * #setAstronomicalCalculator(AstronomicalCalculator) set} to use the {@link com.kosherjava.zmanim.util.NOAACalculator} - * (the default) it will calculate astronomical midnight. If the calendar instance is to use the {@link - * com.kosherjava.zmanim.util.SunTimesCalculator USNO Calculator}, that does not have code to calculate astronomical noon, - * midnight is calculated as 12 hours after halfway between sea level sunrise and sea level sunset of that day. This can - * be slightly off the real transit time due to changes in declination (the lengthening or shortening day). See The Definition of Chatzos for details on the proper + * A method that returns solar midnight at the end of the current day (that may actually be after midnight of the day it is being + * calculated for). It occurs when the Sun is transiting the + * lower celestial meridian, or when the sun is at it's nadir. The calculations used by this class depend on the {@link + * AstronomicalCalculator} used. If this calendar instance is {@link setAstronomicalCalculator(AstronomicalCalculator) set} to use + * the {@link com.kosherjava.zmanim.util.NOAACalculator} (the default) it will calculate astronomical midnight. If the calendar + * instance is to use the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO Calculator}, that does not have code to + * calculate astronomical noon, midnight is calculated as 12 hours after halfway between sea level sunrise and sea level sunset + * of that day. This can be slightly off the real transit time due to changes in declination (the lengthening or shortening day). + * See The Definition of Chatzos for details on the proper * definition of solar noon / midday. * - * @return the Instant representing Sun's lower transit at the end of the current day. If the calculation can't - * be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that - * does not support getting solar noon or midnight for 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. This is not - * relevant when using the {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected - * to return null. See the detailed explanation on top of the page. + * @return the Instant representing Sun's lower transit at the end of the current day. If the calculation can't be + * computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not + * support getting solar noon or midnight for 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. This is not relevant when using the + * {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected to return null. + * See the detailed explanation on top of the page. * - * @see #getSunTransit() + * @see getSunTransit() * @see com.kosherjava.zmanim.util.NOAACalculator#getUTCNoon(Calendar, GeoLocation) * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(Calendar, GeoLocation) */ @@ -579,17 +557,17 @@ public Instant getSolarMidnight() { } /** - * A method that returns sundial or solar noon (or midnight) calculated as halfway between the times passed in. It is - * close to, but not exactly occurs when the Sun is transiting the celestial meridian. It - * will not exactly match the astronomical transitdue to changes in declination (the lengthening or shortening day). + * A method that returns sundial or solar noon (or midnight) calculated as halfway between the times passed in. It is close to, + * but not exactly occurs when the Sun is transiting the + * celestial meridian. It will not exactly match the + * astronomical transit, due to changes in declination (the lengthening or shortening day). * * @param startOfDay - * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or - * any arbitrary start of day) passed to this method. + * the start of day for calculating the sun's transit. This can be sea level sunrise, visual sunrise (or any arbitrary + * start of day) passed to this method. * @param endOfDay - * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any - * arbitrary end of day) passed to this method. + * the end of day for calculating the sun's transit. This can be sea level sunset, visual sunset (or any arbitrary end + * of day) passed to this method. * * @return the Instant representing Sun's transit. 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 @@ -665,7 +643,7 @@ protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { * efficiently return the the solar elevation (the sun's position in degrees below (or above) the horizon) * at the given time even in the arctic when there is no sunrise. * @see AstronomicalCalculator#getSolarElevation(Calendar, GeoLocation) - * @see #getSunsetSolarDipFromOffset(double) + * @see getSunsetSolarDipFromOffset(double) */ @Deprecated(forRemoval=false) public double getSunriseSolarDipFromOffset(double minutes) { @@ -704,7 +682,7 @@ public double getSunriseSolarDipFromOffset(double minutes) { * efficiently return the the solar elevation (the sun's position in degrees below (or above) the horizon) * at the given time even in the arctic when there is no sunrise. * @see AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) - * @see #getSunriseSolarDipFromOffset(double) + * @see getSunriseSolarDipFromOffset(double) */ @Deprecated(forRemoval=false) public double getSunsetSolarDipFromOffset(double minutes) { @@ -728,14 +706,13 @@ public double getSunsetSolarDipFromOffset(double minutes) { } /** - * A method that returns local mean time (LMT) time - * converted to regular clock time for the local wall-clock time passed to this method. This time is - * adjusted from standard time to account for the local latitude. The 360° of the globe divided by 24 calculates - * to 15° per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm. - * Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the closest multiple of 15 at -75°. This is - * multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a noon time of 11:56:53am. This - * method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone and Daylight saving time to return LMT. + * A method that returns local mean time (LMT) time converted to + * regular clock time for the local wall-clock time passed to this method. This time is adjusted from standard time to account for + * the local latitude. The 360° of the globe divided by 24 calculates to 15° per hour with 4 minutes per degree, so at a + * longitude of 0 , 15, 30 etc... noon is at exactly 12:00pm. Lakewood, N.J., with a longitude of -74.222, is 0.7906 away from the + * closest multiple of 15 at -75°. This is multiplied by 4 clock minutes (per degree) to yield 3 minutes and 7 seconds for a + * noon time of 11:56:53am. This method is not tied to the theoretical 15° time zones, but will adjust to the actual time zone + * and Daylight saving time to return LMT. * * @param localTime * the local wall-clock time (such as 12:00 for noon and 00:00 for midnight) to calculate as LMT. @@ -760,8 +737,8 @@ private LocalDate getAdjustedLocalDate(){ } /** - * Used by Molad based zmanim to determine if zmanim occur during the current day. - * This is also used as the anchor for current timezone-offset calculations. + * Used by Molad based zmanim to determine if zmanim occur during the current day. This is also used as the + * anchor for current timezone-offset calculations. * @return midnight at the start of the current local date in the configured timezone */ protected ZonedDateTime getMidnightLastNight() { @@ -854,7 +831,7 @@ public void setGeoLocation(GeoLocation geoLocation) { * A method that returns the currently set AstronomicalCalculator. * * @return Returns the astronomicalCalculator. - * @see #setAstronomicalCalculator(AstronomicalCalculator) + * @see setAstronomicalCalculator(AstronomicalCalculator) */ public AstronomicalCalculator getAstronomicalCalculator() { return this.astronomicalCalculator; @@ -895,9 +872,6 @@ public void setLocalDate(LocalDate localDate) { /** * A method that creates a deep copy of the object. - * Note: If the {@link java.util.TimeZone} in the cloned {@link com.kosherjava.zmanim.util.GeoLocation} will - * be changed from the original, it is critical that - * {@link com.kosherjava.zmanim.AstronomicalCalendar#getLocalDate()}. * * @see java.lang.Object#clone() */ From ed7a82148b73c2dfcf542434bc9bf0fc2631b44c Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 23:20:10 -0400 Subject: [PATCH 078/121] Add getHebrewMonthList() and setHebrewMonthList(String[]) - This allows overriding the default month of Chesvan to Marcheshvan etc. - Throw an IllegalArgumentException if the array length of months != 14 - Remove the experimental and private formatMolad(long moladChalakim) - JavaDoc tweaks --- .../hebrewcalendar/HebrewDateFormatter.java | 218 +++++++++--------- 1 file changed, 112 insertions(+), 106 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index f7ecbd71..c591d61c 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -42,39 +42,39 @@ public class HebrewDateFormatter { /** - * See {@link #isHebrewFormat()} and {@link #setHebrewFormat(boolean)}. + * See {@link isHebrewFormat()} and {@link setHebrewFormat(boolean)}. */ private boolean hebrewFormat = false; /** - * See {@link #isUseLongHebrewYears()} and {@link #setUseLongHebrewYears(boolean)}. + * See {@link isUseLongHebrewYears()} and {@link setUseLongHebrewYears(boolean)}. */ private boolean useLonghebrewYears = false; /** - * See {@link #isUseGershGershayim()} and {@link #setUseGershGershayim(boolean)}. + * See {@link isUseGershGershayim()} and {@link setUseGershGershayim(boolean)}. */ private boolean useGershGershayim = true; /** - * See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. + * See {@link isLongWeekFormat()} and {@link setLongWeekFormat(boolean)}. */ private boolean longWeekFormat = true; /** - * See {@link #isUseFinalFormLetters()} and {@link #setUseFinalFormLetters(boolean)}. + * See {@link isUseFinalFormLetters()} and {@link setUseFinalFormLetters(boolean)}. */ private boolean useFinalFormLetters = false; /** - * The internal DateFormat.  See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. + * The internal DateFormat.  See {@link isLongWeekFormat()} and {@link setLongWeekFormat(boolean)}. */ private DateTimeFormatter weekFormat; /** * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method * uses this for transliterated parsha formatting.  This list can be overridden (for Sephardi - * English transliteration for example) by setting the {@link #setTransliteratedParshiosList(EnumMap)}.  The list + * English transliteration for example) by setting the {@link setTransliteratedParshiosList(EnumMap)}.  The list * includes double and special parshiyos is set as "Bereshis, Noach, Lech Lecha, Vayera, Chayei Sara, * Toldos, Vayetzei, Vayishlach, Vayeshev, Miketz, Vayigash, Vayechi, Shemos, Vaera, Bo, Beshalach, Yisro, Mishpatim, * Terumah, Tetzaveh, Ki Sisa, Vayakhel, Pekudei, Vayikra, Tzav, Shmini, Tazria, Metzora, Achrei Mos, Kedoshim, Emor, @@ -83,7 +83,7 @@ public class HebrewDateFormatter { * Vayakhel Pekudei, Tazria Metzora, Achrei Mos Kedoshim, Behar Bechukosai, Chukas Balak, Matos Masei, Nitzavim Vayeilech, * Shekalim, Zachor, Parah, Hachodesh,Shuva, Shira, Hagadol, Chazon, Nachamu". * - * @see #formatParsha(JewishCalendar) + * @see formatParsha(JewishCalendar) */ private EnumMap transliteratedParshaMap; @@ -271,22 +271,21 @@ public HebrewDateFormatter() { } /** - * Returns if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as - * ראשון or short such as א when formatting the day of week in - * {@link #isHebrewFormat() Hebrew}. + * Returns if the {@link formatDayOfWeek(JewishDate)} will use the long format such as ראשון + * or short such as א when formatting the day of week in {@link isHebrewFormat() Hebrew}. * * @return the longWeekFormat - * @see #setLongWeekFormat(boolean) - * @see #formatDayOfWeek(JewishDate) + * @see setLongWeekFormat(boolean) + * @see formatDayOfWeek(JewishDate) */ public boolean isLongWeekFormat() { return longWeekFormat; } /** - * Setting to control if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as - * ראשון or short such as א when formatting the day of week in - * {@link #isHebrewFormat() Hebrew}. + * Setting to control if the {@link formatDayOfWeek(JewishDate)} will use the long format such as + * ראשון or short such as א when formatting the day of week in {@link isHebrewFormat() + * Hebrew}. * * @param longWeekFormat * the longWeekFormat to set @@ -315,8 +314,8 @@ public void setLongWeekFormat(boolean longWeekFormat) { /** * Transliterated month names.  Defaults to ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", * "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" ]. - * @see #getTransliteratedMonthList() - * @see #setTransliteratedMonthList(String[]) + * @see getTransliteratedMonthList() + * @see setTransliteratedMonthList(String[]) */ private String[] transliteratedMonths = { "Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" }; @@ -324,25 +323,25 @@ public void setLongWeekFormat(boolean longWeekFormat) { /** * The Hebrew omer prefix charachter. It defaults to ב producing בעומר, * but can be set to ל to produce לעומר (or any other prefix). - * @see #getHebrewOmerPrefix() - * @see #setHebrewOmerPrefix(String) + * @see getHebrewOmerPrefix() + * @see setHebrewOmerPrefix(String) */ private String hebrewOmerPrefix = "\u05D1"; /** * The default value for formatting Shabbos (Saturday).  Defaults to Shabbos. - * @see #getTransliteratedShabbosDayOfWeek() - * @see #setTransliteratedShabbosDayOfWeek(String) + * @see getTransliteratedShabbosDayOfWeek() + * @see setTransliteratedShabbosDayOfWeek(String) */ private String transliteratedShabbosDayOfWeek = "Shabbos"; /** * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation "Shabbos". - * This can be overwritten using the {@link #setTransliteratedShabbosDayOfWeek(String)} + * This can be overwritten using the {@link setTransliteratedShabbosDayOfWeek(String)} * * @return the transliteratedShabbos. The default list of months uses Ashkenazi pronunciation "Shabbos". - * @see #setTransliteratedShabbosDayOfWeek(String) - * @see #formatDayOfWeek(JewishDate) + * @see setTransliteratedShabbosDayOfWeek(String) + * @see formatDayOfWeek(JewishDate) */ public String getTransliteratedShabbosDayOfWeek() { return transliteratedShabbosDayOfWeek; @@ -350,20 +349,20 @@ public String getTransliteratedShabbosDayOfWeek() { /** * Setter to override the default transliterated name of "Shabbos" to alternate spelling such as "Shabbat" used by - * the {@link #formatDayOfWeek(JewishDate)} + * the {@link formatDayOfWeek(JewishDate)} * * @param transliteratedShabbos * the transliteratedShabbos to set * - * @see #getTransliteratedShabbosDayOfWeek() - * @see #formatDayOfWeek(JewishDate) + * @see getTransliteratedShabbosDayOfWeek() + * @see formatDayOfWeek(JewishDate) */ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { this.transliteratedShabbosDayOfWeek = transliteratedShabbos; } /** - * See {@link #getTransliteratedHolidayList()} and {@link #setTransliteratedHolidayList(String[])}. + * See {@link getTransliteratedHolidayList()} and {@link setTransliteratedHolidayList(String[])}. */ private String[] transliteratedHolidays = {"Erev Pesach", "Pesach", "Chol Hamoed Pesach", "Pesach Sheni", "Erev Shavuos", "Shavuos", "Seventeenth of Tammuz", "Tishah B'Av", "Tu B'Av", "Erev Rosh Hashana", @@ -375,7 +374,7 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { /** * Returns the array of holidays transliterated into Latin chars. This is used by the - * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses + * {@link formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses * Ashkenazi pronunciation in typical American English spelling. * * @return the array of transliterated holidays. The default list is currently ["Erev Pesach", "Pesach", @@ -386,9 +385,9 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { * "Purim Katan", "Rosh Chodesh", "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", * "Lag B'Omer","Shushan Purim Katan","Isru Chag"]. * - * @see #setTransliteratedMonthList(String[]) - * @see #formatYomTov(JewishCalendar) - * @see #isHebrewFormat() + * @see setTransliteratedMonthList(String[]) + * @see formatYomTov(JewishCalendar) + * @see isHebrewFormat() */ public String[] getTransliteratedHolidayList() { return transliteratedHolidays; @@ -396,7 +395,7 @@ public String[] getTransliteratedHolidayList() { /** * Sets the array of holidays transliterated into Latin chars. This is used by the - * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. + * {@link formatYomTov(JewishCalendar)} when formatting the Yom Tov String. * * @param transliteratedHolidays * the transliteratedHolidays to set. Ensure that the sequence exactly matches the list returned by the @@ -472,7 +471,7 @@ public void setTransliteratedHolidayList(String[] transliteratedHolidays) { * * @param jewishCalendar the JewishCalendar * @return the formatted holiday or an empty String if the day is not a holiday. - * @see #isHebrewFormat() + * @see isHebrewFormat() */ public String formatYomTov(JewishCalendar jewishCalendar) { int index = jewishCalendar.getYomTovIndex(); @@ -519,12 +518,12 @@ public String formatRoshChodesh(JewishCalendar jewishCalendar) { * Returns if the formatter is set to use Hebrew formatting in the various formatting methods. * * @return the hebrewFormat - * @see #setHebrewFormat(boolean) - * @see #format(JewishDate) - * @see #formatDayOfWeek(JewishDate) - * @see #formatMonth(JewishDate) - * @see #formatOmer(JewishCalendar) - * @see #formatYomTov(JewishCalendar) + * @see setHebrewFormat(boolean) + * @see format(JewishDate) + * @see formatDayOfWeek(JewishDate) + * @see formatMonth(JewishDate) + * @see formatOmer(JewishCalendar) + * @see formatYomTov(JewishCalendar) */ public boolean isHebrewFormat() { return hebrewFormat; @@ -535,12 +534,12 @@ public boolean isHebrewFormat() { * * @param hebrewFormat * the hebrewFormat to set - * @see #isHebrewFormat() - * @see #format(JewishDate) - * @see #formatDayOfWeek(JewishDate) - * @see #formatMonth(JewishDate) - * @see #formatOmer(JewishCalendar) - * @see #formatYomTov(JewishCalendar) + * @see isHebrewFormat() + * @see format(JewishDate) + * @see formatDayOfWeek(JewishDate) + * @see formatMonth(JewishDate) + * @see formatOmer(JewishCalendar) + * @see formatYomTov(JewishCalendar) */ public void setHebrewFormat(boolean hebrewFormat) { this.hebrewFormat = hebrewFormat; @@ -549,13 +548,13 @@ public void setHebrewFormat(boolean hebrewFormat) { /** * Returns the Hebrew Omer prefix.  By default it is the letter ב producing * בעומר, but it can be set to ל to produce - * לעומר (or any other prefix) using the {@link #setHebrewOmerPrefix(String)}. + * לעומר (or any other prefix) using the {@link setHebrewOmerPrefix(String)}. * * @return the hebrewOmerPrefix * - * @see #hebrewOmerPrefix - * @see #setHebrewOmerPrefix(String) - * @see #formatOmer(JewishCalendar) + * @see hebrewOmerPrefix + * @see setHebrewOmerPrefix(String) + * @see formatOmer(JewishCalendar) */ public String getHebrewOmerPrefix() { return hebrewOmerPrefix; @@ -567,13 +566,41 @@ public String getHebrewOmerPrefix() { * לעומר (or any other prefix) * @param hebrewOmerPrefix * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל. - * @see #hebrewOmerPrefix - * @see #getHebrewOmerPrefix() - * @see #formatOmer(JewishCalendar) + * @see hebrewOmerPrefix + * @see getHebrewOmerPrefix() + * @see formatOmer(JewishCalendar) */ public void setHebrewOmerPrefix(String hebrewOmerPrefix) { this.hebrewOmerPrefix = hebrewOmerPrefix; } + + /** + * Returns the Hebrew array of months. This list has a length of 14 starting with "ניסן" and ending + * with 3 variations of Adar - "אדר", "אדר ב", "אדר + * א". + * @return the array of Hebrew months. + * @see setHebrewMonthList(String[]) + */ + public String[] getHebrewMonthList() { + return hebrewMonths; + } + + /** + * Setter method to allow overriding of the default list of Hebrew month names. This allows changing things such as the default + * month name of חשון to מרחשון, etc. This list expects a + * length of 14 starting with "ניסן" and ending with 3 variations of Adar - + * "אדר", "אדר ב", "אדר". + * + * @param hebrewMonths the array of Hebrew months beginning in "ניסן" and ending in + * "אדר","אדר ב","אדר א" + * @see getHebrewMonthList() + */ + public void setHebrewMonthList(String[] hebrewMonths) { + if(hebrewMonths.length !=14) { + throw new IllegalArgumentException("The Hebrew month array must have a length of 14."); + } + this.hebrewMonths = hebrewMonths; + } /** * Returns the array of months transliterated into Latin chars. The default list of months uses Ashkenazi @@ -583,22 +610,26 @@ public void setHebrewOmerPrefix(String hebrewOmerPrefix) { * @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[]) + * @see setTransliteratedMonthList(String[]) */ public String[] getTransliteratedMonthList() { return transliteratedMonths; } /** - * Setter method to allow overriding of the default list of months transliterated into Latin chars. The default - * uses Ashkenazi American English transliteration. + * Setter method to allow overriding of the default list of months transliterated into Latin chars. The default list uses + * Ashkenazi American English transliteration. The array of transliterated month names begins in "Nissan" and ends in the + * 3 Adar variations - "Adar", "Adar II", "Adar I". * * @param transliteratedMonths * an array of 14 month names that defaults to ["Nissan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Tishrei", * "Heshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II", "Adar I"]. - * @see #getTransliteratedMonthList() + * @see getTransliteratedMonthList() */ public void setTransliteratedMonthList(String[] transliteratedMonths) { + if(transliteratedHolidays.length !=14) { + throw new IllegalArgumentException("The transliterated month array must have a length of 14."); + } this.transliteratedMonths = transliteratedMonths; } @@ -608,9 +639,9 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { * "\u05EA\u05E9\u05E8\u05D9","\u05D7\u05E9\u05D5\u05DF","\u05DB\u05E1\u05DC\u05D5","\u05D8\u05D1\u05EA", * "\u05E9\u05D1\u05D8","\u05D0\u05D3\u05E8","\u05D0\u05D3\u05E8 \u05D1","\u05D0\u05D3\u05E8 \u05D0"] * - * @see #formatMonth(JewishDate) + * @see formatMonth(JewishDate) */ - private static final String[] hebrewMonths = { "\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", + private String[] hebrewMonths = { "\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", "\u05E1\u05D9\u05D5\u05DF", "\u05EA\u05DE\u05D5\u05D6", "\u05D0\u05D1", "\u05D0\u05DC\u05D5\u05DC", "\u05EA\u05E9\u05E8\u05D9", "\u05D7\u05E9\u05D5\u05DF", "\u05DB\u05E1\u05DC\u05D5", "\u05D8\u05D1\u05EA", "\u05E9\u05D1\u05D8", "\u05D0\u05D3\u05E8", "\u05D0\u05D3\u05E8 \u05D1", @@ -626,14 +657,14 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { "\u05E9\u05E9\u05D9", "\u05E9\u05D1\u05EA" }; /** - * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format + * Formats the day of week. If {@link isHebrewFormat() Hebrew formatting} is set, it will display in the format * ראשון etc. If Hebrew formatting is not in use it will return it in the format * of Sunday etc. There are various formatting options that will affect the output. * * @param jewishDate the JewishDate Object * @return the formatted day of week - * @see #isHebrewFormat() - * @see #isLongWeekFormat() + * @see isHebrewFormat() + * @see isLongWeekFormat() */ public String formatDayOfWeek(JewishDate jewishDate) { if (hebrewFormat) { @@ -763,10 +794,10 @@ public String format(JewishDate jewishDate) { * @param jewishDate * the JewishDate to format * @return the formatted month name - * @see #isHebrewFormat() - * @see #setHebrewFormat(boolean) - * @see #getTransliteratedMonthList() - * @see #setTransliteratedMonthList(String[]) + * @see isHebrewFormat() + * @see setHebrewFormat(boolean) + * @see getTransliteratedMonthList() + * @see setTransliteratedMonthList(String[]) */ public String formatMonth(JewishDate jewishDate) { final int month = jewishDate.getJewishMonth(); @@ -796,11 +827,11 @@ public String formatMonth(JewishDate jewishDate) { * * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default * formatting has a ב׳ prefix that would output בעומר, but this - * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output + * can be set via the {@link setHebrewOmerPrefix(String)} method to use a ל and output * ל״ג לעומר. - * @see #isHebrewFormat() - * @see #getHebrewOmerPrefix() - * @see #setHebrewOmerPrefix(String) + * @see isHebrewFormat() + * @see getHebrewOmerPrefix() + * @see setHebrewOmerPrefix(String) */ public String formatOmer(JewishCalendar jewishCalendar) { int omer = jewishCalendar.getDayOfOmer(); @@ -818,31 +849,6 @@ public String formatOmer(JewishCalendar jewishCalendar) { } } - /** - * Formats a molad. - * @todo Experimental and incomplete. - * - * @param moladChalakim the chalakim of the molad - * @return the formatted molad. FIXME: define proper format in English and Hebrew. - */ - private static String formatMolad(long moladChalakim) { - long adjustedChalakim = moladChalakim; - int MINUTE_CHALAKIM = 18; - int HOUR_CHALAKIM = 1080; - int DAY_CHALAKIM = 24 * HOUR_CHALAKIM; - - long days = adjustedChalakim / DAY_CHALAKIM; - adjustedChalakim = adjustedChalakim - (days * DAY_CHALAKIM); - int hours = (int) ((adjustedChalakim / HOUR_CHALAKIM)); - if (hours >= 6) { - days += 1; - } - adjustedChalakim = adjustedChalakim - (hours * (long) HOUR_CHALAKIM); - int minutes = (int) (adjustedChalakim / MINUTE_CHALAKIM); - adjustedChalakim = adjustedChalakim - minutes * (long) MINUTE_CHALAKIM; - return "Day: " + days % 7 + " hours: " + hours + ", minutes " + minutes + ", chalakim: " + adjustedChalakim; - } - /** * Returns the kviah in the traditional 3 letter Hebrew format where the first letter represents the day of week of * Rosh Hashana, the second letter represents the lengths of Cheshvan and Kislev ({@link JewishDate#SHELAIMIM @@ -875,7 +881,7 @@ public String getFormattedKviah(int jewishYear) { /** * Formats the Daf Yomi Bavli in the format of - * "עירובין נ״ב" in {@link #isHebrewFormat() Hebrew}, + * "עירובין נ״ב" in {@link isHebrewFormat() Hebrew}, * or the transliterated format of "Eruvin 52". * @param daf the Daf to be formatted. * @return the formatted daf. @@ -890,7 +896,7 @@ public String formatDafYomiBavli(Daf daf) { /** * Formats the Daf Yomi Yerushalmi in the format - * of "עירובין נ״ב" in {@link #isHebrewFormat() Hebrew}, or + * of "עירובין נ״ב" in {@link isHebrewFormat() Hebrew}, or * the transliterated format of "Eruvin 52". * * @param daf the Daf to be formatted. @@ -929,9 +935,9 @@ public String formatDafYomiYerushalmi(Daf daf) { * @param number * the number to be formatted. It will trow an IllegalArgumentException if the number is < 0 or > 9999. * @return the Hebrew formatted number such as תשכ״ט - * @see #isUseFinalFormLetters() - * @see #isUseGershGershayim() - * @see #isHebrewFormat() + * @see isUseFinalFormLetters() + * @see isUseGershGershayim() + * @see isHebrewFormat() * */ public String formatHebrewNumber(int number) { @@ -1029,7 +1035,7 @@ public EnumMap getTransliteratedParshiosList() { * * @param transliteratedParshaMap * the transliterated Parshios as an EnumMap to set - * @see #getTransliteratedParshiosList() + * @see getTransliteratedParshiosList() */ public void setTransliteratedParshiosList(EnumMap transliteratedParshaMap) { this.transliteratedParshaMap = transliteratedParshaMap; @@ -1039,7 +1045,7 @@ public void setTransliteratedParshiosList(EnumMap * Returns a String with the name of the current parsha(ios). This method gets the current parsha by * calling {@link JewishCalendar#getParshah()} that does not return a parsha for any non-Shabbos * or a Shabbos that occurs on a Yom Tov, and will return an empty String in those - * cases. If the class {@link #isHebrewFormat() is set to format in Hebrew} it will return a String + * cases. If the class {@link isHebrewFormat() is set to format in Hebrew} it will return a String * of the current parsha(ios) in Hebrew for example בראשית or * נצבים וילך or an empty string if there * are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin chars. The @@ -1053,8 +1059,8 @@ public void setTransliteratedParshiosList(EnumMap * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example * Bereshis or Nitzavim Vayeilech or an empty string if there are none. - * @see #formatParsha(JewishCalendar) - * @see #isHebrewFormat() + * @see formatParsha(JewishCalendar) + * @see isHebrewFormat() * @see JewishCalendar#getParshah() */ public String formatParsha(JewishCalendar jewishCalendar) { @@ -1075,7 +1081,7 @@ public String formatParsha(JewishCalendar jewishCalendar) { * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example * Bereshis or Nitzavim Vayeilech or an empty string if there are none. - * @see #formatParsha(JewishCalendar) + * @see formatParsha(JewishCalendar) * @see JewishCalendar#getUpcomingParshah() */ public String formatParsha(JewishCalendar.Parsha parsha) { From f70f128de538b85808e805b212b90bbc90e42ad4 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 27 Apr 2026 23:24:19 -0400 Subject: [PATCH 079/121] Update CHANGELOG for HebrewdateFormatter Changes --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e257dce..cc3e4bc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,9 @@ * Update Tefila method to Use [Consistent Spelling](https://github.com/KosherJava/zmanim/commit/bca6ddb85542683f229d905636a06fbfc66fbe03). * `HebrewdateFormatter` * add method [`formatParsha(JewishCalendar.Parsha parsha)`](https://github.com/KosherJava/zmanim/commit/ee3347b04bf0f4221bc8aa71af59437cd7533f72) to allow formatting of a parsha retrieved from `JewishCalendar.getUpcomingParshah()`. + * Add `getHebrewMonthList()` and `setHebrewMonthList(String[])`. This allows overriding the default month of Chesvan to Marcheshvan etc. + * Throw an `IllegalArgumentException` if the array length of months != 14 + * Remove the experimental and private `formatMolad(long moladChalakim)` * [Fix NullPointer in HebrewDateFormatter week formatting](https://github.com/KosherJava/zmanim/commit/6cef302f4ac815941c1f61765f2749d698f86042) * `TefilaRules` * [add `isMizmorLesodaRecited()`](https://github.com/KosherJava/zmanim/commit/2cde42644dc72a49b3e4228244bc79cc276e138e) From 334c6e0f14106a812dd982e6ce4ebe412d5f8fa4 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 28 Apr 2026 22:34:46 -0400 Subject: [PATCH 080/121] Remove code duplication in NOAACalculator Closes #152. Thank you @BehindTheMath --- .../zmanim/util/NOAACalculator.java | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index 7de0d6db..dfd41802 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -73,24 +73,46 @@ public String getCalculatorName() { * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(LocalDate, GeoLocation, double, boolean) */ public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { - double elevation = adjustForElevation ? geoLocation.getElevation() : 0; - double adjustedZenith = adjustZenith(zenith, elevation); - double sunrise = getSunRiseSetUTC(dt, geoLocation.getLatitude(), -geoLocation.getLongitude(), - adjustedZenith, SolarEvent.SUNRISE); - sunrise = sunrise / 60; - return sunrise > 0 ? sunrise % 24 : sunrise % 24 + 24; // ensure that the time is >= 0 and < 24 + return getUTCSunRiseSet(dt, geoLocation, zenith, adjustForElevation,SolarEvent.SUNRISE); } /** * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean) */ public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + return getUTCSunRiseSet(dt, geoLocation, zenith, adjustForElevation,SolarEvent.SUNSET); + } + + /** + * A method that calculates UTC sunrise or sunset as well as any time based on an angle above or below sunset and + * returns it as a double in 24-hour format. 5:45:00 AM will return 5.75. + * + * @param localDate + * Used to calculate day of year. + * @param geoLocation + * The location information used for astronomical calculating sun times. + * @param zenith + * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith + * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts} + * this slightly to account for solar refraction and the sun's radius. Another example would be + * {@link com.kosherjava.zmanim.AstronomicalCalendar#getEndNauticalTwilight()} that passes + * {@link com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. + * @param adjustForElevation + * Should the time be adjusted for elevation + * @param solarEvent if the calculation is for {@link SolarEvent#SUNRISE} or {@link SolarEvent#SUNSET} + * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in + * the calculation (expected behavior for some locations such as near the poles, + * {@link java.lang.Double#NaN} will be returned. + * @see #getElevationAdjustment(double) + */ + private double getUTCSunRiseSet(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation, + SolarEvent solarEvent) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - double sunset = getSunRiseSetUTC(dt, geoLocation.getLatitude(), -geoLocation.getLongitude(), - adjustedZenith, SolarEvent.SUNSET); - sunset = sunset / 60; - return sunset > 0 ? sunset % 24 : sunset % 24 + 24; // ensure that the time is >= 0 and < 24 + double riseSet = getSunRiseSetUTC(localDate, geoLocation.getLatitude(), -geoLocation.getLongitude(), + adjustedZenith, solarEvent); + riseSet = riseSet / 60; + return riseSet > 0 ? riseSet % 24 : riseSet % 24 + 24; // ensure that the time is >= 0 and < 24 } /** From 9c0fef3740b80e69ac8630bb640a2b4d85bb0052 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 28 Apr 2026 22:42:42 -0400 Subject: [PATCH 081/121] Remove old debug comment in AstronomicalCalendar --- src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index a224af45..538e0eb2 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -493,7 +493,7 @@ public long getTemporalHour() { * * @see getTemporalHour() */ - public long getTemporalHour(Instant startOfDay, Instant endOfDay) { //FIXME new code + public long getTemporalHour(Instant startOfDay, Instant endOfDay) { if (startOfDay == null || endOfDay == null) { return Long.MIN_VALUE; } From 57499d6f75d6179014b09f8e660889d774b5ecd6 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 29 Apr 2026 19:11:44 -0400 Subject: [PATCH 082/121] Add getChatzosHalayla() - This matches the getChatzos() functionality in prefering astronomical calculation when possible - Minor JavaDoc tweaks --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 64 +++++++++++++++---- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 6b43e0d0..afe96d45 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -337,7 +337,7 @@ public Instant getAlos72Minutes() { } /** - * This method returns {@link getSunTransit() Astronomical chatzos} if the + * This method returns {@link getSunTransit() Astronomical chatzos hayom} 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 @@ -362,7 +362,7 @@ public Instant getAlos72Minutes() { */ public Instant getChatzos() { if (isUseAstronomicalChatzos()) { - return getSunTransit(); // can be null of the calculator does not support astronomical chatzos + return getSunTransit(); // can be null if the calculator does not support astronomical chatzos } else { Instant halfDayChatzos = getChatzosAsHalfDay(); if (halfDayChatzos == null) { @@ -373,21 +373,63 @@ public Instant getChatzos() { } } + /** + * This method returns {@link getSolarMidnight() Astronomical chatzos halayla} if the {@link + * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link + * isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link #getChatzos(Instant, Instant) + * halfway point} between sunset and the following day's sunrise, 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 halayla as + * halfway between sunset and the following day's sunrise (identical to six shaos zmaniyos after sunset), while the + * NOAACalculator calculates it more accurately as {@link getSolarMidnight() astronomical chatzos halayla}. See The Definition of Chatzos for a detailed explanation of + * the ways to calculate Chatzos. Since half-night chatzos can be null in the Arctic on a day when + * either sunset or the following day's sunrise did not happen and astronomical chatzos halayla can be calculated even in + * the Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the + * calculator, astronomical chatzos will be returned to avoid returning a null. + * + * @see getSolarMidnight() + * @see getChatzos(Instant, Instant) + * @see isUseAstronomicalChatzos() + * @see setUseAstronomicalChatzos(boolean) + * @return the Instant of chatzos halayla. If the calculation can't be computed such as in the Arctic Circle + * where there is at least one day where the sun does not rise, and one where it does not set, and the calculator does not + * support astronomical calculations (that will never report a null) a null will be returned. + * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + */ + public Instant getChatzosHalayla() { + if (isUseAstronomicalChatzos()) { + return getSolarMidnight(); // can be null if the calculator does not support astronomical chatzos + } else { + ZmanimCalendar clonedCalendar = (ZmanimCalendar)this.clone(); + clonedCalendar.setLocalDate(getLocalDate().plusDays(1)); + Instant halfNightChatzos = getChatzos(getSeaLevelSunset(), clonedCalendar.getSeaLevelSunrise()); + if (halfNightChatzos == null) { + return getSolarMidnight(); // can be null if the calculator does not support astronomical chatzos + } else { + return halfNightChatzos; + } + } + } + /** * A method that returns chatzos (hayom or layla) calculated as halfway between the begin and end * times passed in. If sunrise and sunset (or sunset and the following sunrise for chatzos halayla) are passed in, * the zman returned will be close to, but not exactly, when the Sun is transiting the celestial meridian due to changes in declination (the - * lengthening or shortening day). A practical example of using this would be calculating chatzos halayla for the for - * the end of zman achilas afikoman on Pesach night, where Rav Shlomo Zalman Auerbach in the Halichos Shlomo, Moadim Nisan - * - Av, ch. 9, no. 44, pages 289-292, questioned the common practice of considering chatzos halayla as astronomical - * chatzos, and felt that for this it should be chatzi halayla, halfway between sunset and alos or - * bedieved from an early tzais that is lower (degree-wise) than alos the next morning, thus making - * this zman significantly earlier. See The - * Definition of Chatzos for a detailed explanation of the ways to calculate Chatzos. This method is a - * convenience method that calls the parent class's {@link getSunTransit(Instant, Instant)}. + * lengthening or shortening day). See The Definition of + * Chatzos for a detailed explanation of the ways to calculate Chatzos. This method is a convenience + * method that calls the parent class's {@link getSunTransit(Instant, Instant)}. A practical example of using this would be + * calculating chatzos halayla for the for the end of zman achilas afikoman on Pesach night, where + * Rav Shlomo Zalman Auerbach in the Halichos Shlomo, + * Moadim Nisan - Av, ch. 9, no. 44, pages 289-292, questioned the common practice of considering chatzos halayla as + * astronomical chatzos halayla, and felt that for this it should be at chatzi halayla, halfway between sunset + * and alos or bedieved from an early tzais that is lower (degree-wise) than alos the next + * morning, thus making this zman significantly earlier. Rav + * Moshe Sternbuch in Teshuvos Vehanhagos v. VII, ch 1, p. + * 3, agreed to this calculation for chatzos halayla on Pesach night. * * @param begin * the beginning of day or night for calculating chatzos. For chatzos hayom, this can be From 49a59d335a002292665de81e9e1a491b12b6ca27 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 29 Apr 2026 19:42:38 -0400 Subject: [PATCH 083/121] Rename getChatzos() -> getChatzosHayom() and getChatzosAsHalfDay() -> getChatzosHayomAsHalfDay() --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 71 ++++++++++--------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index afe96d45..809184c9 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -116,21 +116,22 @@ public void setUseElevation(boolean useElevation) { /** * Is astronomical chatzos used for zmanim calculations. The default value of true will * keep the standard astronomical chatzos calculation, while setting it to false will use half of - * a solar day calculation for chatzos. + * a solar day / night calculation for chatzos. * @see isUseAstronomicalChatzos() * @see setUseAstronomicalChatzos(boolean) - * @see getChatzos() + * @see getChatzosHayom() + * @see getChatzosHalayla() * @see getSunTransit() - * @see getChatzosAsHalfDay() + * @see getChatzosHayomAsHalfDay() * @see useAstronomicalChatzosForOtherZmanim */ private boolean useAstronomicalChatzos = true; /** - * Is {@link getSunTransit() astronomical chatzos} used for {@link getChatzos()} for enhanced accuracy. For - * 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. - * + * Is {@link getSunTransit() astronomical chatzos} used for {@link getChatzosHayom()} and {@link getChatzosHalayla()} + * for enhanced accuracy. For 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 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 @@ -143,9 +144,10 @@ public void setUseElevation(boolean useElevation) { * @return if the use of astronomical chatzos is active. * @see useAstronomicalChatzos * @see setUseAstronomicalChatzos(boolean) - * @see getChatzos() + * @see getChatzosHayom() + * @see getChatzosHalayla() * @see getSunTransit() - * @see getChatzosAsHalfDay() + * @see getChatzosHayomAsHalfDay() * @see isUseAstronomicalChatzosForOtherZmanim() */ public boolean isUseAstronomicalChatzos() { @@ -157,9 +159,10 @@ public boolean isUseAstronomicalChatzos() { * @param useAstronomicalChatzos set to true to use astronomical in chatzos in zmanim calculations. * @see useAstronomicalChatzos * @see isUseAstronomicalChatzos() - * @see getChatzos() + * @see getChatzosHayom() + * @see getChatzosHalayla() * @see getSunTransit() - * @see getChatzosAsHalfDay() + * @see getChatzosHayomAsHalfDay() * @see setUseAstronomicalChatzosForOtherZmanim(boolean) */ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { @@ -174,7 +177,8 @@ public void setUseAstronomicalChatzos(boolean useAstronomicalChatzos) { * @see setUseAstronomicalChatzosForOtherZmanim(boolean) * @see isUseAstronomicalChatzos() * @see setUseAstronomicalChatzos(boolean) - * @see getChatzos() + * @see getChatzosHayom() + * @see getChatzosHalayla() */ private boolean useAstronomicalChatzosForOtherZmanim = false; @@ -339,7 +343,7 @@ public Instant getAlos72Minutes() { /** * This method returns {@link getSunTransit() Astronomical chatzos hayom} 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() + * {@link isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() * 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 @@ -352,7 +356,7 @@ public Instant getAlos72Minutes() { * calculator, astronomical chatzos will be returned to avoid returning a null. * * @see getSunTransit() - * @see getChatzosAsHalfDay() + * @see getChatzosHayomAsHalfDay() * @see isUseAstronomicalChatzos() * @see setUseAstronomicalChatzos(boolean) * @return the Instant of chatzos. If the calculation can't be computed such as in the Arctic Circle @@ -360,11 +364,11 @@ public Instant getAlos72Minutes() { * support astronomical calculations (that will never report a null) a null will be returned. * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ - public Instant getChatzos() { + public Instant getChatzosHayom() { if (isUseAstronomicalChatzos()) { return getSunTransit(); // can be null if the calculator does not support astronomical chatzos } else { - Instant halfDayChatzos = getChatzosAsHalfDay(); + Instant halfDayChatzos = getChatzosHayomAsHalfDay(); if (halfDayChatzos == null) { return getSunTransit(); // can be null if the calculator does not support astronomical chatzos } else { @@ -445,8 +449,9 @@ public Instant getChatzosHalayla() { * Arctic Circle where there is at least one day a year where the sun does not rise, and one where it does * not set, null will be returned. See detailed explanation on top of the page. * @see getSunTransit(Instant, Instant) - * @see getChatzosAsHalfDay() - * @see getChatzos() + * @see getChatzosHayomAsHalfDay() + * @see getChatzosHayom() + * @see getChatzosHalayla() */ public Instant getChatzos(Instant begin, Instant end) { return getSunTransit(begin, end); @@ -472,7 +477,8 @@ public Instant getChatzos(Instant begin, Instant end) { * @see com.kosherjava.zmanim.util.SunTimesCalculator#getUTCNoon(LocalDate, GeoLocation) * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see getSunTransit(Instant, Instant) - * @see getChatzos() + * @see getChatzosHayom() + * @see getChatzosHalayla() * @see getChatzos(Instant, Instant) * @see getSunTransit() * @see isUseAstronomicalChatzos() @@ -482,7 +488,7 @@ public Instant getChatzos(Instant begin, Instant end) { * it does not set, a null will be returned. See detailed explanation on top of the * {@link AstronomicalCalendar} documentation. */ - public Instant getChatzosAsHalfDay() { + public Instant getChatzosHayomAsHalfDay() { return getChatzos(getSeaLevelSunrise(), getSeaLevelSunset()); } @@ -519,7 +525,7 @@ public Instant getChatzosAsHalfDay() { */ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(startOfDay, getChatzos(), 3); + return getHalfDayBasedZman(startOfDay, getChatzosHayom(), 3); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 3); } @@ -663,7 +669,7 @@ public Instant getCandleLighting() { */ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(startOfDay, getChatzos(), 4); + return getHalfDayBasedZman(startOfDay, getChatzosHayom(), 4); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 4); } @@ -720,7 +726,7 @@ public Instant getSofZmanBiurChametz(Instant startOfDay, Instant endOfDay, boole JewishCalendar jewishCalendar = new JewishCalendar(getLocalDate()); if (jewishCalendar.getJewishMonth() == JewishCalendar.NISSAN && jewishCalendar.getJewishDayOfMonth() == 14) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(startOfDay, getChatzos(), 5); + return getHalfDayBasedZman(startOfDay, getChatzosHayom(), 5); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 5); } @@ -843,7 +849,7 @@ public Instant getSofZmanTfilaMGA72Minutes() { * 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 + * isUseAstronomicalChatzos() configured} or {@link getChatzosHayomAsHalfDay() 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 Geonim @@ -866,14 +872,15 @@ public Instant getSofZmanTfilaMGA72Minutes() { * 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 {@link AstronomicalCalendar} documentation. * @see getSunTransit() - * @see getChatzosAsHalfDay() - * @see getChatzos() + * @see getChatzosHayomAsHalfDay() + * @see getChatzosHayom() + * @see getChatzosHalayla() * @see isUseAstronomicalChatzos() * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(getChatzos(), endOfDay, 0.5); + return getHalfDayBasedZman(getChatzosHayom(), endOfDay, 0.5); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 6.5); } @@ -912,7 +919,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} * setting). * @todo Consider adjusting this to calculate the time as half an hour zmaniyos after either {@link - * getSunTransit() astronomical chatzos} or {@link getChatzosAsHalfDay() chatzos as half a day} + * getSunTransit() astronomical chatzos} or {@link getChatzosHayomAsHalfDay() chatzos as half a day} * for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. * * @see getMinchaGedola(Instant, Instant) @@ -962,7 +969,7 @@ public Instant getMinchaGedolaGRA() { */ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(getChatzos(), endOfDay, 3); + return getHalfDayBasedZman(getChatzosHayom(), endOfDay, 3); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 9); } @@ -1023,7 +1030,7 @@ public Instant getSamuchLeMinchaKetana(Instant startOfDay, Instant endOfDay) { */ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(getChatzos(), endOfDay, 3.5); + return getHalfDayBasedZman(getChatzosHayom(), endOfDay, 3.5); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 9.5); } @@ -1107,7 +1114,7 @@ public Instant getMinchaKetanaGRA() { */ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay, boolean synchronous) { if (isUseAstronomicalChatzosForOtherZmanim() && synchronous) { - return getHalfDayBasedZman(getChatzos(), endOfDay, 4.75); + return getHalfDayBasedZman(getChatzosHayom(), endOfDay, 4.75); } else { return getShaahZmanisBasedZman(startOfDay, endOfDay, 10.75); } @@ -1466,7 +1473,7 @@ public double getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset) * 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 ComprehensiveZmanimCalendar#getFixedLocalChatzos() + * @see ComprehensiveZmanimCalendar#getFixedLocalChatzosHayom() */ public Instant getHalfDayBasedZman(Instant startOfHalfDay, Instant endOfHalfDay, double hours) { if (startOfHalfDay == null || endOfHalfDay == null) { From 22ad9051a54b1080230e708b92dbc4b6584eebee Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 29 Apr 2026 19:44:04 -0400 Subject: [PATCH 084/121] Rename getChatzos() -> getChatzosHayom() and getChatzosAsHalfDay() -> getChatzosHayomAsHalfDay() --- .../zmanim/ComprehensiveZmanimCalendar.java | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 7e24a260..e4650d95 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -1271,7 +1271,7 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated - * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link getChatzos()}. + * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link getChatzosHayom()}. * Generally known as part of the "Komarno" zmanim after Rav Yitzchak Eizik of * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the @@ -1290,12 +1290,12 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() { * 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 * {@link AstronomicalCalendar} documentation. - * @see getChatzos() + * @see getChatzosHayom() * @see getSofZmanTfila2HoursBeforeChatzos() * @see isUseAstronomicalChatzos() */ public Instant getSofZmanShma3HoursBeforeChatzos() { - return getTimeOffset(getChatzos(), -180 * MINUTE_MILLIS); + return getTimeOffset(getChatzosHayom(), -180 * MINUTE_MILLIS); } /** @@ -1558,24 +1558,24 @@ public Instant getSofZmanTfilaMGA120Minutes() { /** * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours - * before {@link getChatzos()}. This is based on the opinions that calculate + * before {@link getChatzosHayom()}. This is based on the opinions that calculate * sof zman krias shema as {@link getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours - * before {@link getChatzos()}. + * before {@link getChatzosHayom()}. * * @return the Instant of the latest zman krias shema. 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 * {@link AstronomicalCalendar} documentation. - * @see getChatzos() + * @see getChatzosHayom() * @see getSofZmanShma3HoursBeforeChatzos() */ public Instant getSofZmanTfila2HoursBeforeChatzos() { - return getTimeOffset(getChatzos(), -120 * MINUTE_MILLIS); + return getTimeOffset(getChatzosHayom(), -120 * MINUTE_MILLIS); } /** - * This method returns mincha gedola calculated as 30 minutes after {@link getChatzos() chatzos} - * and not 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} after {@link getChatzos() chatzos} as + * This method returns mincha gedola calculated as 30 minutes after {@link getChatzosHayom() chatzos} + * and not 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} after {@link getChatzosHayom() chatzos} as * calculated by {@link getMinchaGedola}. Some use this time to delay the start of mincha in the winter when * 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See * {@link getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One @@ -1592,12 +1592,12 @@ public Instant getSofZmanTfila2HoursBeforeChatzos() { * {@link AstronomicalCalendar} documentation. * @see getMinchaGedolaGRA() * @see getMinchaGedolaGreaterThan30(Instant) - * @see getChatzos() + * @see getChatzosHayom() * @see isUseAstronomicalChatzos() * @see isUseAstronomicalChatzosForOtherZmanim() */ public Instant getMinchaGedola30Minutes() { - return getTimeOffset(getChatzos(), MINUTE_MILLIS * 30); + return getTimeOffset(getChatzosHayom(), MINUTE_MILLIS * 30); } /** @@ -1607,14 +1607,14 @@ public Instant getMinchaGedola30Minutes() { * calculated as 6.5 {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 * * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos}. If {@link * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzos()} - * and {@link getTzais72Minutes()} after {@link getChatzos()}. + * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between + * {@link getChatzosHayom()} and {@link getTzais72Minutes()} after {@link getChatzosHayom()}. * * @see getAlos72Minutes() * @see getMinchaGedolaGRA() * @see getMinchaKetanaGRA() * @see getMinchaGedolaGRA() - * @see getChatzos() + * @see getChatzosHayom() * @see isUseAstronomicalChatzosForOtherZmanim() * @return the Instant of the time of mincha gedola. 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 @@ -1623,7 +1623,7 @@ public Instant getMinchaGedola30Minutes() { */ public Instant getMinchaGedola72Minutes() { if (isUseAstronomicalChatzosForOtherZmanim()) { - return getHalfDayBasedZman(getChatzos(), getTzais72Minutes(), 0.5); + return getHalfDayBasedZman(getChatzosHayom(), getTzais72Minutes(), 0.5); } else { return getMinchaGedola(getAlos72Minutes(), getTzais72Minutes(), true); } @@ -1636,8 +1636,8 @@ public Instant getMinchaGedola72Minutes() { * {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 * * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() alos}. If {@link * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5 - * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzos()} - * and {@link getAlos16Point1Degrees()} after {@link getChatzos()}. + * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzosHayom()} + * and {@link getAlos16Point1Degrees()} after {@link getChatzosHayom()}. * @see getShaahZmanis16Point1Degrees() * @see getMinchaGedolaGRA() * @see getMinchaKetanaGRA() @@ -1648,7 +1648,7 @@ public Instant getMinchaGedola72Minutes() { */ public Instant getMinchaGedola16Point1Degrees() { if (isUseAstronomicalChatzosForOtherZmanim()) { - return getHalfDayBasedZman(getChatzos(), getTzais16Point1Degrees(), 0.5); + return getHalfDayBasedZman(getChatzosHayom(), getTzais16Point1Degrees(), 0.5); } else { return getMinchaGedola(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true); } @@ -1678,11 +1678,11 @@ public Instant getMinchaGedola16Point1Degrees() { * @see getMinchaGedolaGreaterThan30(Instant) */ public Instant getMinchaGedolaAhavatShalom() { - if (getChatzos() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) { + if (getChatzosHayom() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) { return null; } else { - return getMinchaGedola30Minutes().compareTo(getTimeOffset(getChatzos(), getShaahZmanisAlos16Point1ToTzais3Point7() / 2)) > 0 ? - getMinchaGedola30Minutes() : getTimeOffset(getChatzos(), getShaahZmanisAlos16Point1ToTzais3Point7() / 2); + return getMinchaGedola30Minutes().compareTo(getTimeOffset(getChatzosHayom(), getShaahZmanisAlos16Point1ToTzais3Point7() / 2)) > 0 ? + getMinchaGedola30Minutes() : getTimeOffset(getChatzosHayom(), getShaahZmanisAlos16Point1ToTzais3Point7() / 2); } } @@ -2980,7 +2980,7 @@ public Instant getTzais96Minutes() { } /** - * A method that returns the local time for fixed chatzos. This time is noon and midnight adjusted from + * A method that returns the local time for fixed chatzos. This time is noon and adjusted from * standard time to account for the local latitude. The 360° of the globe divided by 24 calculates to 15° * per hour with 4 minutes per degree, so at a longitude of 0 , 15, 30 etc... Chatzos is at exactly 12:00 * noon. This is the time of chatzos according to the netz amiti ("real" sunrise)}. * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos minutes after either {@link - * getSunTransit() astronomical chatzos} or {@link getChatzosAsHalfDay() chatzos as half a day} - * for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. + * getSunTransit() astronomical chatzos} or {@link getChatzosHayomAsHalfDay() chatzos as half a + * day} for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. * @see getMinchaGedola(Instant, Instant) * @see getShaahZmanisBaalHatanya() * @see getMinchaKetanaBaalHatanya() @@ -3692,7 +3692,7 @@ public Instant getTzaisBaalHatanya() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link getAlos18Degrees() 18°} and ends at {@link getFixedLocalChatzos() fixed local + * at alos defined as {@link getAlos18Degrees() 18°} and ends at {@link getFixedLocalChatzosHayom() fixed local * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -3700,11 +3700,11 @@ public Instant getTzaisBaalHatanya() { * 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. * @see getAlos18Degrees() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzosHayom(), 3); } /** @@ -3712,7 +3712,7 @@ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the day is calculated * from dawn to nightfall, but calculated using the first half of the day only. The half a day starts at alos defined - * as {@link getAlos16Point1Degrees() 16.1°} and ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof Zman + * as {@link getAlos16Point1Degrees() 16.1°} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof Zman * Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -3720,11 +3720,11 @@ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() { * 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. * @see getAlos16Point1Degrees() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzosHayom(), 3); } /** @@ -3732,7 +3732,7 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link getAlos90Minutes() 90 minutes before sunrise} and ends at {@link getFixedLocalChatzos() + * at alos defined as {@link getAlos90Minutes() 90 minutes before sunrise} and ends at {@link getFixedLocalChatzosHayom() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3741,11 +3741,11 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() { * 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. * @see getAlos90Minutes() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzosHayom(), 3); } /** @@ -3753,7 +3753,7 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) that the * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts - * at alos defined as {@link getAlos72Minutes() 72 minutes before sunrise} and ends at {@link getFixedLocalChatzos() + * at alos defined as {@link getAlos72Minutes() 72 minutes before sunrise} and ends at {@link getFixedLocalChatzosHayom() * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or * half of this half-day. * @@ -3762,11 +3762,11 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() { * 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. * @see getAlos72Minutes() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { - return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzosHayom(), 3); } /** @@ -3774,7 +3774,7 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion * of the GRA that the day is calculated from sunrise to sunset, but * calculated using the first half of the day only. The half a day starts at {@link getSunriseWithElevation() sunrise} and - * ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar + * ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar * hours) after sunrise or half of this half-day. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -3782,11 +3782,11 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * 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. * @see getSunriseWithElevation() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 3); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3); } /** @@ -3794,7 +3794,7 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers)) * according to the opinion of the GRA that the day is * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at - * {@link getSunriseWithElevation() sunrise} and ends at {@link getFixedLocalChatzos() fixed local chatzos}. Sof zman + * {@link getSunriseWithElevation() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman * tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * * @return the Instant of the latest zman krias shema. If the calculation can't be computed such @@ -3802,17 +3802,17 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * 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. * @see getSunriseWithElevation() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzos(), 4); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4); } /** * This method returns Rav Moshe Feinstein's opinion of * the calculation of mincha gedola, the earliest time one can pray mincha according to theGRA calculated as 30 minutes after {@link getFixedLocalChatzos() fixed + * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA calculated as 30 minutes after {@link getFixedLocalChatzosHayom() fixed * local chatzos}. * * @return the Instant of the time of mincha gedola. If the calculation can't be computed such as @@ -3821,11 +3821,11 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { * {@link AstronomicalCalendar} documentation. * * @see getMinchaGedolaGRA() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getMinchaKetanaGRAFixedLocalChatzosToSunset */ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { - return getTimeOffset(getFixedLocalChatzos(), MINUTE_MILLIS * 30); + return getTimeOffset(getFixedLocalChatzosHayom(), MINUTE_MILLIS * 30); } /** @@ -3833,7 +3833,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to * the opinion of the Rambam and others) calculated according * to the GRA that is 3.5 shaos zmaniyos (solar - * hours) after {@link getFixedLocalChatzos() fixed local chatzos}. + * hours) after {@link getFixedLocalChatzosHayom() fixed local chatzos}. * * @return the Instant of the time of mincha gedola. 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 @@ -3841,19 +3841,19 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * {@link AstronomicalCalendar} documentation. * * @see getMinchaGedolaGRA() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 3.5); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5); } /** * This method returns Rav Moshe Feinstein's opinion * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the * GRA that the day ends at sunset and is 4.75 shaos - * zmaniyos (solar hours) after {@link getFixedLocalChatzos() fixed local chatzos}. + * zmaniyos (solar hours) after {@link getFixedLocalChatzosHayom() fixed local chatzos}. * * @return the Instant of the time of mincha gedola. 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 @@ -3861,13 +3861,13 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * {@link AstronomicalCalendar} documentation. * * @see getPlagHaminchaGRA() - * @see getFixedLocalChatzos() + * @see getFixedLocalChatzosHayom() * @see getMinchaKetanaGRAFixedLocalChatzosToSunset * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzos(), getSunsetBasedOnElevationSetting(), 4.75); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75); } /** From 9a37dc5adb77ae5d23424c17f6442b8a07c7acfc Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 29 Apr 2026 19:48:30 -0400 Subject: [PATCH 085/121] Update tests for chatzos hayom name change --- .../hebrewcalendar/RegressionTestFileWriter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index a889dccd..c98a7535 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -95,7 +95,7 @@ public static void main(String[] args) throws IOException { zcal.getPlagHaminchaAteretTorah(), zcal.getTzais72Zmanis(), zcal.getTzais90Zmanis(), zcal.getTzais96Zmanis(), zcal.getTzais90Minutes(), zcal.getTzais120Minutes(), zcal.getTzais120Zmanis(), zcal.getTzais16Point1Degrees(), zcal.getTzais26Degrees(), zcal.getTzais18Degrees(), - zcal.getTzais19Point8Degrees(), zcal.getTzais96Minutes(), zcal.getFixedLocalChatzos(), + zcal.getTzais19Point8Degrees(), zcal.getTzais96Minutes(), zcal.getFixedLocalChatzosHayom(), zcal.getSofZmanKidushLevanaBetweenMoldos(), zcal.getSofZmanKidushLevana15Days(), zcal.getTchilasZmanKidushLevana3Days(), zcal.getZmanMolad(), zcal.getTchilasZmanKidushLevana7Days(), zcal.getSofZmanAchilasChametzGRA(), zcal.getSofZmanAchilasChametzMGA72Minutes(), @@ -157,7 +157,7 @@ public static void main(String[] args) throws IOException { } static class FullZmanim { - public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point66Degrees,getTzaisGeonim4Point42Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzos,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; + public static final String fields = "getShaahZmanis19Point8Degrees,getShaahZmanis18Degrees,getShaahZmanis26Degrees,getShaahZmanis16Point1Degrees,getShaahZmanis60Minutes,getShaahZmanis72Minutes,getShaahZmanis72MinutesZmanis,getShaahZmanis90Minutes,getShaahZmanis90MinutesZmanis,getShaahZmanis96MinutesZmanis,getShaahZmanisAteretTorah,getShaahZmanisAlos16Point1ToTzais3Point8,getShaahZmanisAlos16Point1ToTzais3Point7,getShaahZmanis96Minutes,getShaahZmanis120Minutes,getShaahZmanis120MinutesZmanis,getPlagHamincha120MinutesZmanis,getPlagHamincha120Minutes,getAlos60,getAlos72Zmanis,getAlos96,getAlos90Zmanis,getAlos96Zmanis,getAlos90,getAlos120,getAlos120Zmanis,getAlos26Degrees,getAlos18Degrees,getAlos19Degrees,getAlos19Point8Degrees,getAlos16Point1Degrees,getMisheyakir11Point5Degrees,getMisheyakir11Degrees,getMisheyakir10Point2Degrees,getMisheyakir7Point65Degrees,getMisheyakir9Point5Degrees,getSofZmanShmaMGA19Point8Degrees,getSofZmanShmaMGA16Point1Degrees,getSofZmanShmaMGA18Degrees,getSofZmanShmaMGA72Minutes,getSofZmanShmaMGA72MinutesZmanis,getSofZmanShmaMGA90Minutes,getSofZmanShmaMGA90MinutesZmanis,getSofZmanShmaMGA96Minutes,getSofZmanShmaMGA96MinutesZmanis,getSofZmanShma3HoursBeforeChatzos,getSofZmanShmaMGA120Minutes,getSofZmanShmaAlos16Point1ToSunset,getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees,getSofZmanTfilaMGA19Point8Degrees,getSofZmanTfilaMGA16Point1Degrees,getSofZmanTfilaMGA18Degrees,getSofZmanTfilaMGA72Minutes,getSofZmanTfilaMGA72MinutesZmanis,getSofZmanTfilaMGA90Minutes,getSofZmanTfilaMGA90MinutesZmanis,getSofZmanTfilaMGA96Minutes,getSofZmanTfilaMGA96MinutesZmanis,getSofZmanTfilaMGA120Minutes,getSofZmanTfila2HoursBeforeChatzos,getMinchaGedola30Minutes,getMinchaGedola72Minutes,getMinchaGedola16Point1Degrees,getMinchaGedolaAhavatShalom,getMinchaGedolaGreaterThan30,getMinchaKetana16Point1Degrees,getMinchaKetanaAhavatShalom,getMinchaKetana72Minutes,getPlagHamincha60Minutes,getPlagHamincha72Minutes,getPlagHamincha90Minutes,getPlagHamincha96Minutes,getPlagHamincha96MinutesZmanis,getPlagHamincha90MinutesZmanis,getPlagHamincha72MinutesZmanis,getPlagHamincha16Point1Degrees,getPlagHamincha19Point8Degrees,getPlagHamincha26Degrees,getPlagHamincha18Degrees,getPlagAlosToSunset,getPlagAlos16Point1ToTzaisGeonim7Point083Degrees,getPlagAhavatShalom,getBainHashmashosRT58Point5Minutes,getBainHashmashosRT13Point5MinutesBefore7Point083Degrees,getBainHashmashosRT2Stars,getBainHashmashosYereim18Minutes,getBainHashmashosYereim3Point05Degrees,getBainHashmashosYereim16Point875Minutes,getBainHashmashosYereim2Point8Degrees,getBainHashmashosYereim13Point5Minutes,getBainHashmashosYereim2Point1Degrees,getTzaisGeonim3Point7Degrees,getTzaisGeonim3Point8Degrees,getTzaisGeonim5Point95Degrees,getTzaisGeonim4Point66Degrees,getTzaisGeonim4Point42Degrees,getTzaisGeonim4Point8Degrees,getTzaisGeonim6Point45Degrees,getTzaisGeonim7Point083Degrees,getTzaisGeonim7Point67Degrees,getTzaisGeonim8Point5Degrees,getTzaisGeonim9Point3Degrees,getTzaisGeonim9Point75Degrees,getTzais60,getTzaisAteretTorah,getSofZmanShmaAteretTorah,getSofZmanTfilahAteretTorah,getMinchaGedolaAteretTorah,getMinchaKetanaAteretTorah,getPlagHaminchaAteretTorah,getTzais72Zmanis,getTzais90Zmanis,getTzais96Zmanis,getTzais90,getTzais120,getTzais120Zmanis,getTzais16Point1Degrees,getTzais26Degrees,getTzais18Degrees,getTzais19Point8Degrees,getTzais96,getFixedLocalChatzosHayom,getSofZmanKidushLevanaBetweenMoldos,getSofZmanKidushLevana15Days,getTchilasZmanKidushLevana3Days,getZmanMolad,getTchilasZmanKidushLevana7Days,getSofZmanAchilasChametzGRA,getSofZmanAchilasChametzMGA72Minutes,getSofZmanAchilasChametzMGA16Point1Degrees,getSofZmanBiurChametzGRA,getSofZmanBiurChametzMGA72Minutes,getSofZmanBiurChametzMGA16Point1Degrees,getSolarMidnight,getShaahZmanisBaalHatanya,getAlosBaalHatanya,getSofZmanShmaBaalHatanya,getSofZmanTfilaBaalHatanya,getSofZmanAchilasChametzBaalHatanya,getSofZmanBiurChametzBaalHatanya,getMinchaGedolaBaalHatanya,getMinchaKetanaBaalHatanya,getPlagHaminchaBaalHatanya,getTzaisBaalHatanya,getSofZmanShmaMGA18DegreesToFixedLocalChatzos,getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos,getSofZmanShmaMGA90MinutesToFixedLocalChatzos,getSofZmanShmaMGA72MinutesToFixedLocalChatzos,getSofZmanShmaGRASunriseToFixedLocalChatzos,getSofZmanTfilaGRASunriseToFixedLocalChatzos,getMinchaGedolaGRAFixedLocalChatzos30Minutes,getMinchaKetanaGRAFixedLocalChatzosToSunset,getPlagHaminchaGRAFixedLocalChatzosToSunset,getTzais50,getSamuchLeMinchaKetanaGRA,getSamuchLeMinchaKetana16Point1Degrees,getSamuchLeMinchaKetana72Minutes"; @Override public String toString() { @@ -284,7 +284,7 @@ public String toString() { .add(getTzais18Degrees.toString()) .add(getTzais19Point8Degrees.toString()) .add(getTzais96.toString()) - .add(getFixedLocalChatzos.toString()) + .add(getFixedLocalChatzosHayom.toString()) .add(getSofZmanKidushLevanaBetweenMoldos.toString()) .add(getSofZmanKidushLevana15Days.toString()) .add(getTchilasZmanKidushLevana3Days.toString()) @@ -371,7 +371,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre Instant getMinchaGedolaAteretTorah, Instant getMinchaKetanaAteretTorah, Instant getPlagHaminchaAteretTorah, Instant getTzais72Zmanis, Instant getTzais90Zmanis, Instant getTzais96Zmanis, Instant getTzais90, Instant getTzais120, Instant getTzais120Zmanis, Instant getTzais16Point1Degrees, Instant getTzais26Degrees, Instant getTzais18Degrees, - Instant getTzais19Point8Degrees, Instant getTzais96, Instant getFixedLocalChatzos, + Instant getTzais19Point8Degrees, Instant getTzais96, Instant getFixedLocalChatzosHayom, Instant getSofZmanKidushLevanaBetweenMoldos, Instant getSofZmanKidushLevana15Days, Instant getTchilasZmanKidushLevana3Days, Instant getZmanMolad, Instant getTchilasZmanKidushLevana7Days, Instant getSofZmanAchilasChametzGRA, @@ -511,7 +511,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre this.getTzais18Degrees = getTzais18Degrees; this.getTzais19Point8Degrees = getTzais19Point8Degrees; this.getTzais96 = getTzais96; - this.getFixedLocalChatzos = getFixedLocalChatzos; + this.getFixedLocalChatzosHayom = getFixedLocalChatzosHayom; this.getSofZmanKidushLevanaBetweenMoldos = getSofZmanKidushLevanaBetweenMoldos; this.getSofZmanKidushLevana15Days = getSofZmanKidushLevana15Days; this.getTchilasZmanKidushLevana3Days = getTchilasZmanKidushLevana3Days; @@ -671,7 +671,7 @@ public FullZmanim(long getShaahZmanis19Point8Degrees, long getShaahZmanis18Degre public final Instant getTzais18Degrees; public final Instant getTzais19Point8Degrees; public final Instant getTzais96; - public final Instant getFixedLocalChatzos; + public final Instant getFixedLocalChatzosHayom; public final Instant getSofZmanKidushLevanaBetweenMoldos; public final Instant getSofZmanKidushLevana15Days; public final Instant getTchilasZmanKidushLevana3Days; From 1a8c959c4e6931361a81b47643c81682482a0646 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 29 Apr 2026 19:58:31 -0400 Subject: [PATCH 086/121] Chatzos changes - Add getChatzosHalayla() - Rename getChatzos() -> getChatzosHayom() - Rename getChatzosAsHalfDay() -> getChatzosHayomAsHalfDay() - NOAACalculator code deupling --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc3e4bc1..8fcf1729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ * `getTzais90()` -> `getTzais90Minutes()` * `getTzais96()` -> `getTzais96Minutes()` * `getTzais120()` -> `getTzais120Minutes()` + * `getChatzos()` -> `getChatzosHayom()` + * `getChatzosAsHalfDay()` -> `getChatzosHayomAsHalfDay()` * Rename some classes the confusingly named `ComplexZmanimCalendar` to `ComrehensiveZmanimCalendar`. * Move "legacy" classes to `java.time` equivelants * All zmanim now return `Instant`s insead of `Date` objects. @@ -73,6 +75,7 @@ * `getTzaisGeonim4Point61Degrees()` -> `getTzaisGeonim4Point66Degrees()` * Remove `getTzaisGeonim5Point88Degrees()` since it is a drop too early * `ZmanimCalendar` [Astronomical Chatzos based changes](https://github.com/KosherJava/zmanim/commit/c523424b327f173d70f024bdf207ccae0413d487): + * Add `getChatzosHalayla()` * Add setting `useAstronomicalChatzos` (defaulted to true) to keep the mistaken compat break introduced in the v2.5.0 release. * Add setting `useAstronomicalChatzosForOtherZmanim` (defaulted to false). * Add `getChatzosAsHalfDay()` to retain the old behavior of chatzos being halfway between sunrise and sunset. @@ -80,6 +83,7 @@ * Add `getHalfDayBasedZman(Date startOfHalfDay, Date endOfHalfDay, double hours)` to allow other zmanim to be impacted by chatzos. * Use `useAstronomicalChatzosForOtherZmanim`. * `ZmanimCalendar` - add utility method `[getPercentOfShaahZmanisFromDegrees(double degrees, boolean sunset)`](https://github.com/KosherJava/zmanim/commit/60d1f09322835835035afa507ac2dc852f1cb033) to simplify zmaniyos time calculations. This allows calculations of various percentage of the day zmanim calculations. +* Remove code duplication in `NOAACalculator.getUTCSunrise()` and `.getUTCSunset()` * Use Astronomical Chatzos Halayla (as opposed as halfway between sunset and sunrise or 12 hours after chatzos hayom) * `AstronomicalCalculator` - [add `getSunLowerTransit()`](https://github.com/KosherJava/zmanim/commit/a76a3b65aeb45912bfdb02ce354f74bb97a9d9b2) * `AstronomicalCalculator` - [add abstract method `getUTCMidnight()`](https://github.com/KosherJava/zmanim/commit/f1904b12393c48b069d1333a7397fce66804958d) From ed80769a05582aa98674a7c3b548639a17c5e933 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 09:34:37 -0400 Subject: [PATCH 087/121] Delete obsolete lib directory --- lib/readme.md | 1 - lib/zmanim-1.4.0alpha.jar | Bin 65435 -> 0 bytes lib/zmanimAstronomical-1.4.0alpha.jar | Bin 32437 -> 0 bytes 3 files changed, 1 deletion(-) delete mode 100644 lib/readme.md delete mode 100644 lib/zmanim-1.4.0alpha.jar delete mode 100644 lib/zmanimAstronomical-1.4.0alpha.jar diff --git a/lib/readme.md b/lib/readme.md deleted file mode 100644 index c36754cd..00000000 --- a/lib/readme.md +++ /dev/null @@ -1 +0,0 @@ -The latest Jar files can be downloaded from [Maven Central's KosherJava zmanim project](https://search.maven.org/artifact/com.kosherjava/zmanim). Click on the latest version and direct download of the Jar is available on the top right corner. The Jars available here are old legacy versions that need to be updated. diff --git a/lib/zmanim-1.4.0alpha.jar b/lib/zmanim-1.4.0alpha.jar deleted file mode 100644 index 09af979a6b3b0ae8fe2d7a85c16be597a51892a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65435 zcma&N1FUXAuqAxVdu-dbZQHhO8{e^Q^B&u_ZQJJ_>;Ct>nR%I+{4bfxPIhJY>Q1M2 zQk`18N>K(B3BZe=}$xFd#WGRUtYld2xoHNgyD_{|SWx%KZlg*My1R z{|6rh1_DC;_x>-aoRGYfxR{D6y_|ULER)R;BO>^|Ucp~S6Oe|)7?J2!Qo3dl%Yjmn zH0Op{O~MIb_3*FHs&GL`-EsGB58hrr@1=!|D2J$GtZoo3m|6B8>J2bkpWvL6$Br7V zEwMq-&h@+%Q~&{0)gh&grmv_i-GF_hQDnwre^S%U#5${ApSH{B514~j_uaVlY?ff{ zg)9#rh5@;jvZEu`sr?j_NJP^<)ArKJLe?Ljc#nsut-oehw#K=~}$kxo>)X16M#Ma2gB~=sJ5Z4Ut=VyZ@ zdt$?O3pXVVWP`+N6R5PLR4%K;&KTYj-YRPG!aT{gYooRchq@p|CR*b`un-FExI%(P z%qUvDv?4_Zm;p>xRh9Q11Oav6)!f{IqN@pg^K>qt=jiV)m*4Sooga!|wdU2p((TK_ zRDXak;u`>AZeJ^pZ)`|m=jLpH_bao@FWG-(r;QwGc9_BIg@)kEb0Eav z&)wery$-(qans(zy$}9R{}2J6=R|1}IPV+EpEnkSfQS7$e%jH!x78_rQO{P)I>zF@ zKf3~+Z{-L&4-9!dlS6%8ZwPliqeB5+@7xFu?Z1$iYrz_6+BBf@6GB7UVJHyj@waJ@ z(fIG%d3IZy^a7q>LdyIIc{<8=GP;-3M?^gNiiRWf5B@|c|IqzW92M!%P<<0EtvD>q zI+-rSctBi;z{dab-9G~jfNsd1n)2e!o)e)1eF&CVW3jlh^Pl*mJ9Htt{q+~mbMi~OW^Sl_xYHnK?B7j8RE;u>&WH86B)vR zgoOCCxJi3{{T1`e!(e`IX>E-~w8jSxGoVkbz;$SUT>MCKPyeTU3alH6tZZ~FwM0;E zkNrfr)QlW2w#5~@iw5AREcZl4EX|!22@CdlXx&Mcnjs~=3=nlzw(IcJ21t~1j=r&1qv5C}De2>6&pxTLlFjSNX7h?Q26`%M;Z24wN}Kxh zHImSTp{b_wKMS*&Q(u$Ra?=$sl?BrVeP=wWvvZ`4A4Ya^>t1?_ogCy*Ya*zoVv2a_ zJUa4X$gRFZ?`@J7s1Gp1!h@G6Ul{;E$G#p0N4Rcy31&$`rHLw4>El#w=2%=DuIewB z%9E?5Zkx#W%g5EgVyYZ1JfQ;cG~7qsvM)7J>z(SN7FSk4;shO43#jhPKmm0um?T5F zWhz`!RMNP&(QxnnN4$IQrpfXm#bx_ht$G8B)k{3cQe>?`tcxkvEueM%9_MNC${I=d zyuWot-$QZD9gCvN&A2g#q{#B3%3NNXMY#B6@NN2kt&yQD4P}8(k%*sHAAN*}u&=+C zFKNX)$|2DS(Rfo*mKQ%{vVz`7RVIr1@`|m<#gl@@6pG49xr=$!N76<_iS}k5U&qle zv*ht*R15fNODVL}#LBx@CZ0DVAAMoQN+ex2W0#YPJ!eUiqG1MkFQHw7`78knU74}- zNwZB+v}6Gat><0CtGV(|@Nn?+qJC>J$Ru!Iz*9W~wOh-Q-e!(5etOw1Ni>`k3QF8q z9Cs;6S&L018)-l;6f4WJF%^?i3(u>l1n}Ldqy~ADBxjn93I`xl@k5=KmvwSz7T%|S z5lV@9xvDCfOI^6^Z)>8AYXhmSTD*X}bf#xZ&1QU~vC|6D0)-7FRh;!ws>N#c{Imu` zO+(rglT5cGvw4k!Xys91&3u9LQy#FkNsqMicBY#=j)<|koLXqn0m-Jm2nyqG{QiRU zDsQM-wCEI5hp0|fwAh)q=%N9>qij;x)X zrCsnB26NITjj@=}YY$nqa%ShaLC4Pa)?bYl1gRL>5o=2W5!^#a>zEv zr@Q;6Nz^BeQ#o};{djRlz8f{^R>wU9Gs~GsqTLsWj)bpM62V69Cb*`#Hio8}7Q~vjfhkQ+k~H>?NK%bJ z(fx!$_K#09TJrX8<|^lOq&zwrW}jagqM0*&X=Rzuj^*CPTnaXGUp9Mv?q%62ZW%%9 zM2A`5p+>IXrgX1FiAvjB-5kBjo^{kS(Y36G4TA*(2?KPEn^3Y<8+U~SPo3mdTIvG)|BZp6WVi=**JzRu6;8p|Gg zGSHXq>2q(DR!;2g+DEP_o)oN{jDUH^k=%yO}fAafQ4`405quMpE5-s2&njj0rR#{vE9JL^Jx5P@xc=zPfk< zJudy~H5XyZ>&efNv24;~O=d-d9$~ceufSw%Veel?10gZ>6vLtx<*E`r$%YW$9~$AU z;-4!j8dxnNpgL6oe*)I|;QRM2@W)lh+Zy-Rhg)cfN-+ZD?}-AUeE(YUK1I+q8|{(k zcr5jYBpX>o@IPOn11#dr(@jA+rLIPB=(;|jI)_l`_QV)k&5B$x$HTDQOpgoxP<0N zR~#cB4^%U6_EEW4mZ#$#Lf}LGJye`>##;9v=(2DiClT{;iywwj> zY;f$%)%LV!fi!2jK!4L(m7p# zGEi6wxmScDuq_%tIajlB+I zU8e|;Fc3-k>zur1r(Wi|&XpEolc(yeg%3ts*Yk4Iv{)?=h8-kkO+T{WY|LT7XyCy3 zR9t-UlHvajHW(N0;S_C@zF1W;Z?U?r)puf;ElRL*S?Of9tajttXg;Q*VbN5(a(9VOOcS`GW>g7=miMx6!jImc%%WflZ@of6~z&R+U``tXiH`OE5 z=kaRlP!Ey2HFvku)J=NM(D2(&s4srC<@cm=p9YE!)u+spROVi}!sLbb>kHpzaCDp1 zer<{uVJ%_JtT3P%xpZ;kUZz@!qE<-Idd#^JRBur`M)Im&Ogr9g5u&67UzhgzK)I4Y zLke`A1nyA#0{1$3cEoNG5ng&|T#}?+0ei$`af=PdwnSN2GK<|aN}1osg9?8bqhM$0~~Vq zWUQF#Ho1%DDB&|tl;HzmO51Y3#~Eve_*h+((;H#1F1hrM`==ZkX0|tzuMRvzTDS3i zQ}e#rZuXEqAXQh9tLw6%x@`#=M;pqB>Saax;R9W4f!Z6OfS$#G+f#tn!>})$X%l`6 zDt02_!+_wSfmRq5Q{#1R98q5(rKXG$0HVEC&1r(Q5@XUsS5lFBW#Q{U!T{ zNv6yxGxL;R=P>qtIKP>UKk5_iu3|jZ#$LESQ{*;MdKF z@o(5>?WBQweQUc4?fIx0#zqYMGk;Dz$VbIqfa0zMk`K#dsg5Gmjx@aoj&|wR#EN}W z$+#8_Bi(X&13n!0h!8#QM8#4TV@M`8Qyjl0Jdse$9&p;h$M4S;_Ptbg}I+V*4AEeDDAS zg>}luIA1aSX0>A}>0$1N_CiTMnn(E73nq{$OC4uLtq+|GhLRnFO1d{3wP+1m?bU4U zRhz#|M2!S)Zmi$@{)UoYMMxxeMe$h+9?FJKiEXbDZb3S6#!M|G2iq8wZk0wm9Vx}@ z(tgx_K`@60#o`AbHi4YyWbhQeDY%ok^eH^umX0Ze$M;5I#mhyO*@YFMXeDc<;YBWl zJwmi(Ft8tx2LlLLRRmTT0bc_Ds}BAj+=0DGN)##@5RjoX5D@c!U!;mS*g4vod20V> zo%?@QsXe;TzNl)8bsU)_Eb`+*U?2y`p$TB)Lgdg;q=<2XgQ??{hl1P_{iYBW-rk+npP&I<2L64&z3$Xj z{;v2u>-Tu?e69PO4@dwN3@V)?^*ssote^k30eYWm|N+_1d1&Z=TM6>o`|U>M5twzU2?~o$a_q zC(}i%c($Q*gpB7(=TD7JfNn?~(-V83bc|8lqP=!3GjUZ^MvT*!TJ>*oSM4Yq0}~@4 zdqs{9mApez^A(N9`FnG0J{?Ml?eWrgT`75d*YI5>y%0J)G^1S1eQPd!if69Rr32FDuh?Z}{}b?j-Zc=aA`;%}GYm7tqbxd5l`kt`Kh zAng@BHbeFc!>m)jV59DlKZYZAK=z6r-x~IdkiJvC;3K|6d1pyPNXm0nx)C8}n7`eW z$^8zKZX+ez260Z4&t6*RcJVrS^m4&DYo@P5C&UIbm5UWW1Q?PwFk;@OIc5z#Uc-#5 zom8v7Z&Cw$S?jcHs;jGHBGWRc=+L;@olN1B&1f>(Y0GG56PJV1Drl=Q$x~=nv#*wH zQiGWHJ5_0#wRF%a=3&2cvgkH$1g<U?nAP-U;$5qu zrEW4Oo6ClpQO)2cC}5`HEBxRw+{S;vOi>d7pgbj_G8T;MR70avHfLfYiK22L%Sg#3 z?X+yL<)ehDhd7*Qz_BKx@Z;kr>RCaJr-~&!1CCWRth0i!ams8~t7%$R);T3*i3E)I zu#4}{m8HhFYz5DobBvH^R3Q*r4M}|P;z3>qhGWx)8kCKVES72GG}tT6)Sljo5B8w+ zd(csZ-B~~kkC#JAIX1c})*YS1&>ph9X7CW`u0HBA#O=;*E{?IC!pR>kK`H)rTFN3e z(4;!7Ue|NwX$$z>DLILRqTT9nVtiSZkG|jPy;yrmPW%xr-nBmx?vry5<_C z7Z)4q-e!&ZVWa%)v3hn3dDv5k&K}LV;#-RwXtsGu4%i?h#<;QpO_H&2Ds3*)`(-mG zt7|s|O}$pIOdr5Jen;pyS@g))tHnL{ZG3(_Q=kG_gP_=;=tQ6v<|H2$EDY@9z!dQ%m!2 ze+Xc`z3*QQyo%-%jSE#RtBYPn31~DIAjyFXQ{uo&!ptxkWrL)K+wkI_ZV_RLrCT69 zYUp;)s<@O(E%-)2=fx_OzZJu(CsWuAgVgklrpWEIdsKo8$EOXuX)y0%MlqVxG^o#J z+M6W}5v!_{;8|uOR?-Beu*_uc3ug+nf+7NbY5f%3c8^G6+{FzGJ4s1px-O}a$tng zv6q_kB&Rk{C&ev$SL;BRoqE1s5wsyWp|dF_85nXtKIvhaxRg%-`8hTjQYTIgFW-%^ zn#(&kS6-{wRMD|;SYeeikcC0pG!mbsbaZC@@E0^=iNuoE!V*!1K7Gb6n#YJysW9Tq zj!izzb63jsu9xC*bpjNmO5R2DJop?mqd0h$SMly_ljO(VbBW1TrIky#uyThW*ib$mRS>r zDv;<~vX^W+w>V4Bj8<5WQ0}-_Yk)a5xJm)wSkRYYG3`g><~F13hS$G@(ejWl<1V^z zCL0$&v8~8VE-59_enFbd6t+rM6r&u)dzf)zCt3z0j$4~$>RYxST_WAsB$k#(oIh^l z`~77KUrh}}hQ0pqBu0-F?GkRLQ9~2xhIV*Afb&d}Cin;o{PuUEPK+Nh_y(zH#)ZZ$ zTci@j6_qb*t*cxXJ$ATHBQz#u#{RonliDXrI=Aj0!d?HCrQ@TJ* zl_!4mSh&UbTd*iF()V?U@)r3*VVCX5xX9E>g?)jj=*`Ly@pY)upwRyy!TR9;fQ5C> zg>?^}$N-ooZVVpxUyt{|?0bWWpz9@9^1A*@{z#Vyy38(2kMu6@dxs&QxFysOKl)T` zFpcE$eVD*`?G(62gbN=}GIZz2t?M6wV}^^5{n(z59QYL{8=)bX$2Iwe$3Mp8AF-Es z;_>8c`WY5F%H@pP;V+R_+_sk(FDhwzirwf9mnu(^Xfjd5FZyvv?DRx(Yc;H=Q2MOt zjH+mbm?-Q_Mh7JkFcw&{)!bg)jboMCxw`*=QPu@L`u3N{drmoybVrAH+Z`tD$8^Lf zIR$lCkR(he=|T(L4eK%~sUxssNNf7t@Z3?HwgO)brUr!F%#XTl^w&_#BF*=T z%_MMDZc4|6h+=C%mBBR6$^qrkT7J&u+mb^>Wx7I2pp6BaS|c16To~0h-$2GPb}4Y? z*L=mAk}@7!&1DkZPELl!rgfaFgDF!u8s5y+R-y!DRhbm0iwqO$5gz$XsZpb!@aC?R z)Dl-aVY_;|b5*iXNCtkiI~9FlbYe~ytIRpbPEm2M%9x4wUT0+fLZNAOELeU>mM7pg za#VOAve9o_EH*YaWuo&K6#Nf>Gzk~`?6)Rat*mUpl$3KKqdn=fAx~K$tq0Xhqi`=C z)dnu!S}YRTB&!4oK%PuO13Q7MP0#MRV0P26M(&{^2XT1}tts|OnctNq*pBjwx(Ikc zu_DYHXgo~V6C@7|SYg3}&lCG9V0q<8GeBJ9Ztz22&yRdHe`TfIJm>g zKu9A$<{887`9bq<^6wv(n!b|iy0MR`&W}vZ05Ofb(U0oR5AB-1vg-Vx=QX$IriTGg ztSOuZxH*dw2a{SP<^<3LHQh#7+>!SLCxZ6dB(+_kP1ub=gnSds1SHyV1204Yeyv}Uf#B~r2#c`!wh*TDu#X=2 zq>%Z#5T;zPj|gz4w9+VZVIN-NCl&G=rBr{D+X^`N-($f04C&r55S(fG{V)@vwGtFO z6MEmCOa$$Xh4@c|VD2yG0+(T`d1OAzyeevSLkj-T<46Z%515au@$ z8r&0#++$fo3@G*o8Cu(bI&aH^O8(mc8bT5L7??9I>|+ZAa=&NsFew;j8p4o|VJK2@ zQmojXC1$l!9Py!HD5e$%CxN)#4g`IJN;qye6@j$6gOU-8={oNmZEO?deLy!5>gsK8q&`<`0La zkKmR3>GOceOCHT{s+b=lb%Br-2gWN4)20u3^#JZ-fzTC?h7T63Z)f$rnaerjr)o_< zgzCNF^R>p0Oy6}imO3u+1akUo7zTu*Qyy|eb~Pk^d{MbQSwbfCW6Xd54@&Zs$0c?W zr^8p`%?ozfcg%F4r3PG!H!|xkL(sjEu*VaTZI3C4cO=;K521CM5r|hZ_{4$Ga>)c( zV?6l8$Dxz-Bs9@FkquPDB?Zrl2l->AaE{pAzbG1 zcTO@-5JBk6{B_mG=I%p`+d`D$5=iug!XN=!hrk>TZnWQ_+!p9 z;XD`qUoP|sUAV;g!epDk%)(DdehV>12~-~kN{0#Y$PAqD!f_I)PzwZtt#*NSvYOVo zhCDp|!dn@JARGO`znWvA$rGYA6NGGKHO*Cf6Jw!6>`a0uKwcIJ!`DZ_P{#GqO)KnV z8H2j#f^jWyP-F=W8VQGNO@fhzPmG1aw{9&^Bn8lqJ*WByN$r0t*&1RQ0i2LSm;fV~ z69}iMzG<)hmEsBD*M?EH9x>3O#zNv&gigzgrjwTj0eH9ID2QTO`OrIeh?Mm6#&)fyP@(%~%pnL_AT*Tkotvx^uxP zkA#=7s7JAjZXB@8o2$qu<0!P_m|NctAYQ59STk#TFk__l2i|!4Xg5mXqN4D`iD3ai?$|E5acW`oqDq0DFH%=BHR%Sv~b}qOm zl9Aw*4Kq%%gcgm2E!g9vV(^ctJtAetA)yDU1Kbi3sdYxNZS0X75x225LMWag-Wxcs zz&7*H*CW-%kiz2M*&ESoqCe|GEb7mK>yb_jKG(8~jMi!~*T$?xu(9J2l%T~33LDtd zrf{bq&nw_3MS0}XeA!Gy&ndT3y?vHcBf2Sz%2q1;Ij!0^!XB3G2Egf`YX9!rLwH}W z67Kw$h%suDU6crZp*?FVJ1Yrr`iJuJN>Jj74VBfq;98u%$+*XrH-7Ax`^6hR<7j@j z#P~a?2VhtCfjy7Q zgb|bPd<(vo3vq(~g3Y2Zy+&*h-i@&{LbAla^nUJEd?w}SmABaA?`lKvv;Bx6wwVfB zqi_p+`dJt8?MfLvVuOG!DP`$fIkdqB^=ddX-WatvV=9}Rc0=)CyZuI zP_xFxAMO^mFZ4LiUKFYOg6C?&)6K+7NZo+m$gFmi$1Mrl0lCFv{ywTAx$$6GyW_t0 z;Ctx;{``Jddg?kJ|Llpp@<4g<0ebMlkju;Dvf5uyL8&#YAh~I~_ivQq#+o@g!jQoUY^N!gz6K@~qJE zaca2uH)sVx`{UNR>8@LU)q{pLCM;66`yjX45iCH(@7LOg=ERm4@#p3;Pf|pJ%#|}Ik zxO_UiF^?)bCySfr)&b|VFk}ipoFA-ihVRcU^|{*qpzKp?b-!9;Q-6y}N$aR*j`sa* znCu`OCw&0@j_Prrf(mqb zwkKLFBBxThQe{?^aP><9*Xi?bISIX(gsqr_Zg|{!R9rhQo)b9tp|tC;+Ighid1Unh(pmw@ z?|;J)aqS0v7m;kOaqUCrkr7%FIWJ4NLCFDUp5?Q6zd>BVxdzQ#L#NK6(o;!tq$D`i zBvNi^9kcKrkhu@dT!(4SBhwd<>Vz9!*<6RO&LcVIksOLhc7-LnL*hI!@E-WN4~L4~ zMVVY9FM?*NbM2Q~)!$hn5#z<9c=|EaY&su6f>| zrbf@VE-b@wL!S+Cv2_c1s_@{fMq zMlkKx6>NU8$@cGg-?cIB_yD1M_Jxe>-Vt4Y1JB;$hr)J8>kc6zSy96TIpy zbIpXtK7K)ChQM|ZIA84HvPZRWCS%nDkw>{b9`X|sJYYo>{IXDvydyf3$f%vBq?6uC z^{X>7`+T$Y{0<-;-hSPKW-8Tdk-}+V+pd1OXAtE=&Fkao_E*d+J%&Z|{uQ#Z5$4X6aTiyyg*%Wn(( zgb3@J2H^_d-lEVNunzYu*RDt~F%14gS(-Sbxy4uB-rSDr5zIk=FLNjCFL&w#fpMch z{>%sK=Q}q5wD-q3eFUZk9X%Y-G{R87#P3+cDWRVLN+{uP6n-V0Ba?C1{TKZIkoUmfxg0f%4+wn5eeO*+N|MF5 zLU5Vg_ImC03AppP>+)g{`1?8J2b2*yM8AF++*Y#Q($$Yo;M%{XYyz;UkFwVD zx8dvu>$ZMoxJy=%VHqD`$vtD;%s3vplpQOeKjcyQx~`^4{D87P*-DJc9X*FjEedX} z1xNY%DJ%gC2AnYsh^?}uHhS%ogA zER#t#pUL=wc(1CylDZ;oCBfw4Dj_06XmhP>mz+htWM@*YW-3XdrPokoR&0Dr?KMP8 zxiEyhvZCx79e}K=^2BFN{AH!f{~POsOq+gjhnNleX}#=13WOh*B5IkN6|n^&6^>+% zkv)n`+K~DB^lB9x`n_JhtR+oh5mdL=trw?qqp4>cfX-#1n`c`8GlQzEaYWaes@gr8 zt&vJLfQu|QGUmM+;_Rh1WC}tLJLZnV#Tl)qh_RmL7K@%{3D~mB zdiGT&-{d`5ke&KvAd;oxwvu&5pA9xTGH4SQ41!ji&Gs^sPA9xU3osLQZ z9MAsU$_#Ak&1ULYwkln%dex1q)OCunvNco<<)HaXG@iR&{sI%C7BGmI7aNKaSE!! z7;6B+GU!JJ)zZP*TFo(FoL@T=B&q z)U5B&aC*ZZI4gJ!EC8&wWfZV`A8e zj&&C#9pPChp%ulI9nX~^-<5*!y{!wd*QP0U=eVrMrVzzVL9+Y2l#ctNe4E^7PWD4p zg3~EdOoV96pYe7_kkQQ6n24Pi0Yqkff3Tx7(HH@-Q4jfk&knkyvz?eb7%U5;QaH&y z4Elt-Fv4nM#4Z6HL4V}n{Sljx=`BL%WBi!?2mBv+;yq4GKTg1$Z1{gp|NgJE3G|<`)_nG`#*U1d9a72$qP_LamSN z3iSJe^aT?1kGagr0-5N)od(SHyf*J;dYSwG{ftfqLO+Pt-VQTH^(Z#2X-xDdK@huV zJU|)*I#3!k2_1u0K+GfM74yux|8<}>=n{Gc&48#++AZptc@J}-HfR&N2JL{jOZp4B z6}c6u6~!Gf9Eu0J3#toxD6|cVBvff|D-^~E!6>Fay*~aP-bmm;ZxDD;Xpm^oXpr-O zZxCtlGZX=e0GXc{m&{j|Q=C(tQ|K-9p6Y;Q@GO)8$^f~S*jJ8I>Mi`9?to|THIx8K z0NJ1TOZF}7-Uh5s?7l0kGlzbYFEi!xEx2V<*iGA^m64;J8g zy0u!yeRD7-7Ei~u&wl38*TJUonEQPr%My1(NN@AD31s&F`ZERQ9(dTA0C})M>yW)s0F zCs)Cy&8=g1dWRMLuTFQFmD?Y0*n<)IT`IZ;L~HFE0>|PhIFEKr%%(X@Kj!c0veU}@ z@?0e2AoN$$5bBs|wjwDj-!PNN$Y@=A=i!9Ga7<=T!tmJ9PRQ5Mdgxbe%M9I+q0RP) zJlUWKBq?)OkG6)vwvH2jin%tM8{$1~F7{-sE(MENtz_!s_I$_2?X_|i+;wxFQecyj zRkWzgH)_4<^X`Z9MP501N$9S%3G-MPR;Bu-2Y0 zlI1f?9AqN7-u(wo5lLZ55Ae0F(q#ji?i9K77%Zc4k32h@WZ(_nVThyg}qcYkB+DdrPf z_3)KZgsT0?17#Lf7tD)B7c&8+t{ZMKEQdjNQ}hFOihPW2`dpVcJ}9!BW=~hADVo zKqI&uMjY5jQ%6gOhy>;`+Hz&Uw;jU@0gycQI29JIN{=LaW)vYZg%51Jv_#nQIF<{ zpy3GJ8>cFnG&rAs18_`YKG=+}S&5wncKE%*2a>VVp}{XCNZ;Q=O~ml8EB;2tki_@r zWNXFb(qAEn??SPtz1aWk?KK4Wfv>tcH26qo%=OiFz1OLSQ2%)_te*7c_KeM{i>S#q zCDUw2cx|%YZF#hQz_#XszlscXYYIQPhj^+V^@S`k`eSXx;vKS2cCBaDt#g_a==P-Q zsw%JHJWV~pIQ0s{j5*b831hJj)}ef@GGpU6RbG+gOXs3c@ZqXFV%v{bbEOzfdO1%v zapb>VdHgKoY?2AB+R$Sry?Z&)jZ=PnlbzM(&Fm0AEIZT1v_C_Paoj154QeeQ9-H}H z6i?3frypx(InSD0KrMJa1sXq>7`U(>Kqiz*1{(HkA+odvRbHh=npvfkA{(Y^$Bd@F zU`kz7My66?JfSM0DQ6K|!L6?RT+>n!o^RZca6t-_*NUY%Lvc1gSH%@*AvlsmIo zF>9n|&3^UEjs8lOE#jG$E!{0GYs|ZqJN_BhjsMCP&4N#3#v->Ey?#~=R_m-1R&!1T zqcN|J-Z-{8TI;Nud=uTik@tA2@7O@TckmlDzYPe@2 zQST(80p0K#)I*D~Z!V$%!!QTbL#(iGG9m-|VRo1&0CA6axDDn(naCdH&`h{nH_`#+ z5KXvSIZ^}q!J4R7FLEoaT_h4kc$;e2Ce*VQagS*DDwLCISWnou9I?*ga9+vFN4~G- z&pihE<3z~gV*B6!t0zNQD;u-`9SEq94hTr#|M}pN{LiyY)X3FL+`-w-$ko;Cf3^bT zYC-#^tRUrkZ5)|3NwFI=1|r@Rg#)8I*ht>ca(r{9DnO`z7lGlmj5;4p}=C6Hd zLF%u5ct*NQ_FxZqmF(6y6bEFJ?ov244bvgFNpF)s_ye}cUSzh3oXUswkUeC!Nu272 z{g7W}cnKeX0gz<;ln+Dz(C%3xjP1aPT+h(He2+s6-2#)QXz||hS_Y{v=74zS_o(3r zuT2u!I3}*yW3c38S$wmOI_?J>`g5l5fJyMSqqUAt%;aL;0~~o@-9r@mcIf=$1BcFg zsxNep{L=#mmOIYmJIOElfOsaZgW-eC*R4g$%q!eI-tAIZb`8^a%`#!`XA zHx+hM|nYd0+JTQID_aC*j9*2I+jSM2a!ry&ME)dL!!PWmf% zc#X7|{s9iqm;P2ZEFkGCb4Wn;BXyWh)=T$*2M9=f(*Oh{zj*-uCcG&C{wBRS0Pdu} z;)hv~_mbawhntiGQ7OX`h@%`~1O~hSDx6R_3 zvAkKs6$Pik#aYo6MGY{n#m8Y6YEr`+$f<5L=j&?*_9UsZG_L%-hNCMwp87)Zz*XHG(3rAZ`_Yepwl zttZW`ML|69}{L8><4>JnlQhOT{b31Wk$T1Cf zez42t9hg)B7_@#y6bjw^>mUT?!?#TV_QRShd+|W&GsnSRC?+2&Y#Pz#ZLC7f=$q4 z-4E`rkb~X!fe2_ZxyBqf+DlmHMNgV6W^4;P^dSm0o9PKLrGI+yTwI*hr6^zd<;Yj@ zq1E@KJ(J<57s1W;w3rV0D$oHgZv)Cm#}P<49^@%p2Q55riop_uLUOaHj<(av0gDi% zQ$BbdKS(d<-bd4+F9?C$jA|U8Av~qxke<#?HMz7eJ1CYZq_t1&=V#tl(rN!$066i2 zr?QVw%rqRmct3#)&M}H z15>O++_BsD*d8v}MdJAml~LHp((J6%MMMV0yLe38%Ek6g2gPhdrs+C>q|RP_{_UK~ zv^9m%up@|X*f-+bUea#d@DfO07jkBK3!AzXYQ?B_*Uy?a@)MD+ymxQf*-ms!Ja0?9 zGm+k;qJkGXn3ty~WKRw6F|gA+JBN5m0j*e~{-o*d(MavFwiw-FR}|67?SeY~-rdN? zVwdlM+m}H6KP}=#yd)Zx1iXKb4O!~gz_+(a(}gb)Dq<&Ph^-<=Kyl+~dB}iDg=B^c%k5b}#nkyo(?8H+r zpqz}{hpuqZI{=^n5rACp@WAlT@b__~&+zIny@9ceF#;PrDSP?paTc7xp`)=u zQGQ%VN!$=X&iZn77^%_2(j(;(U()sgi7SWmxOf+-)EmbuJ1b&lKn@TKkn0|O8EzO} zRqf;K7$v$SFt7G}prhr^QAzNOY`%RVyOpt(zm|StaWGZx-oxFLiVa!j9bRI2sJZy8 z>{|lcm%d9eyO-Z|BzkD07X3uV**KN66(w?dnI}GGbsrQN78tZ)di@zjBH#*A=OEI& z+EYl@x84bsz+!@+`jjbf1LVzr-6}= z6W=aImrbZfeWygUT;uV6dVX3vHA~PqEAJ7z(sQvQu2Nu^R?i z=p+WDTg691DyS?xQz2)ol095TzR2lW{X5qnv&6L0z=|@dJJZIHDFI69HBfShEWUAL z$b>z)PbP2wv5WJhGx*K>P^L21!p8BEhmO|No?A&m~bS|$ImWIM6bp^h+*)DXS?ZeopOoGFoUo!zNg z<4kybYS|`^Rw^}p8MVZtp_A70e*MM)^QMB3C0!2%*We!&xE9CF6`P5w6>*;YPS;QN zy#cw?Ddy^;Bzh@)<2js<1h;cOz7#~LWEQ?#7T$VQslu(=7>Oi|o<`Z%kAcjNf%OCr zY8(r5yXbdAI$5R^C-gOxn9ON&k-LUnh?_#mb<7`}aOf=b$!ItgTaux-h#*qiKSB5YRiUN^e*J3ntoc-N-}G2!EtW8{NjXhU9^ z22NBGnLm=iEH)}yWn+8${G8NTSt$ZhQnX$Z><;UzpmZGU?MPpa?qacd3A^^o5$ECl zS`cl1h!TsFsRVBuq8fb6zs2IQZh|=VLh)dT8e|sNMFJcPq)7KhK5wAHO~hGe2ezMx zUN9$(K)+ysoQ3X>!nK3h0jw#VHPhE)Bpqlh@p(+yHGC9&(n{7eZj(LID4o0a?U8GqvTiP|$9cdwP zleLI!b3|0aDjkt-g`P~iYy}ywR*r&OyesBh^TxS|zcx;AMiMx4LeQKkVdK{^41_Zo zXr+eWDJ7u`T7nmhWC#ee0kBpGWanG%s4an za9v@D*|Ifuv_b;VDOEa}6=Ytg4zR;b1jHHV*cWS$8hwYiajdg0|gV_xo^F8P45d7(>H zFU$K?9HDvTT;!K}1M&~QvD(r7CGkDkPq2g&AIH3>2s-BFFb&F}<|)PWt~pLJK^)t6 zLtw}8j(;!wk!w3PomOSyRSC$YqF>16QW?2#_surlS*2HYn^tk( z>@3^#+~9nux*V;lE=o6$b3=%w_fZ?%lprpgi^kMuM>JGl-to?RN81t&ULYS31#hU^ z%Vo8E&{vj*-_Y&vVB5@?2`Cl2pzMJtXCnOcfzbaSW#1H}2@Gc2wr$(CZQHhO+qUg# z+wPvmv~6qpZ@c@>?$$o+y)SpGQprmyc}e9<&UeoF)}hiL^JCA zKD0ZLn)A4Zqe=6%K+uB7Evb)}v_hg}w6X_g;AWJu zL6 zss>sGJe8S;;M9y#lRTm{HDphWWjggh5`7Fgy}^<#{N0Ol~!dxKn`^lAsR zPRRW*OLy#@D29;|exL#&1DXh38MZXr*)Eg$T)>nlM#4j?!u50@U(j`AYwH*9uCN-) zzl9?`85K%0P-TeXR@f9(gbX56qt8lwU(vb3b-1Uq!-Fg@IOwUB>^Qn2~4tIQD92{w%xa=tp`Z0L$Ip!%)YTMMk?a>I`J$}oQd-PA-6g_UR0KJvo_$6;m zN4L(#W%2mBSI?#fg8bDyOmJ(W`9-R3ad}Pdaf6^RaI=k9pna>N@dXJ3fQuV^F{0~N zbl`=Rtxl;!g5nn$oE@&#Tes3FbUCQ^LJpRUNw1n_7VgM($gB7pMOp;QSdjrgJ`C># zjeq5#1&r=R-J{+Wn{rF1Uypapa6BsFeyrreu8qyjwCohZocK#IhX;`s##>57x%OLf(lC)yY&|x=GcmS|LL?$A}nvBgVdBj^lZ$Kj;oN;sfL zplY`PvAW|b$ft)u#c^%qn`aB@fRwH`K3s5q*wE;Jk>-Gr`hb!4pj76S_M7LUYZ$RI zjL`VN^bCqnbC~ke9ifNXH^rRrX^lIQ>Vt-s*23J-)Vxw_V=cXTBCXkx%3L?CdE(2x z*$r}?l8~N$(xS{)12Dr0-`KU>YBetz-`3Pp^6q($X@v+-O2pFEX z*L(Gq>~cf3Z^4=$BYO%XqXOG2c+GqZ(p#DpQm7O=>{?nk@_7~&kOt0*epG3U1AZ>n z7!5Otn!b;&&ZHq1;cNmEhpB3uo(17MMh*z63hx+ot3z|=(w-T_VTQFGLtkfT7+onL zFg0P=r8_;qF9E*AcyO+@8r>;@MvMvf5~CZI6lWD6*8#L@#R($I-f=g<8Da$Z$+sTz zns9%M)(x_nluu%4M*A&LOpmggMJ+&x$pWUJyIO z&I;MYrup44g)N*^oP_f+%-oha9AgBS|@N^CvZ+Da7YJL=8DnU zA??>a;0tCeK{|$c2n0s2gTK!LPVZ9ct z7v74yz}Z~CXL-K9bZxq3ig}cMU*ji5z_J(pREAysv6UuBwURe^e0iH@Pf@zvHCuUj znkFb2JY$bMnJS325~@h(wGc5GeX;u#EC{o7P#L_E6~S1U^dOkaT>i$wdAdmd<;U~f z*La_UaS?Ow zR6IGW>CV(+XGJ3nSmfLg6mm#BJ-)p^{eqUHtLokiZt(t+vSDv|S6{j{%tBd=muzcK zE$JK^ZpaeI4V3uZ>EF|5F;`b#!-=_mF*b~=%M(omFvXH|uMZD4$)4=PvbJaj)NUjY z6+cVK-f%jS)n}>!r_|jpHpGx_Rvg8~1pQh0h4zA~)~(q6Oc5U*6MtWwm%lfcX3dFd z^A%{vN9eaUcFXaMW$QCUKY8mjy~@;$^!STu{d4CD_=`nA)D===I$OFQCD8^b^xmPP zxQ_AcDHs0H2?{%tBw(1zn?29xonXaG!pyeG$fba(a$*FmNXp$se0iqwwAXtD&Iwfd z*~L_*ko-KGcxEb7e|mj8y+Ua{k$#y!9h5my?X1)(iPT-|VmMhE3U+v82(FP1+ThVk z(tY*5CHeR+_T|!KlBNp`)>|qvP^i8+yxP9Ht&(f{;{6pY^<4{P85Jehq4G#A9<{IsDsM zJSSsdpr6bnQ8q;DvxRSDE(l)|U$tEJjp)3)ko7caDqWSI;I5jOUq#jk$n6ML5KhX$+}5+p@!(V^T}M=;Nu;|(D75rh1v#IQErhi``e`P#u4PrJ z6Uv*jpO2&Jq1>af7m{{o`ywH)e>!J*mMdn3?iq zC|&znT@-DS;;fbs$XTb{<(sbq5hucVCf-Jo=l>Rdctmn|Xf3gzJrB`2r!&s9S%fl- zGCs5y){wN3dQ;_#bQbw2-<}=^uimW{>oXU~rBUPF*HMs&|6`g&Bn+EV50@M$#Z5&D6BFGH>kJqf%v3iJd= zCf+&4B07ZI`U7k`M<54+d68Csi1nu-10giu_T@9~G3Mv)oOnkR@9aPtM6|vFYS$qt zz3#REy6<$JuKXzTQvT}w;_IGcDDJlTfCR+da+rwp+osn^XE6g(zpA3yNRJqJo=F|I z`~AbA+0aNxMnr+K8*Z)v`1@QD!gu8-;~-1n&I!oE;$Sh%w?-@nCzEJI1>?!ca=fIi zeHzLLf2{~vKLA!_UeAz&?Ghae^lHC#drB<(P0=-*uS!>|2bDk`ez}N}D!0FUZbq-3 z<5+`VZgFe>*=7EUc*ujGN1yV1(dFe^eYwQ}g>nawt?H6UZ!d3H4JLA_Bbr|f9?@6Z z3M`D4*Y9S;GIO(KKQo-JF?_lB^D_O?O{ENu+c<)OpmZ}cVzYAXCDkO%4H04vo~Y3# zH48tvqY+Sh&t-G(4^|EZ-?neF;`?)?r4;PvV$+|1DY@KT2b|QH^Zk z614!z?+Y0eXN1Y~EMHI%++BcjE)zV`s*k?)CCTaCZD+M`um>YvA$ox8*hMaB#ac#DjR^q@jS(MI+u##6J z6nsehI9&guu6gsoQ8a;dMEPt zG}EgotaJw>!xv8MV~yxrPq&I&=g|AQ{4vIy;4*v9bJ zZ>F|L`5R+Z-}OIptPKjdeFN?X%_^rED{NDOT~gZq>r}N{734*r4WL+=%=+5PJR z(Wl~%x-tW`(h0is zd0;&(8LDw9@qUaVcLG&7`F!Ll0P-3Mjfn)FImkp z{aP&0205>Ks70vL@FDgfG-Sjq)l@vfc}JC(SxA;EF#0fdrUaEui z3P&r|L>|8vq;i*Zrbj0%X*N%6FfcC!xYPW-C~ z%nz&O6m5NXWJ5)W_1dg6{V;rllu72;@8i!J-H;X*B7Mo=(=~48qpTP^~ zZ-iyl3O{V(;7imITrbG{kS%~OFC0^8FjfmxaM=r}r7Kefz zg`q=ZKgZNnLhoUwGSMRIZqj-*iawu6`qQXp#zfaJNPZ|07nR#6;s;DS2C79)Fm8UR z%xB0KOo&wJ9R4cMfHr?bbH~CFrRkjS1-nMeuwCTkT&fa>NmJe_UOikt{nn{pJ%%sC z%0c75UiNsTa6LZwYE>{CGyu?7IPV+>a%0uS|TjZsaIztm3>>OJ4k$B_?V#hQ?8rowT40969 z*E~d&*xB!IAs+uZrrklQbh24D6F-_*BIxO^w~m(>(_@rh%L>qB}e2YnkaCz;#Z z`xd909!$RXx$gNzlK9I?Q=)>h-hvP&0kGOTWLctB9gqVs-SvS~(XpRmmKiIS`ByZU z-Fys$ziSv=Yq&%7NeMgVGQI0bTI8GzUn3rO9N&bizOvC?Hj`uuJTu#&-NylH5 z^<(x!DO${79+;wDsr;SCXkr|^gc0`z?>UWqGu|jP96i%|OG@4_84ezqU6sW(4mcUr z1qW9#2ff!6irKjU$n%c80NV48lz3XRA8>?d49uk^>t5+s;#LJ^U43e5`>xl~az7DL*d<>_^xh7(BnHb}U(lZR!9{g&AC zdZNDcGEeG@`Vf_-nUap}WnG&~dX^`JT%TLEM~8yawQ`JRjg?x6lcmat*^a(tDDj z=w$30GYQD-rp%Q4;+MQMRlte&%am$kfJE>$&EX>WZ7Sl>$oSz_RBn2Gb$w6dFL!rC z@Ofter)7SK0xa(4;F(<}>ckyf>u%?O4;>J{Av_{Qh#~6dR7%mJ7&P#wps`%`(|j-Z zPgHyjWErZjL=^eSfCJFnC2{-_Xv5^bzsxObJ91ZD^UKx2^_TaPOxi97Y<@{R8NnRa zrbh`E5!}zSHs&s(7@9#O5>r)p%Tdg-S2e70Dn&T`Hth{CNVmf-NMwRx{$JKd0Zz;wPS`*|9-Kfx9REv{;y);Q|3wkc*MT-tTUil!>Eq32 zpZZN>hH`HPk4hAVACim}f-Oaq1O}%*Ny=&lLBUGQ3Y@uGzS6zCdGbrg3AAi6ygNlG z*4A_D`|G2l{eA2Cm->Q6{p#~Cjj{Ve*S&mB#?+~w4s_Q&{+Au!xvo9#mpoU)`;mdb z2WKFyK?mp1Om)>#RaXXfRsMCkQVSk-Rx3M-CktiOBeRwZY^R`C#@?7J9h=k1V%mya z{M)s?(l*!XY)RD1JiGqX6<;G3-F*|-i>|1gF^2Zhu?!W@Y)Fcx6NdKTF&sU+^4R<{ zlXwP?{@8k#CJGZ5VD{PNI*%p{Ox+_BOq3NF`J|k-<+{>}_#6+LRn-<@{*Uf8***jt zjueyJsx@hOO!l2+y9x_fc1-W0Li!>DM0VZkHz;;YRaa>Ct*Q+Lc}Dh#)Ej^h?v-m( zQf#>NsDjNuq-1oY#11pL$66sS2iOO>l0tZvh~2jeyM#hoRYig0I@rE!lA}E{;w9N2 zlV`*Hu{SS=*6OuX;hCATXK|{*B&kDSePg4w02r2K(otbFm726*({40kga#*)d4H&& zLVj5ji;E{TH+L1a_;9hI;`#Y+y_hqE%#y_=x0A4}t|#u(0~S|LNPc~;PKX!}c4v;R zE{`rbEM~J7=Cz$IGVIP|U#+>TEG065-^#{jb60gN72~~~jy=tRXuztDE7ij#joheSNl~wjDAI^zG}*8_m?~3L?N4?)3RXE4ff6oDS9X z)awLxmis&CyO{D4o2YkcV0&51Hb*QF1TA~091%%aQloK7wkBRw(Y)wlzH9<{Fr?Xx zlc!P0tR9k(SZI%k;UB1?%A^ck8Csx|ULy+JIgar;B-_M3UF3MX@j_a+IUZ!1xYbPZ zh?Sf6GF9v?3#wkOBw>uOTP1gZ_k&>kgJK3#NjS-vEfjwVyOvNBL^yq&#g#DdU z4MViw`!Fx6=+{B_Z^$?=w;~3VU1qf1$gAPIBxbb^jgVv*&Z5s_t+!qZE?-s|g)i2dF$GDpAOvYv2f7ZdDD|xd$HjESaml+2WzjOa>sV|z5;gYd&x0N*+hIwK z#%DUYukU& z&}A?YC{t3k$#GcDqBHq%DmgcKVAJ~1lZ|5Vit(O<%X7=LhDy@aaqCcX)NQTy9g5Fl zsoD9g+fH`|q!{qTO4yddniP{z>~2VsqmP(pLYw${{u#5s7i$??Lkq|8G&2)(iR{nj zn^;UY?)>EAWt}v^JeeFiHa@SrJ4edE1!Np=&H#8R(HrnI~qEyecARK%YEgMf$-SlQgntK2?BjiW zK0>3~>RD&~G3YuadY4wwScf{x0jB*;N_n8fQ~-lG7O%BR8x!Zjo2sg%nnS;FVl|t$ zxFc#T+fSQ*E(b3@1ueVuU@Fl&Fo#F3zkv9REow#84;o6a$=qwX9z`5w&fflp>v0Y9 zQjSAKaY8Ou=rY{-qLGsd*}=%nWCd4j$)ctAFwaZ)rk?Eov6yx8WePN_rQI@+ROxJY z%#3)m>HMAi@6`YHs~9O~wNiHJ#W0<*X`oS5DAE#Uk&TT@H>Z+5U7TLPlpP(}7*91a z1&+c4t3kEED!-^Q=G`-o`)nH-cx4#01M^G zwW^bQ995_mE<`R&Cjr+eu{!=!#h53kIPoNad+QCi%3+>SIm|O1B|bv-M<_q@LjR!e z;26*UV3GXEN8TU*dx_q$FdsRjfe+D}*0r%3TGu=)_5#dGLt#xei1okP1p_Fyez03K)4&Q%l zonA;@6J-+ohMX2|`=WU!SNNFHaAqMDnm=dpg*?KPc+qr$#5SIZu>odcxFygPUZ@_k$ROZ992v8 z-9%!~39ddq>uuk;a}RQ$>{OfUB=oGx8-t*Hw^ZP?JoSYyKX>mBv`@k0);XY8_}FtF z(hbbuZb;b286)5(w6wK8bN}CtB7JLBZ#3+NrKkKnOO{rOAFsSPv8)MeHj^ME1zvitnyPndukv$eN% zO6v(vRi`cj0YDS3RPGPi$!=)i%TQvIF~K&ftMXCBsl+RG=*f@Pr!_j+7@^xVFlo5; z-h_im;r$R*6OHK!T!m%$%u}?Qr4O&h^<7i$My0Os_2`)oiuaz6t!AB0I8w zRS_&Ky0Qg#6@|6(u0k+=DEp5LadPcr@nR>p1zD;Z{v1JSi&G=;95~}+CJ1IA~i05+@k?*AL50q{iC^*p+o5}q4!dbcT*`t z>(XB$?>4yp@QZ{U3xz`OI=KG$YJ-&ak1S=sIu0nd4owl%1I1=&&tjo zj^*tS7G>tH0Z(0N&B<45=bD&vbAW5@?=WH(QldM5II{~vC)h!B%OiG-4ZPqPup3Qw~1BHL5M#-_$|#XtBCA6WLi@*YvOuiuF zzlZI{xg0e;e5UtilHz$s4*J&*ClvVSa=z2n*3cjm1R-G!O2BBZZLs*L!RM%st@JfQ20w)R2V^{aX((Hx1l;U>bTy{$-8 z42IqCk!SC^h2rzN)fdxZJV&;HM$vaKhDlI#k;kOD$SozeReveHg@mIH&G%w7H z%6efB;Kn#dqC*Kg9<_baISkZ9!K(q3$}n*)<8 zPwS!p2KE2!z6l^G1!44N&&^5z)VMI^D)%EG$mL$>#V_(+YR&pY3vS>NL;fgy8$r7k zrYFrn{xdu_wI}Z)Vt-l)^>n_Kovixp;{UcaQRCGn|APLNszxu9Fwz+&=jIT8$_L%A zzEYkf=p<_DzT&SqqOmVtGS<}sHNdJ%sLA4O@(%LvDnhkE5t{DH`s_FQhsCAUe z6ZG%YqI^xTU#Xs%qa-=LQyuesrt4Q=)zGd!pKX)72hZ6eXO++d)B}x1k9~Caw=wJ~czOjXb!*oG31+HMHc_GsLl}0Y} z&{b5=i6Z3RYUqkX3gGTFO{_5Q&|ELkGI}Qs%N2OR*3ay!&JyJE`5D;Lq=gtQ#aHAQ6Sa$L6R0kS1u zc>q*}VL>jXH$f}YB%vHr!gp$=e=O;W`&7>3VtU47a$gXmK0yAyYGgHRJD_rkUeBOK zCL8m}e1wzFCM{ZM07gv5R=z+F5f1MJz*y0IL2|5Rg{T}LDhdsCE+%5c(R*LWW+Y2z z5zWcPPlB17Ce6l^B)i3?WNMx^t`tw?YUXvi0^*m8p~}~636i;8$bH5FW~p#;HDJX{ z0zFE^28eVkEnO}jx5Ic&MYV`KXR%^v)zg2i3qO1B4pXG6N*YH;-!9VmtxV%_s~0nB zr%cFJA@%hT3$=ONH5+vQ1D?@tO4Q=XLr`g(P9lY1AE9sz3HU!!o(c>IB+%K;pwbA( zgcIifq7

kC64}9E{?GriI>0*n}H53n3lNTK8hHp{K=EGAzm`#4!)s-CW#p2Er zQPx1Tf#+R@x93z&#;l2J^fIK}ZAROE>#p(*gkzRf(N1;%xIfUme32p^6ogE5Z>aKq z9X!oM=c~7c(EMGYfKL!ny$RJ0ScDgFXHBctHEP}jZCU=uX3D1LybPsz#eZJR6!UD%n(gEd_xA%xy11V<+(NBb*!)BQS(vE~GeSMI+TsgJJr@d2IBZK>Hw@a7 z4WMRCsO#N%`4UyB*1-1nyenP(X_OC;tibY%dv@WT6ffGtpF;wqHDZRCGAuJoV?LJilCwsc|Kf5+NhKwPCI+}@7 z`=3a^M!W*~&)`;vZbhjfw9^ZQEf-f7#wIgj0b&A2mG@2TreMiED@W%zq*h=b=5v<7 zi~&a!qHFaQLlJ$PC&Ik;;7t(OWZNQ(RA4P*c_Pe-BqoU)+uQc$xl4cydeE3q60Cy* zz1-Q0kI4(jeT~9)eDTEcM#z7K#9+-8MhYnpyBKoM=9AA@Cm%3T0iUp+iTiJwv1jvC zD~GO%^dxHmKo%Re6;E0;D<*F{3hql0ayw{MV=O)SC3ccUtKmDy>sUyrl0m9mr>{%F zg1CwzyHF5ksEyKM*1hWmVG26y>G%bPLP~*<=$ElflK$ANo7P(8{ULu}X!Pp734B)8 zn8XGgwpIyjb$yT9&B8e(uNmzl3A~qR`Ji`hT#;I4gSkzEP|Mri5kOuTKwdbhl=fQi zcSK}mirJthWG{HB5>ZZjG9sU45Lf`SaJN7!KP(91=_(8BiSy!>7+*h8D3S z!d!tqW9CBnFdv70i0CL{Wd6d`&~ay{sJ?9o&yJTW$&cV$46;hzTbq%_BUM7s$Rmny zaz{sG=3mN%=TfU%n~x}K5%X8WExilVnR}nAKXp!t$c0u}I!kAs@JML4 zos|^O9tH9;NrMW4jeQzC_K}`@8j1|`AYuR*OXvN;HICRV`2&%BUPl^31woht@SaJ| zXqn^o;;Q@-0zsc2RGk=gOI=Jz48Ka`zHoq1y2Nn&bqz?-e`53uEAeINIdn$ zlXYE}4E=OpU!*<*yEU5+^9W`;4dYT2)7zL{X>KX zPS$V;!mOz^LLILo0b9l{a_Aor0hRQ19TZ8nKe^nSWCnz&9TYhZlyJfh@~w*(2+a1) zd;Ccvcf>fN_f3;G{{tla4Po;o3HB+^ckVbu^nFr5FX-6O7s^s^4(BH&fo6}zpz;*bc)`Czshp*tov#qob2s#A_XOr$_AY1AvTT`fF``c58lAI1QlYjMK zRbIiR?au}?03KgJG!ocGLKJ9>)R+)LRk>lvt?#A&I)Wv*=qCN4zvxb~w)o;xf`tuZ z%XBZV&jcQ!&ZGONjVs-ZsAa{cJy)bN`eaPtuwZPMdh%6ymyO4Z^?p8l&x`Hj#>}*2 zG{|;sVmv#HxE`bD#ymUI)63}d@}C<6=f?CjXWUJ3buM;?y-LEaP7?@>X&#&Rg?_su zPa_4}Mvg$4P{`Fy({WIyam0(W#&~&3@nv=?L<;sI$^vG`GIedr+U^8`y}oekc{IW9k5*Qki}DuEG9kuHpg2A54DYq zl~Y111@#w>_qzza39^DLaY7fNAIaLk@%RS9_-=E9EPZax>+lu_{8(;Jcx*><+#w|z zIO5=M+MZJ|gd6;owk!Ct5I@GlnjnRo`M?M!oYUT!BASu24zXsDrO>j5r|X1NK&G|L z%8dXejD#~&bHtMQX5Mcc%F&>53o#ltte?m;xW&p)FAa~dFr?ay&n*EP=U#AX6GvFG zg+VeCsT|}LQsioYmMO5{)v&u}k!c;OqjFxMU|%#3i=VFXMLbU>a9e>J3Z%g*U_h znZrS!o`+_D1OhUL``<84wf|LH{Kqpjb+y8t=6SQ8j1l;M^~JHZcamPJ;hdr)YFyfS!wcNQ}WR=GuN$8M>q zIC)u0eUFM*2A&P~6@AO@sRnEc)R!Jbj?-WG9Xft51+Me_w|TAuuD`xNM{Wlo0CWM? zM!X6*uhRhyH(aRXX7G7q-1xsPy=H~PHpH9+Le^HigoDk6CZd{WskeGTbfZgQ z#@*s@t%6Fo6{xb74{Drgwp}l9s|tfbVh##GI~;ELoEKqU{O&ak>rFR>Xc=g@>PyQ? z>4+Xyt=hRx;CwZvu3GqVYl5M#QdZcHxE(SV-C##G>k?)=6V$bu^3jpLK$`A5`K`O= z)NVV~v07*aa5U4?@oQzbQFhPJ@NR>Im^Pecgs$jMtqpni(XNZLtC4%$7IB=bqv6q9 zGkm9MxMd8KZFW0Hik3jZx2|X~EoHcUTeWandKwh8!7XcSw+W~>GP~v(j_Xx2VY=2_ zTv;1V&}C;zJ!UNS185-YWgAG7WE+;&m_M3T32ya~dw5s7;th{H$HIin)H}Xk2|p+j zEyA+BCTiJetA(e0jKE@QB zumo2_62iYZL#d_0bWI7{ZVD3O7bIZ1%_NnAP}ut0%{uzuJL|YJ0U{#P5KpRSH)|A% zt4)SVYmIg(aRuolCOsmW8P6L2OkzE!@?BE}EDQP^`lh*}=C9BGk<%MCN7ZDqJ*0Y< zzaCT=w>hNQMY4K0a*|$Z2v}>IpnEx4T%SqP2O#KAZ7db2(j~3fN{kpxQODuuIdAvs zv)obaqO2D>O-Em(sM3-5nuMrZj{Vwv1B=a53MTiPBmV@+MBVNDC*Z3|w^E@aOH1vL z*Bfz1zvHFwFs_XDbRHSS+hs}?iHs)W0pnTqZ=YWBrP$Sso<9QhSV=wMxFZ%=ymLhz z7@PpfU874#yKXX(Zo36tQrJfG`ulSskm6bIlbsCBdse@-RO(Np^gxv=Me1@BZ3WIj z##=DQnEy+)wM%o7$bVjinqEF5WBi^c z^l4qDGufe5T1WZQy18HyiuGlY22RL?(2<_gbpdb-by!A>g$6`1ga=*Ir~Ak}wTBr& za^FLf5ax;$wJQfLavWs&avXG)tlIhxlV+s%aul>9_ueH8siRTb5^>Y@VxkmL>doO+ z)3c*C-sxJTmCtv8o zx#sXq+6Kh!lOWEr_zo`XG%u*A&GGA(rnz<$4ywh!J@Om%aYpfNx>cVoAw1|w8l(1$ zur7OH>FdFlij8=-y&;Rm!yJph2p+Hb#hPWKJQ#+f)ai#GG2_M67>iF6+3NMfKG9av zwRh-Sr=|3ILbdwmUPt?q5crWQmJYyMtz;T1{aoD_Fgvm2u7cgjvJ%EcRenI!sr5B1 zF_5IIHzAiKwx#^PxD5(pqdE&>aD5r9-dYI|C!XdPD&Jzb#{3EpNSePmN?aFSK{%Ax z|H8_{R#h|}aSXdItom9_j+5ST!$?-{0&QreF&fauXKEzq0g;Gxm=VZ%-I6 zo<%_&RzZ~-O7)UFn@Hh_NaT$=CyzioBaa-?=b@}Q>ue8V-wDh`C*IY(qR+)D8b=$N ziqR2K{v~1zfYkkjHa%qYgBS=V{f>aX^OTDT1YEpR!W#e6h^2yIy2vek@QP998< z4HS3Aumy;Gb&y1y-GO9(<}(3EbjgA~NJ1R0MU(iE2Lt~8!FpjqaKbQo+&dzl8;*O> ze{`x~-L#!)14SPHq(E@NFyA%u&HgQ?y0%bxl$0>SBTJ+e^_~$gSd^@K;|nIX8MnG^ zX^VZiP{)@3XTy(2U(2(}m`J>Wy`ojzZo81gpTh@}6&6uCn!1w(eo_YMsmqY$mi>pW6UZI+d zKkZTWhQyZOGcc&k(NPXT zMd(HBlatEm1Pr$5Y0qCDd#nV#w34W^yXiR}~VFHClF>MFW1B7-@pZ#Hdy2JilNzVtX z6wbh?F{5mgJ+?#(ExC+Tx)wU-46fhQ8B27~8Qd9UveV(-m;%?rpbDMI7P$wD&3q)) z6CtpcdRl6Ld=|{3?DeQ*rc_o59b+dtYYWosWf7lEzHFKKoMhkAI5R&66xPbc)5F#_ zrslw%{(6`1X7#FG|PNLioO$&~A7f%8vLt@}BMJ3Y6C$ z2@5zJ%UGF7U2?H_>bP9pZ$yW#X#0*jLtJ(Fu;>3OO~T$UOIo>D##30%v>a9>G!_b= za-yNZ`(LP0w9glzOPh8$Cz!-mc9tGs+rT)MxfL+aWA2428Hq){*1+l{;4{b@BVe2}P86B% zso#zD^?HE%`*cXk*Nyn%i!8DptB}Evk=XnzSCXF&Il~}BAR{0{o(_~QR~tgRy%CPM zPHC2qErltiC7Bd<%Fb`D_vyNoyD+{o1qNL+1a-rWkGsc~xFCzU+VC%5hFMXt9Su`H zQw1i9niCN&D`=O+6$0Kral0Kp;iyW)W*P*Bi(humB#ByL`V7A13R%ac^CBN(Pr^cl3q?{ zHlDP7saZecrrmC|nLp#E&92b=gPzxDLp}q)_1faML(_GV7A0ClQ@R`OEQuMqw&b~W zmE+=I#LX(np9uW2-E9y*ppGQ<^=SRoQ~cJ=@mkRXM`3-fog3s^`c}(IGphOeW)?sc zGGNFpxn2+Qoc#A$T6l&rEcG;IcUbQ^%k`DYhcV@j=w_ndwK(;2J$18P+hpfc*5A#xy9v*iL>$yjC5vUc;XjooMP|{G7G>ymt+2Pn@gu3Yp7J@zi3@-ex@j zy1~lfa+TqOzW3l^)w*EIX7C^ zH;RRni?zNPOquK?fAxb`}4SYe3H@|5=yPp`FCF? zTHV<$gp)uAw=Tm79ul(ac-I!J)@5R?fquYY-M~B$I6hN}urCbavNLGljwD9}b3yKu zL?>gxr)%0^jsKj=l~0#nI%!R#}8D!Q)svHB7#BHP#~1_v3UMa z+ee#E(s0Av4`Xi(^Nz1S?DnYk6}UeF(`qG=>fZDdj`0xv6D)8{@eaaZIM+*?`cn`5 zPIe{Quo}3xBm!XTjy0e@0pMki+^c2#E)s|otYO?|cP9u`QQUWbLi?`kj~}SAyyJZ0 z|J3gb<6L$GAU@U5q+x7k+G^F-|EBKG^m}B{{Ebzf4F9og>W2Tka8{?nxEKyK(qK@& zf%S%WUN!^i9K~?gskbGuCx{&RJA5lmg#oYPQ8Ea`QTT!(XJgH#zkc>ULl2#H(lG=V zm3AI9P{e`!v#tAwx4^2vp3i0t^hg;JKJW2t8aJ`~=1BR*EvYk)%mGunKXnN+PeHd3a{r%)w+XQ z$2XAGmz%idH;~k?g_gnluv!bPrE*--m&tc0w`y}Hx1U=qYV3$?R_ID^x#Lh+@B6p~=Bq12s zGKJt}@}zEX6)~bGs4|1#GDjGxc2B#?VqCN1`5mrt(++zvG2DakyV7d6($H=TMs}#` z!Jjy_sc~X;in8em&VAK9>GX?P+)H;&ilS+7weUx^6C9Nlk(vnU4KTI(pc+)ACy*Lp zA#gCY(jXfYrCE>~aiKPtDh}WkhN2J<8!e%5aJ9;yOB5xzMnfP3s6lxUC#3>|6Hb1i zT!1Y~!0hlZ@z*w(fnwZa&0=n;-zSK3**2G;1-gMw;@89+~rz)p?y zAiAe?ME%7JZbQWL`MNFlm_z!aZ_^JWfYAjXw1Peu{T4s53Iv+78vMsUu=xhL3n1u= zu&NuM=h-%8UnE)_rV1Xr5lfKS7T$HOA8_D~$2_}+=%h}RfIrfGMrZ=9H)>RX|MnSs z_)|!K1o#c@9odMJqE8q14gFu5>p$t$W(yqnv|pig0{<(P{{IQ3|K>4SqUPbPqK?YP zK4Bt9CX8e!u@1zuN~5qSBrRQ_Ataa@Y(!pIVC5r;mmzL8kReG?E;`~vO3PAQVktln zrCLBMs;&K2b9?2q_vWK-{nB+dV*(-O_j8|Tf6M*0-Q<1ddpDCL&;JR6SflVl$R%P= zTcAE)L6Bp{HN-N_GRQK?GWyI`3ZA|@`wUm=#*|~qHTF!fBrF5ZoMY}8d;zr7mA?C% zn!98yb7$z8eF0he#?%vc@hyXI@JX-~md-c*j941S+o2a1kY=Z}iEOH1>>ITF2xQb8#iJXYfh3)Rx{m^Nd@1m$})8UVIm3!Ta6c z51-*{63uV+3ArSn;XC^5RI1PLop_-x(`WVxyJVl?JNE2V%Fpnfa3L?_XZ8ubq@VFK z`s`L(mi{yF%(BF90yyMWhC(Hc}l}ovsR5g;1rWW~ipDk^<8`gq#b`#}iA9`|oOP~MRL+&uh4- z^E5cgQij}133v9^q;krV2cZqwu6uzV?kroREXQiwx^Ximar?DPfVbREE-lG2r@7yZ zJw~qT@{;_6{wA) zMM#(=bDNeX1cos7Do%X8!AlXv-VN4tv}kx5Fil*nb)#0-uV40gzwr3IX>^17iL-GO zvvQi*3+M+c|O?R{#B3+jjl3Gip9Ae1D z3Ypyc)stBF&~7>VevG02Zv0x@XwT6uZz>?mE$#@OcfMR5{uCheF7Ym+lRHe-SWlO~ zG3OlfC^N~F;`Phfb&($a=>@Fk(C$U{jhsD8n}|shPRNjZ{gCe_(X#ux#^)oVA}w27 zCKi|>?+I?u1z(cJH3J@_oiW8(xn`>8Tjt={KDXX(z1uLi9iE(_2Z}Dtv0G!rTsjJ2 zg%!Xu%sb@m=&QfmA_+$DRJdkp(Wb9)n0O$rp@Hw3TEV&?u>k6|CZvU8u?VBNDu?1tbS z2$7VO+db(T@(_9N`d8Zjt7Hwq7+)HL_-Dzu&SZwOC>17;DwcNL8 zmD+DVzE5O6D)zR!KV0`YT0R|lhThwg_vnLj4I}?74vpJGPLJsK2*1i`i-DdfhpbW+ z*?pm>w}AQtl}@F>y@3<3N&(c0J+bKGttfcpL19s?@yiBVg>+FYsTTtzv<1+`HzQpb z7SWb*ERA)MEUPG12@Mp|fHcDbNIjt#il_WbI&m;oQTr)9sp@5{4LWK;)XpvYD>|Xd zU0Cat+=_Q~If&Rr^mo zLF*OkK=dl=!1PM$0Bh%~{Hb4B`m0`C`mLX>_Njb$@3nfs+;jAxb!zMZ^y=0C*UrsF zW|v~lOla&uQVk76qRPY3lp$~O*%Lfyrwq<#p3!(Hxnz8P=F1WL){6v&hMbQ!9tcK^ zx@r9|nr3i&lWr&R^uX_cj&|yug&+wVT#saAh*bXSZ9tfr-o{CK2gjNjHi z-s;n#SU_&XNz0%Nvc=6?H=ZRa?s@@wP}+4EK^iGBPOXGo!E*+YKu(D8kMLeBDp0h$sU#H z8lIR-D%B~PjDkqo5}BAwE44`}Y{uGE|Es21WilG>fS$C=9gg!Bj7SWl2k} zmnLL#W(w|$=J?(wwEz6${H61y*Bn2tvGslc;CnCO9V-527u#Y1N#~H9HO}>Vd-?s9 z@%_5mx&y=sLLKt$M$GYMs?4Q(E=0)j-mb#y$cmD){d(Mj;&o)NJCK6eF=2ceK{-Yq zQthS;1BD$qUp_2@wWODFY$pp7#XP2kwRbz z8=BX3vi&Xl8c~-m$lK5AY;Qfyp43ktOG2bOu%$mfq)Vb;9H*6w&6g8pQ}$a zemFy8RXh_2vz?|$c2w(e81Yq7L(~ta*d#xpYA0?)Z#5nF5JJCMqXx4nI0oldxBHn# zBCl#9uWz8-s-@WOX}P&|pLo~)P@`>}wcCQRz3JKq5;jnMc{A$-3P6%t(H=Tji3vp| zd`4>=1l%xZ%ar`npVxbAq)k6Vl`6{1u6fGhv34?N)qduk(j;BssL-Q6i3~W>WL4tM ztF*2FI2PtGy_MxbAFXyU-67FNW|n5+_L-tAnP4EWHi*iSGVScfTmFi4`0`vV-X&#& z$8?QyjpS0#A{At*WfW0jo@DUsB9vI36ZKFg)_d;wIKZi6lSsCtV_{Y8Zgrx!q+)wZ zC$R`4FxsqrQo*gGse@iB;|i4(PrY+k(v-uR?($_USJRE_KjCK-RZWSY1AF0H&{bjW zF_4TNy7|CK!*jtIjN%e=PzWOoBY|Uz=8r?G^qr^--)tp^#XsNYC^5z?!-)NU+g)Ug zDdHkKaZuu#46xvMws%}LxTFYrq@f9q1DZlMHU3CFsDm7GrdF-=XSYLH+wP~sj%}yp zG1kP$-9N>mT%{R9866v}r&84(&t*Wtt!VzufvqB#^wQESFtY+wy9*g^b&j1fgLGOV z4ej!F6RY+VT6X22-Yp!hoF8!kcI+sVt3NTTTZDbQz=PDwSchp*mXTFX;ck@T^?6&2 zIw0wRdhQ(aMj<4Sy&fW^f$y3zwpT^`2JHYQMkrSAj>rW2@%WIZ9butE6TJ-;OaJ| zr~*lz8BMG`N^jV0=pCEyB5^al4u`>*8Njolqkspt%(r<@pe~u>fF9!4aWJL8C2;0; z-unab$%|@@EloLn5B2R9aC*d1aH@VH1OH+)hc8GBpMcYqOo;IF);l7gVOsck$v!Sa zl7HCWGB*N7%%ne-%nonqmi+M4{4zvebw4_hybXx_j~Zxd)e@Bh_(iW=6$GkI%8`7u z1V@ssCQMu7dogX4^3DIcac_J*z@Uj^36yOCEok}IJ7^P}Z2|wsO*gzg*BpQm1%Yf& z6;?klDV8W1^?dg?q^&2UE`QD^#>Yn(p3(al?;>Q}DLcIOiCM(A|CMO?m2mWxcs4ZN zUp~QUHMek8b||`o)Ty+RNA*8#-Is+x_2(Ih@eH>yRmD-5DNFW=t8u43c^f z4FcQaX%OzolFUUR%}+fH-;cCmfm=gM+H{X5?CQKxMD zHS9*9K&fvG2C2AXs&4KfRvA>LW^C+E9hlRyJfL!^+1>O0^!$CEW25BQgA;cM*six@ zzmM})0!OJf-qlaQ))EwVN8y=^g>KOEy)6Qn%hL+b>^0lfr)Dvz^vT#zk$hJcm1-xUPJ-sU;kJ*3w&3u(n%@T~cr8v#gzN%= z`LJt~uuaH9lvoBME{~{w@&x*_0CAW76IV#-?m+i_HNfoT48V|ww2(4cc6FgCkOH#v z6p|imQ_{Y56$3?4$6(q*6%B5zm!kGMud8*w57Us;cJ)IHs}$`CUXE8IHo0=3^okD5 zMXeO)%D?El9jKT4Y@I<}ARy@9^=ZJ#Zl7DIg!g)KaM7%?DdOAns) zyFHAU`EKbf{7CSj7F@1W3Y(vLzb*seW!c@=*wIzfDNAO0q0>eS60|qb!z=Ft!oG+W zvGK=NPwwuRnXEKAdz+`$S`!we8z}oL_hON8H2bT~*pn>n?wOfgSEEj;CS31!P{O0H z73-~NO7VVt{oLeX6*ald%rsHWh3Zp-;XSV9y%YTFdzX-q+G0=l9D9awV_eJFH&A1U zlNm(6ZZv6Y%>-Y4lJz>v-bH-d)fur#Zlfbt)-=|XI^u?{quyJED0=~O znl*6Zfp??e$;JsbJ1Z%3bu;5wh(47PUFT8NV$K#!5{;$Gnr$vkQYfEKwJ?h&5%2FlbBT!Fmo!`}CoSzF$m(#g3IBP4FU-gIYr!kbs)2pk$U6oGrFvJ9;H} zNqC<{T^RT&sE053oVvR?nfZh1(Zt?>^>I~Lm)2_rVtIpOcS@vTGynllv$K$X?!lvu zuS_52^R3Iul6QW0xoM90uqz0k47sLD<(^qB|{+}mf@a};j^?h(S_n0j74iD&EvaZ@P{38j(rU1 z?$haG$xW=b_ziZw%NO%RPhKDA>AV~hUd`Gxd8o>imZ+fPIVG!3?JpG}<3KJ>YxKZ}1QsF5O32VK zmx0lO2qyWWW8;{~HG%auWqk*9`tiCtS$63woe5kD=H@1O3s-j4+GDnfjtA?^%_QsF z0n4LRlCx`@_hl=AW%HpcxNh`2r~U7De_&|$Ke4=m`(_`rO&c~Q$XclLz$y$FS|LiT3F#m~~Djn=udQ0sRh;fY?C9Y~Di_lF;I$)0hrK~?j zi5+|v-Z#m_B#iS0d4%LliVt%UYKzxM8H>;%;_<~O?bkKA?9b5}hk6y_(DK$`bUv?2rij^4H*oUPjL3zpW@#ZKoBBTAZKO+owN zu~j;imzgZGOnPi-j-^_}Rkc|+R~u9$MaF$0;k=}DTwXdZH=o@vH%`KN$vi0EyNJD% zxuQrN7Q9R*(N(SNs-(%OnpD-qQED`1j%bOci$Gt> zp}we;6HbsDQq2ji;(}Fo!K$?i)sJ>lZMdz}FLhC!5K-?*Sygq0XF)4!Xn$OQjFK5Kq~{n%KW7P4kwrQ7TZ9stD{%h3BY?~p z2u@*w97K*{_W}27Af2WX2wICg+b(ULp{BM^?ueo6dDRfT6~0B+zonh zb%h)&>?U8b=SZK)-NUDrjGO+NL=OH1Y0xQKWNa)pRC)Wy@JWD6tc)c_-4~xQOphCr zP~yMnib&f#0s5rgkw0tvCt%FD#HljV79Arf1W!BF3U&z?<4qX8ACW{NK1`l-9TrQr+v3m4}CiL`ylE5k+Tt8Jl#C%fMzi^eS_G zK$a}sxr+5j>9h&l5gT$yT!5Y37aar!O0LHxk8HFDi9_;=bV_i;07U>Df)=7FV!=y- z90^LcJkyL}%_+E0F4qj^5sbVTZjf(WSUpP$>$HU+Ly|7hDVmaL>PqL)(#)Ik9Vg$; z;P>EBb+2Nce!&*;J{ZH1Sp5N+!{G=6F1I0@9*}H1=B5L*%>do`fE|PpyvRKKRz3P5 zhQHx;5F*SV-8NJgBZ#^&#;XAcUOxp-Ag}{Y+dvjZ&>I6>nF9ph$c+P5*g^m|1G<|L zWUK+KUZm4Klg)_kdT81at2?P)occo7KP+#Ex)Jn0@V@?DC0gBzm19{YFYZ++LtDj$ zJOnZOH;bt5Va}*{$*+ewi@u&j%6f-N4#w0p{_qzn<)_=yCKQ5Np-j)mJ;vgpj*(&h( z2rZy&;!lV4Av2-0i?J#v#4pfxh*kT`Ku&}eGC}=_%K?ZIv47+g2yK$g`u`!Z03R;0 zyz>W|4b~^a=OLaa|DtFo=UdVXIOnJrpqI>DUR?%xh#5?3uh3-p#%vvBQ+~zm*nJU zmqry>iH7(tB;SHd%+BNuRL7V*ZFgm_rp9uxl3l3l=}6DkSQlc{7aik zP=H^Hca+QIKMqWvk91xhY}l)epiyBu12=x75OwPH&cyBWEy2$+;4bNjgd_h zWK%c+*twssWP)D&3yQF|7olz1dgyRqcJ&+t9D9gu??+5b6nl0-E%?t4L zhHE{NY{$t91AY%=P|j*s#ABLvmS9i9v>TH#EXDc7pA1Wlv~1DWTF@-eN|nzyR6{gD zHVy!Eg&QFqA)L_sFIYBoR*j^faq2Fd#tYt1MW+RO z@reInYPAtw&L#Muroab{cvnAq;zqrag&%fX8c+c6Jgogdp-D*@q+b_F641S8O_?#)%!w3LCKE12$cxBPO7tp!+*3 zkMakh@)r_c(#OZ(3)A@uo!r(rK>A9F&+qMXVfo2-`vnt;vD^;vOp~)ZUCb*%l1Hph zf{j#q!%b1vGc_^G!rH_FWtV0h5rm+e0B$GomguSXDynzPPG>R^bnR^1>ZMxyjHcN_d>a_-fKrx(KC1u3TUC z@v~BrOWM&aJLbifjJZWs-q;Hc&S?hByls7A9UC$ei%J!e5BHKBLiXHvx?*uNlj0-B z!*XLQYs&Dv6<8#l5bGr!@su;ASF=2w=h@I_^DCs3;t_OVAZG>*<)_#GfiaM|CaNU> z)^J2ci9;eAUG)98JkXBgk=3qWT*K=Z*I@b|rVsyHQ%&`Ej^Xs5owXKqYv*4)GIrUO)rLN51F%aCB^k<*|cw5%{SC#G0$sA9L;sk^0N6g3UHI%PJ+WR@~34 zx=e3(lrf+3VPmA6`13!UGUEr3oZhoBbJjVmFX(@ZYJ{%7D6aWApFnL##v>xQwf8b; zJIGJ&MQe~rL&$haT6p zH3P`8uCDGbHJyrpNJ|MYt|DH>Iy>9ydK;?PSDWMnKQ=YyWc0M{Oslu0Kx0eq(LiTe zHJJxocGSognE80(F>ctw7L!$+&5y)9qZq9udnuexL#r7?Cv(N&+pwg z73xp^?d!>WmQ^1JU*gg9NF~exr(}WUYb}3CNecp@&<5fL2lj-&H;L+tF@8#nrwx;y}sN~bwj&jB7 zg6035zZ)a7c^>Nb$L~SfiH_OMz%O&yj61vU#@A0cuR`*Xg`*!gM4F?9kf2UzPLLF1 z!{{L7*GpD5KfXtr{d{2Rtu-%;WwaQLHL;Im8e`L~ThrgB?zVJL!)l%3u z$G}`IPQgy=35p3eJ)bf4f?Z-_YQD9Jlv2!CKFTb_Dw?4jB7<866ITNgHx{VH#Kt_K z({a>OGgDq}J!l;DjLr?5uzl4oj5xL+B3vtJl3ae`yD&6%uJ>cwcg5dPDehr=5lFZ= zXwT3IRv~m@%?ol26&OL=P`5o0cYqf669jBCqOL&Sx_>x4MD>oLGM%BN7n~Vl`~U=w zvISm4Np`^IGi0}==aU?sG5(t(%UNeY^{Fp&)80tAhALzGt)R@O*$Ap!8&aOnSw1E_ zzZ$l`piB7f>^4Px&;BHNs#xn4G?+tzPLL$dkTOQoBQvQ*mzEOM$YXXTC`t9aQK;jX zlBja7I#{J1hOlTY)Gk&Bd+r46sVh(ie+~=iBPd`GbAI5zOH?TeyGJQh&iO#Hi{3JD zY`aX>OHf(T(eeA(rBG^Gc0*Wd8ZCtq5k-|!F-=Nuw&c)b`SPWZ&*2cV9VjWgJQ@0W zqkWg)QdAhv=@}FhQ+Cz-Wi;OcC8nYn@7EG-8g(F92W6J5qc4@`k}Q9src*dQ4fQ|; z;)ygDf6(RleKL8Ms`3SEpuL4Ggj-bGD8K^sg>pe?u^)9!x{LO>!q)HkQaMehP|Yr> zbuftt2d*qwy4_-)Op_N0B>_RJk+4|`AwgIhLRxg#w}NGn%=BhigDik9EEYjc#`0Wx zWO0x!)p1DkVs|=6;-Zqq5JGp6`q#`*=QvWTHRxtrIqSKSH)AmkHSv$;KISsd>N!_Q zHq>o`k#>Px>2U5<`p}^dRHg=-WU*AS^l@^zv69#T-)Up@-XJWF`2H}(lsgRIF$4IK z4Oo{4$Xh;c-XPT?#cLzv^^s-=F4^nQpn3cNu8xO4^=tTR0S+kxfw zZ!^Td=R@!dC+qe~_P3qo(jZq(Y!kh?H%DEo<` zs+uw0&5l2Z+YVKn@x?q6DqM{SWGg$WTrE~{F0kGUAxVS|#QY&b0=Cm~&+{)&fK~;0 zO+qECvJ;G=$Z4mvMl6dWQr8JKB+}H7(lw2sY818^OQVP?(*oNSUTIhXjmeA5I$jF!R+hkM-_*ZoxJWInL*b0@|q!1B&1?qHM z1mmq-@N`fFy6BaUPZq`Sy4T#iHU`lnryREo_2;b@)X8W%5)xNPD0LH zcjmc)*?@!x9b>^@OwgA)j`}AsozY*>>b`KjJ<>147yMct&~81jmw6TBA3m=dF{|n8 zlm;W|6rwwXuY#X+AxY}73iLkSCx9iE8{XN>Ut`}DO>8lm_`tiHokpA9?DSsr5T6&0oSC|70K=!ZMeNt38EFbR@9UDwh} z5ArsS9EFR*+uDxu8-iy**?ACzW?rP<^>x5!FkvAm7D^7Pa$d#q&!1$U+GN>-NxUJC z6?muIrwJe#x>jA-07WY~-;`yyNw% z3>A*D##vwwHoIe3j;OM+8 zFQg?ay{!R`W18*R<^`Ry+=+K1cXJ?Ei&u{3p2@U)|_- z0|x*Qg9`w_@IOc)Ie9_B{|;cxXh6E_{AR+qrIsyNki;A(@Sp)f8cP!&5KL(74~SuD zLXV>+z7ZL#`(}Dz#h7_KPLEfLSjb)(AY~);8w5pcFj{5`P++VO!jUEq3rJ>>S!ODv z0$FAbYeEDlgkSjGdU-M@tR#C&ey-#>?{#cx{`}2zs{5L*FdmDr=-^nBRbPbHeI{nl zDaP-zB>WD}%5!`(-|imR$)hgtP5hTUFD1Nxzz%(mZbwznmONi;pI&6YM4zItRpYj5 zzg|pL0IZ)j1o|Ai*l?O)+Eo&&-s@3TV0E^u8vV%Y?!4a*XUWZRYwAF2!C3O^x3Z`g+- zWnCth%VBJ#ddlkw|Mzllac6YOS7es*c6VKH=&DX1?R^wIb-@sI-BtI8m8fOj^;+zn zM>Uw$Tbm63+P_#ND_MS(zsm)GQ|3vFuKeB;n#_`4XJ^uEY&+iC7kj@GZj-F5dP{=o zvPB<>pd|&RypGf2^!{E_F!*Uh;5Gg+KC2DFCU-+66=}-aMFW)@x4yLU^H6hVX1_b6 z4cTtrDU@(eR_MC4{=MorM*dZH;#aHj!&shUFtGHhxHcG~{fycX(Gw+&_IjklaqE)MJM6*bw zJ);Ynu^|z~Znom^#pJRbylG6Bu+Uha#0ZL~&z%rnQ9+y;T#Hxy_^Bb%c|#hnmqnUUL^JFR>R;oML<*s!f2+xxNYC=FcB!sb?t<%Iz5 zFKxwfes7wYdAX##py3+Wp`JcIq54E~BXJ?g3b+-;uu)UmR0Mo+pwY^W6AD=!Valj( zX>+~HNmzh~VfYtoEKdYyq8V#|99g>HY}mZxgBO1fbaYkr0+M!)8XjQoipo%VPsrG1 z?7cm6RACp%{*;AOE*KGXTS`b4PF#hUFV@n4196KJa1LCob0}inoej;5$-tOc%S z6&yuCE!~7Dw-p2vR}uL#%VEmA8T+IEa<}BgaN*$dKkmS_M6cZx}r8>$4e-hAh^aGH)twc#vth3BmB64=gh!_A42Nb}n zzilJRmbp$V?n8QHb+Q$G?_+Y*$jZRf5 zQ48)yaV{qQia`EmEW~!4X`^LFeJe5I%2Ij61d!qZVv13L`1^$y9+yO$=P=Q&T0z0x zA~fD7Uk|{SJU?|Dhp-BII5Y1dO{cWN5qMt-k8|+tV>p(b)xx~bws&S0cn9YsvUwBB z(9F=b?(_`jwvT@a={C*DZO%4MSr?Q@j`(tvzc@?%)tI{=@m$YrfKQ5?`#Ih%pFBAT z?LXOBR{%2H3{+rfCpqZKfBxtxe-b@Z#!ljzUNP1du1$lr8Me$Bquq{En7ope#}UtM z`$Loxi+)V0>|J6>oL$Qqs)!*Ke-wwWF-yyEJ>q;SuMIk-qe@wOQLo)=?}M}7W@ktp zT+#VW!TNWhbcCNswG~CAPLsw8ga~tD!j4khxi`uqf8Dnd^7)f^`9J+~*Xjnt4O$Do zp`%$2sPA3a_{0vM94GW2kL2L!N_j1KM}a;ebc5>hdz@=JK7>!rygF_QIJLDOTQ_TJ z@Jr$_wHdDmX%=3g&T5YJT$8WG#}$!Ou&}=-6&*oz&t~J1hoF3+$-Zkb9YJ?|+v1>H zeo}F|bEMj}QQ$h`y8kg#;&GV7ih5j=`@RJ&a&W7Phghg9QGx>YQ)!8zFF`>GUgqOn z76V=u*2J%0z&gOjX2>-;CKLX4#ES8aa9jy(+7iw{130M-}WuBZw=6)SDFW(l2uEY(+;B&HXAM9YiE{Z(YK`CTljpU~>J}zR^ z68TeE3bLXQnVKj!)2v)LZ^l7lY#s?eZ|e+kn>tVG%uRyr>Na0Su+dPL0VnLZ-<5pp zf1HfiC6Qf-Md*;{P{9(U8{iUM&@~$t<{wx241QL;81|$zA?pS#__NDg7h1{D9DHWA z{?{7omX&qe+_D{w7rb}MM+KJD{G+^;4lg#$3z$#Kd!NDM9s7p&@dq2QH1j%i!G}3s zxJio0nb_mcrf>a^&3qT$*$zzcx@XDrpAO5Ns7*(HlB|g6Z{Ekv9@6`x@RJqM^9Q`T zxYT~?FObW_g?Gz^oiy~EwaD9mk7pL42`2oUu?5kyOAiY@-n`alo&Zj{MHd(5yYzw+!4Y`E=|pKMv#}d>Z)ZN4*3WYxOQu`54~p|5RVIYl*{G)@Musn-_eW8x zL0K(1eIV?-d@xU@xRBp1nCxfqXLY0@qT_XQ0?zuPm>;cET~_x8%?vkKjHYm8Bmj1PJsELV0*qbAF6%#dKJPbUcU*iS?kKso_Y0)}X-oAs zj=31i9^lVD>~W)jOF>fZpXty2Gw>u!nP#hXSiwD}a_fFJp*$FQQNOX$WfUZJ4rheA z#vxjwe%7H{R-u=tX(^VDdDp-M>D!ZK9-!5j>slDh!_3XLp{+rswb?IH7UThHG{r;> z;j<{JD)h7Qde!@!{d`v=O7%+|cUX{3L9-&HemX#U@Ns<t3 zOg!f3k*3We-r=*TvM4As%amFcJsNVthu%_=YMuf*6o}cWtVf2>19L=Wupn^+O_&2r z1}|<%10n6yxycZ812dnd8BKzjg=GXD_fiX{c4_mTN*8y89+u&3i%ap7lo43{AGg9M zPD|YJf-@*O<)$T?k)0@%^YVVQPG7Z z1vxxIY0u=aEev7dV`T7$0`sE{MEW01o;OtZq&yON z^>qpfJwQxdq5V92zzP-*{#{zT?aT{15uXQRDpKHqw|e!3e(;7P{g)jdwf7 z2i|wT*t)O>Qx4L_Kcng?5@SUaDo2e1*D!MU-Vm z7sZo)ChPl1u%4YFpw?3Q8{977ynNwu6);4+-?*Q=oRDKflS{ivC!m|WxPQx{8CCsAUBC~3w#bWxd?KT%Kd=W39OztXBPW1T=v-_ zN`_uR?p^1dT1K#Kt|`Js@3PitI@x3w#4ej8@GkC z&i70;_2he=sYv)?iK+F1R6t|umfoh7-rF^y{yLB;f330sB*)D(5bP!=0rut%`jTQf zKVa#YEBb0?N(9}M(PnEC>H`GQE0wrIrma&qD|L(A9KLizZJ6t6&|t#9D1A+QC5n_H zdHZP+HGyP*!beO?iM(fijDP*y1?VpIp}T(9X~`L{X&bC{^`G)qf?>`!Kw33#ScJ?7 z+Om9P}xmrTEyQMO7)=Tkm&C)k{WgKC_f-Jj8_ zx~F>-czLgjY@8hv;c>+l3L9#uoY;AvlY`4j_H!icZ!q}1z^yd71dxgE*Ycb!e7g3Ta+|*+>K53S*laW4ii8#Iy8y(*v zNuXZlBTML7lM&EnH!yiF_*w?!<*vk)5MJUi7;Sk@Pi1w#q1fq=97?o!5)hjUp=HjC zxk5H$s|bsevBWg~b=$+dxR>B#wvxF}t4obNThf}Hc9mR?Uv@GbiDv_CHYoSm&u1$N zS<)iI#G5dUkwMb7ZgAPNpf_j?4Y6epyVeE5!SEz2Fzwn+8z{!b64FaA--!> z_`(C(rsFWZ8P8M>@?4d`z_L&&n~_-@Kj}c>Q084)(tJW#im?n!aNu0F4{P8mz};p3 zlQsM6K-b{mh{-TSbwUSFFQ_~9Y%)zr>!VSKs^Ab{^7JXNVb(uszS|@#CGFhPP=WBq*L7C42t} z$VH}j_E+($!BG==#FF6I)Dx-ZU%c*M?>MS1;0`)!+4@?a`v)&!7lLj%pU$7&6`qI` z>M^&elk(v~<^;BkVCspQ0o+UbyS5vZ?MN&=E>l_Sdxh&k>fmf;{+m&6Xf@ShC14X2 z;88-0!F1B;+}Jb;PeGfFp}Hc4+JYVoR4?EisUaYTV6mJb?3|(6(aH}|@ilcEmz3Ds zBE~ZdK!2#ySb`2>$D}iw4|@#)kJRme@VX-17utCC!##(fOE>g!^aNE8If8}|vux7M zU`83iO_{25dCh)%sIJdpVp^tm7b`*9f&`%4DL6wq)KS#RQbl zK#h}1fq?D;EU8UA>y0@Z$7^Y?qMs92K{cZ(YNY904@W>T|E5644B|>kv|{qNnS*~T zE|V153u|n~KPXV)6}t|1(w@+;4gVDm|F|eC&pb2nqi{I2)E-T1oT4=le8#9LPHK+L z?XTeo$>*2UzG&WGp&9Ipc_eD5e&7bKkm9&G@me^j1Z?S&UN!?fAKOMQjxj)!dnwuo zhFZ>uY#(?%Di5ShS889qoh*@escO8G9woN>QOK~#I`XJ2HMaoejRO0N!=Wbto{oyc zPv|KGkBfv;HSk)$-ww2M3qisz*GyF7J;qMlAU=Zo_Vo8Op6@nZOnj4Sa6-0BU<(Sx z&?sGnbNI9PatKFKwZ19plxTLYAZS{h;nD%4!MV;r<(l8_+OFiUlD69&XL}{4@rhBYF6VYI;bq z3A~wDdmI0%CXaMB91Ng1|lkkZLzltyC;U(^I-W#(jF2;M`8s{NxGyqC|4M9rF3b@Ls+R}GY2;(674iIF1!iK?wOuNC1D^g8?5+?6VK;RI9AvvcQW(}q9 zcDiS%NL`r?o z-+yA{_*T;kC%jHz!(aX^%(oCePJCjr4Z>(E7 zhRs}uUCM$?tXC~)(vFmg(iFUU%PLagH19!++?Uy4K2dWdtJ+Bz^?E4TTB!%gS{52E z0Hh}?(36kTSqIviv8LZ0I1>3``3)Cp@9xUX-jt0yARd*u?GD&1JqzFFo&)Aq5V2fa zl2xtJ1V_um-xSl1X52Y%@B-2tgu3*~+A5?af#z1a-qcZ%^8vuV#gAt zqyHFqfI${9OO!rqPalO~r`vsAT2el8qt!0Y%rj{b`+PZ57cGhXK@B}fW#%4{fbzWq zL)X@0bp7TqN54KE_()-+^rDvQOMbyQ78YDs~7h) zN8t}6p+@fN_&gZMfSEq1eY~$yoMQ^ezmA@^?6rR+*La41B-iu|@ZpAPK85S>>Tcw_ zzm&Q^F`2-Eor0fvigWW{r+(n6`#!Im3&@8~KqRA#%s#{LD|?%X?zfFi+&PqIYAz-Y z<%Wa3#?Lj84}-Dj5E>Y~`pH*3B~0wlsf*%&>i*B{dM`vmtc)yEovCt3U zTPUYpj`nP?;M*`yHbbRm_6#2YtD%)GpdcWW43T!0Fb@BQBR9|&S?dGMlx$Mq*?E!Q zQON!sKEe?su^|bUOcFWAH&h?nEjF7A>v27_+N%8%Jso)N{TO8Uwo$*J1~7{1k|{RX zI+zh3nlFc#DuJf}`k{XQW&cE|%ooaQ^4uB;=(Qy2nb+W)upUWbflCrsnEr&VZ~N1Z z>P8do$&M1iED4vv;R6sl$tht)@VQ$sJ75yl{iswM)Bm&_K1|n7zX?!H|15@%)>xFQ< zJdrN*UIwrMlyJqB{(XIT+iBh;|2ZJwOJl>2wLYTe+j&`}@b!8*+_#i#8(deT(GbQT zU-=&e3a_wQZl|(-z=?TBqdshJRC;01sPPF;egUg^GAOm0^AQb;&deX4g zw;^Ht#{{JyZ9B`4=#|lAZ&wcG5IS1!AImA31k$2oi5{n`ldr|wNLP;{L5*lzm< ztNp|n+Q9=AN(yI;a{=e6-B?EC{`wrrl5JTsqC|XK`H4)__Q~hhse3akqXqf0#@!nT zNyrcHzKamuJmsz5e(6V#OcN@(l-=W#3xO(W(xzDavr zwde_miXDb&s;|ec1Pc@;^}2{>H}Q8Ixo{ox%g>;u5mv!L?pved^^yiq>@@i%aO{1(r{$e0F1d@PDeHWALb?(XI{wML(vHMopPHp|>dri7iy?ceE}R6n*s;XVKaj*@GJU4k?{Ce%T1ANr)0ZA2xRRzp zRAecALp&!}Zm(cgWB`eZ*vmByM$3I3G9X~a_cJGPKlf%~;f z#2Lob$}!yCJs19fmUPeFHV@Ll>nAKBC7j`~El&2!kRKK`o?u+03lc3l6_x>s55$@m zYS<#I2_42$`||k36f#W3WSW9!WL%&o@-TLI+QBYZPQGL^vz?Sa*ulGJR}6KpY>2%p z!uuf{5KQteLD^euv}$PAZFQdTcr)U0vO40)aaroGu(x5EfZhFyZ#yvHPEh0!Mfn2B zSmPqK!Iqnx)PqH3Gwwe?vmHafR^AhH-yzz3A4102QEb>I)sL(a|H@D&D+hqw9^Z~M zKFJZ$fiNv6`?AzDnT{ad-7MJ6bI8(u^F7JdPUQf%m*;U3^Txlg-(Axg6r;R7aFp#x zE$p40C~=1EE%{%+I@#=^S4==#Nd|_f|6hyZpI@EdttCpyS{6kB(Yt}R{nkT)Mh;X& z2i$!01B9^q;EcZ@BJ4Zp`)=ItWnv>qE7~s`K1^}%2;=$)He#42PVs{9#WqHdkB^zJ zxS2nG^!f4f3Z@5pX2haT7XIF(Ic?h{I|BmR)+jKmHZxEJOWrggMJ_h?eFiD?DDoN; z1$A(4+Cz3maMu=LU3F-+-k_nGwQvgtwe12>Q8LC`le2u1Ujf>dW7bjfmu zoUO~IPXeQ)>MtQVYR*Mp6Fc_O(oBdt>Z!u~E{e)bY|ty#5WsmBf~$I-NZfiRI8)o4K0WZ7t5P>D z6jL3RT^9&q8`cJLCRsL@sW^cB4wPd@C_?rE&)CvN{3*Ln>-3Ks&)tuvqPYi z{KPe_VCE77GS@D1oUbd9V~60t#f&WxXk{$!cbYY#KwUWU?DO_?$jVsR4ndsAVs3NrtNR3}T?x3E*re&?qg1&YFSh@`T-BFAq4?g%o|ZbT$@@uK!v5JZ}v z$?yGUz6AQ3a~ISH$e_tH2ohA(24~&y{q?OAyoVR+1-@}TaQ~ZY|MRUgxBhjHyjf zAn>=OQw7o#xlzK)N~nJ3e%NMj>YmL-d{B!O;&POqLI_m)_>>5RAIFbZZ-^=K6e^u2 zJso$)(i|r;&(`>S9(K_{EbRxPG!dx>x{*D>wr%467@>I^OiLcBi!KLld<5 zk&B_hds@`K50K_D<7)Ac{c&(Gb2lFyiL5BOvIjVsz%E*PshB`u{^2t4#ieM;HR*jB z5l`Nfyz1UH)JHx#tJZn65+0A6gX*0+>N>WRuDkGaUte~sf!?&Hw1)VXU18y_1=p!e zCax_LqHm0;G6TrdQEw`i4Z_qs5`6RPts8x7m$5&ayX(>*9ZX6c$B=}Kz1X)e<#n!_ zFct1L%%tH*dsS`)@CTYed@`;UB`qi;YuG) zH}&mS`66lB$*t%kLxT8#0?YDBdi_kr0dYJgYXXifW><3PXMfqjvc7@rxCVSb|BfdJ za6iMGh#^L9VRhVwcE;pNPN5tY&OM2o6H9^-DuU>$5ks1M4iAO|$vcf;20|sjy7A8{m49V3<8Ui z<{Ko7Bjty9Tete*HQjYs`0M5}hdA@)%<6%LZ?ZjC6_K1x_|~mGT`y0ztGz;Yqw)6B z*|Fvz4x)-*-_mtFv6fWed!igcScE{~JaR;_JN28J1apX%lb~duZ>W?RV&Zd$hH$@+ zKKppifN$_n(TRb8-yKGjdA%Xey$hrRXDVz#lX~a$B}itfY*CVCtMK}S4uY$^(0fr= z-HPsN7dy>Js-ZA8Og~FgcbKFYec-L678iFZB437SmZ7jZIheNicB>v{Mw2D)=`1`? z%AwgSU*68FW(F!vekzqJh)D9Lj=Dh9lM%@089cb0F#t|B$jE0??yi{R z&7?Ju=NYbm4cL-_UQi_{IpX$h$8b{pd_fhrNnKxA6>vEWHqRMTC9M`0W!Xs{%cFdb z7b}pP8bL0zf=`85ETx~zpg!Fq#)9^K;l6jk_xu)6{z(~LvkYscPd`&*{n$ErnlwnycXc9*2 zWTR&WuT^W6Xtc!U%wplna;Hf$YKmE^GxhUD8Zf1)&{*e-DG>Pvk)H4WPIATDw6kUqHHS zFg>2byKKqs59(IK`1CfOyTWdvz-}_b);gae_cv)O>BpFLwHuJ$hOy$pMYq3=AQbM$ zkBk6ECIb6_+h5>@8Pb<89GZY$;iag0o;jJ)Us)4#BmKNk09?G zw;0-y*%VL|q+?aU`SsK!2$)=C%8dGoYRZi31Q+{6&pU_$V=vW^-JP&MVXQ7AYh8G~ zHFQOdoGi_mJ*`GPa!ZDYexQ#G7E!rML$?Z_szdgitu$}z33e8fti(V&yT^uT_%O4p zG0Z|e#j7d8jIxy3_Y9HN(Ce#VV3D743zjPit3CqCVz`3rkbRWpXOX5aZ$C!ZRSLbo z1_Lkc^j$|P>j;KqpW7Rl()mYsn zWz?bn^it%QPIu^3Qa#OjUvgZ!^BO0qB$wK8rEG4c?k0UT31(>=Xda!nh=~HdmE8A^ z_|Lza$KF1!QmNyt#X*XII^MkBKI}{QY7&Rb!Vq@G>W9nY3iYm2QkX?;@}rtLwnO9g z+d=t9*4j}k6ZR3&uajoU<4Y{*thFhl-$iRB^En2OO~$P>`KUAYQoVu*oMLOgzZW$j z*xUPoRF}|+bN_VuosVlm*CjlXqo;yv;Kz;qYlUpwf~g()-Z}9z_}&F_cDJQ)$_34u z@p@ax-Z{o|;@B$|Z=Z-~;2vYdr)|e)!S@%`o86Tnv^uD?Zt6~Y8fD+zxCT$|X`k+t zYd!|AKA}I|-WlB)*X#n8Uf7mi;Fn(L+#jH7o??vdKBljtsrB5~WZp8@;I>#fat?`G zC7Rw{a<``Z__VnCPNu8RyQVcuo;o|lARyE-J0(~3SSYm!*S;DwUpT33*@tEFrEEeo zbYGlrFycMG(l~%8*IlQV6K{cAw+C=C&0RTq)y6w{HNZWY!8+Nv%)JgX`366tUzjgu z;|4M!4S(L}vHHiGzb*;N!Qn*bH{czq3)3CPwp|f~rVnSX!3|ZId<9$4K*M8=8_VMm%?R=$pFdD22 zwOVbUS%$wXb~<10GXQx)(VSN|XwVL{Qt85wkPrPLKV8)lwM;qomQJ1!Z;#QFvNz@8 z6&rv4B0n1=`N}LPl3E!vywt5GodAxhLS7%7PVc-~YFCq+N4ERQeL(~A<3qJfw`efS zMc?52aZgDYJ`J?%Qaco#E>wCWabGd(NLJYa7c??MIlneZ#hjnrGVyA-uequUa-O{H5K;H}$Da1QjRX+Lro;_t>mZIcK3wtLrx zYd2|jYo_kvL--7xwR_H$1J(u-meJY*)?KOGQo>!gc>t%|ckO_+LE*cro!6a95sYy{ z>HvSJ)C4G0Zi?*yV7hW-M1`W+x%}EqY@hbz%?geb_#Jpgj`hnKAS)Jv?8&_(jb=qO~ z%bsxEE(AUAz-pPd5KtE~=n1gkXALlfD2oHAI@IyzWibhc?0QXWyZ7xGfhaT&qXiffKnab=-+0L+__3XDU_P7 z>C6eW@9I-)&YQGK4UA&ohkxGCh`Jym_W!+Xau$=orR6QHHE%Ha6T|R5V zDki9y4Vt29)!=S^zN73Q@!8PZJAdT3WH+LGgW!Y7d39Ik4)MT6vT^b~HWn6!gE1{x z9inCyp6s4#5D|oY6;feo8)o80lDoQFBjqtE@$PQIfLO2Hlea`|@cL#1RE}I38N*^l z-{hyTb`39%oO@xRZ8GKD7i;xtxC93;oW)nS0fG*K1gQ|s&RGfs8 zBg_$vx_|`R_@p7;iuM+aEil8tj4_`K3J7TB5%$h=JaKe=E2auAW6aOYg6Ie{!YTO+ z^G?)#z{!ALS~JWO(wMN2csRJ~yb^KZon_~x9SN!xLc@c^+Uya`gZQ%G_h3<7D1u%~ zZzfhn?u25FOK6{1_U`I0!`RTx1zR(?9|+4zOe76%{S9J}SZ5APFGMr~jxT!`7W>{l zq=R(~h*wuj7CH1SD;ya^keBc65PZT%uWa?LGCWm0K@i(o4I#ueV#LA3oOqW-z%&rB zJ-a&)t#+9CEn=*U*|H`w8hgQ1lVCeZ{@RmhyVE$6KS*=n$CPtG8x69ST4Pf(_tN?r z=DrmZS|9^cqtD9@tDOb|Qb?9e%mL)r5fvXPSu!IV-^&tEc@tL1u|QzL>KTP2C;Pnz zb;1CT`LHlgY{71J3R-M#xJktP7jii!H%oI(P4o9<-L3aN*S>sL`@qFf_cr!(D8b;v z1$XA$M$9?6!=1#AZNffd!KbGPNZBrExK~gD^K-^$#eg3m^4`eVGaEejZwQa14q}(? zL*r!4-($+eEs)4WV0(vuLc)iiK6fM;Q7h?=Ik0+;-*5x)5l;!jdH3X0z9reG%Y!B) zk$w-Zt;WPYqbn~hEw893<2B(AQAi~mFaA}opCpgg2yQK~kplj4R{)L=QBn%Qe&qp7 zdTed4r+Ab9-e0VQMu8<4S_GvS9Lap_v6U!GO-r!TV_-O^`_1G0R7}Ntg_i;+>t!7owO+79Snl9razF$qO23=%P=1&x`x z1;Y&3qUvaDb4W2S#Wa>NX+K29L9`Fn)KRK~j?iYhxS3}{6Y&S;We9BdgR3~eCqRQQ zYnBCRG5YCu_}aGD^Tp^Ns8>g@?DZ`zIf2ax^D4^JtCVm@>U4F1qT5yLY`Eph#eOFX zHwaH-QbtMWGum0c?!vdFLI`TZ;UG49k7qh$5KcC+#emgRXuCV#r^Fa_t)-%=#T#K} zfc2eOIx*C!1-~!lg1HatDD&m)cv18v)j|Pgcp9w8BIaIWD5>8mK48kU3i5*lCa;&C zzeiD6S|U#$4WlNyar%3)v1wrrv27>=I%~)H7!^B2k3KUvJXC``g|V-F-15RR?~609 z;mO{VCc>Gb-Py~IWK5`=Oi*t-X_S3Lft#gQsij=?7|v>2`iwE_{e?Nhi@G&2Q+$Mu z<=wF|C&_r4^+OW8xUe(%gjJ!O16rYb0drbu{a zD>|hI=(^PpR11w}jvPv%UbVG_ zkK$hDHH`sWHj*F0T&`VR3xy>DEv`?wtfa~yd9-z_UBM+uFt1t#nxQNGSM0CFQ5MQ? zRtUqqOi7xA>3cm%Z@pS)ao*m=&%;`DC`TSSCdsbI%T)@7W5#L5iEFhVBC1R;D9OUE zCxckD#i=MXy5e0>9kF-yJJm{&Rcp9)3s}zsc=-fI=Y(W$LM**#QDKg}S`O~N?${zc z2_o&5AL1<0MbWUVW0bMw$7M#9Ikfbd2o;`i=%UP@H-!7L1J6bxncLuZsI}=4DMK4D zQ;c8Jr?ycpbWyBSU6!8r`8Ux*3>vg;G)~c&qp}iR{RwRZW$9hEyo8-b*w;mtMq>vv zahM#+`sU_|o$J%korM(HdAQ}bt<@E0%~Qi>Q&k3L3iT~x_*Rh4ZCE}czEN_I%vZNn zKB=xWcfurnPu?BXHeAshDBE>^g#9X0^L8woI7I zOmA4B^EBba+H%F+K7W!RDHDeqP>nI}5H~H#3Y(TkU3^5x6mo4D1knR|dzyJ)O3p6( z_|){O(#$-)C%bQ(w2bT}lNI+`XcDz%t5?YHwexJO%zo8r-X6dZ%7Sr}&lb z;x7I4v+?pX8YZAKP*?p*)%<0l;lbAIRTJkGhaq%e?tbdZ+8=cm=V8?RmG~X}0YzuN zX$^cP+}V^OGvdbGIn+x4BWuL&E>jPBWR~tZMQBLbY6*OK0ne2aAOMag;Z2Mhspoks zdO1YkxEj{O3}dWHEADEn(iGfqdod&-9;cNOGffE=TZs=_@hc2&*LsvC(6}d3@F9W- zWW0+W#HFq%NINM2>D2Xe0+Mnq{4SrT&oK)sT~IKvVtRa^H|6cnkiT|4_fWtZWRqll zVcLS!gUN~qlNkzNq44!%h>BEzA=alh>ix_B+8}_W1(~1^wdsRFwc!wd3n=o-YQa^6 zgQw-NC>G!?K5A2OCCrUcV+%9;-lMzW#d!ww%RZ+j${^{5qUc>Wx^IOgIAqJiU!Cjf z4J=h0B9MuPU!No&WB*Y*Akb;$s57+w^?;pxee+#0^Idn5r$qeqbdKk+exwrig+&bH zU3Eqds{JnpB2^ot*6*34@)bj{WAvEm)FWXQSJ2hS&k zW!Rb;xsJaCoSh90zlw|)y557oW_2w?-QC{yLbqw3v%@<&qKxCVgut8fVRw78#6K5> zkfwCte_mbfTSK}82EiWpH2gHK$dQ!8yJci>&-eu;Ea$BI%WfF6`NWTMLSU+8lpw-( zEbkezMk}P0P3C*8lq;V59ug%RP5~nFLxDP?}&QA=@ie%07 zVYpZIL362jE2170p*`n9gL-|3Hkj&);v1mgSoOq!{QTJZnkiOMAG~0zH!)Fu(Bn%G zy<4h-ODf7<&TY+{ekzVM@$y4FMjZOk)zFDYsBT$;=Wxhd(tx2xJ)&w&QOqO~4c0Ix zI?_r}Ne&FT@I~P_)m`er6vnOTvjs8y?d%AsOjVr7*hx+={V9!|XTjhC-Oh-U&wW}X%pGDMAO#UDiW zETvr{rQ!n{f995tlt7hCi{+x65LKk81DWL)#37`MNFx-&DEu}6<+tC0<%>gv$!j9^3TCgbS(e4;hO*_`iCAYY!AAU0~`QTs5n59rC z%2=)8_Bc(_JjPN)^Qf2>OHk4N_)+^S3d-15pOy(X|F&#BHBkwV{18_cAlNYFelO)c) zukd~5_WJanj29Nzu#zMG*p@}diea8Na4T33yQZPvcAM2-BCrQ{kVH5zQ3;q;J zH*2a9T%^uzu{dZtCCnaC$#z6U3U_Z(a6&d| zOjq(b-ALpuYGVe8I6;?u)t?8?-?8A&m+OUem{;ImK(?|+O>Rm)lpwDksvis8p{x#S zSrlxq-iW59VV_ZovxJ~WZC06yh*3ienwK}rNwbWqcA#q?(`MUmgxzf?ZOI=d zTM5@P;m;(EX_GNFp)0n;gdube)~5R8<~PLkB3@X!Uf6D(piTFQ9@si_D??4XyzN<6w} zV1~piIfh(M5tWWk+J&4CCSg@(HcPvHr#X|rw27`-Gy~3-7qE`RPv$X_^$c!x;E!ap zrFUfEdI`O_C36`3!SJmsQ%}QcY|q(f%LcdT5_-@{fZpIuYv-mp^@`*%Dw%yhJn!M< z;^DP$U8;XZV0%w}EnkU+c{mp-V12n_t3#2#<$JH)JW`VemBg@={ixU`b|9BtvF3yn z2VenknBI^aPku^d*)&h#`DwgKy-^Ny(nk;ToU_-2>qM;uwDHSEN9Cy_b;zd25n?~L zQN3mu7YW%o-R??`feG?c7`v80BVF)~Km6smuDjr@o(? z5~z-n>_BzEa4s|!!xwsO+Cbqqqt0R1z->3i&lz3hS68C)&(XPY?lzF02`l>A@2%U= zxGr4Uz|Z>d+%Qi2S}&;DplrLm>OAOq&U$;B2z&zXwy)d}bqAp?thq@PF7)HVVnW02 zizs@Fin?v=8SzoH-L%?#`H<*0p)UZugx*niVU6cl7j)UEpEhJkp+6-AZ(J$hze=S? zk$(nw3TOnps~Kw&P@|-}Tza3j{J$^&ND`_FHj6?=Lgu+ayKt;Ev+E(>dXt`~mPE;xzRAKoczV zv!Fj>hDRcOu^h|$2yi}+7D$yICeSYv>aTtut?=q}fbtSdxCw7hA1&6Rz9D0eu`4Gc z+f&+ik{aP28_6D;!AJnZKhVCVK~oUt|J3JN9V#l*g0ug$IK6G z>iM%6;2L^DsiNXUx#DnpRJn)wG=?w#u};LofCvCpMs(9q6gPoRNM2UkcAwBP0FYYL|J-&^mrQcA6R3ZRi zK@cp^f(dWK_+}tHjzK;$_<#r|IgD|NszxHpaMObk{x;&mPEg8MRRrFX!a*L%J(cc~ zQ5ID%j-sbH50ko&qzozHLW>b1qhEcIvT%zu51bywRFN(-y0s6sO(t;*pAqE@z4kmO zHA<{lhnsYQaAJ3hEAP!Z8h&oL@NjQW-ZV~c{L0psM9P*FRK0|{rH!T`8 z+0dme^=iR33YGB2KB@~pHCjKjSS^F79dzo?(_5Mf(eGuckoG>{SF2n?SJuVtY6>Sf zMV(9BO+N`t6XBti&p>ZBQVnjae0K}wWN3E?McAOJb!dZSHAy<}lB#vs>2*M9DF5Oh zE;~pS;`C01qkyYy#J*mg1DGxnGs!R|)kG!wNIXFF`=XEs8`a<{(P$YiRDY~aQg7Gq z2Br4>JpyEQ5BA6JIfeH}O3}*d2a2M*cO|&G;b;xAcG;D4{fj1s)FvFk4sGb>4mg9pLH zxAr7NMw06ji6vy~7Pn`NL{H(*U6jghhmh=3xjg;QP2AAUU5%IC2XBU+vW(rPLern- zq1%CO8W$b+ZBY4rhN$2I+uhfJZzPu1@k`If{Ff;V-=?(FnVm^kL)3!zQt_TyvUtxi z0THJGFl%lufw}J?ABJi^!EuthqDEg&NyDx#=FCoTFX0tm>@JQ;tq_<8+9GziE~;XFW08)GM60-`@;{%Z@M z2j4%+&lbA>XyIt<>|khYV(VaP{Fl~08H#`0|MLnw%J@h5**faqwD$Oo*zivvZ-48w zP<%g(3NZN2)4SgfLjHg$@ay@{AitzTGPW_&cle#E^ydhF*Q$+SVmK-q2#B8K@6?Mw z;Z1=9{;89H9^pUwC}eAGXJzd6e^iYBf{#_)6MYI)wi%Gx@$)(TQ40Jnh4r0`e>v^?^|AhFAo(H# ze1P0UARwH75!NRDcZEqByP7+i0hu=c5{G|Gy*nP0W9^vVYas&)jam zm!BHLi29H6emk=LQ}@5ma=+$!`va@MPyT-({W8@VI$P;G+5Vf!?%yR!`csNW{D1H7 zKSg-`_p1LjT~EZ?iuoR1N%h34i*Y{fhaki^!jtvZMbU^XCWV4~LOoQGfL-_!HG`{BNNC z!^_}T)L)6{f1)N${teWB(9(ZJ{gtl#Cu;xn|3>}ymi#Lj^G{5!`Tvdiuhh(6`}`}j h<4=5<)xU%PFLM$E@QV!sf)D&L04_9%Z+`yu{{Yd<#Yq4F diff --git a/lib/zmanimAstronomical-1.4.0alpha.jar b/lib/zmanimAstronomical-1.4.0alpha.jar deleted file mode 100644 index f463bee048604a30c476efe69043709aa3e2f035..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32437 zcma&Ob8u$ew=Epo&J)|VZQHhOCmpNfj%_@#ZQHi(q|@o|J@??A`>Q&2zFo6w&)PNS zu3htwRcnkn)>f7ShkyeCfdK(2=;Vbw&lr+}Rmfa25>6{Q%-S=L`n-2y+~j#%xUy zYzdR$aJ-J(Z4G8A@-+Mywo#5*)Ns*7{R>KXy*08)!R4Zi0h`I3+Tj z866@U=3?A**B9GH3dp;UCCQYa0wvNugDwvW|MR8Dsw%9C=I`!~dY zHU&@X9UWBAl#fhT+J*jom{Of{u}z=8vPI8zb@>5vVVKue@FW| zm^j)v{8tgo|M>{9=)u(AMRzK*h;U){?YBVyhHMZ=MX2Tw7o-waR6 zqhcLe>hI#E6^DgcC)0)44=4+f0KzZ-{WI_&*oN$>DIfmqIWY$Chft|y7A&TFJR6le zR766TP~nr$+kx-fgLr{l>^KkPX9On{6az4e+-Psw+To>QS$j#$pL~9jexK8HnBW9t zLjt)39l1ONVncY)&``gvZqi@g5aJNLjOO>2*4Eg>Yy1##g8C#1+=uqZC6A={48O~# zAi7a0%0|c1N`w{mI8Q`NEhq`%TigL%bkWYL3eOazvbK#{Va0vFt+rq&cfGh9ewAl#>CS|Rx!lOo_$tlrTa{RW2< z2oXO{05nQzBD#)I@FLNqo!+Lhn6MBWZCR??c<2k6%R}gbe=wf_9h~VChtXU-x|g2g zCkOd7nuw}tSR!9LkB)qpa;xvKdYcr5>VqtB36P}9R|cYCRo^_iz_Q&3Bu0m z1vK|%;L$)f9I~O@GBq9<8d?0?Sj3OOBmTV)^Ats~;Lorj8H&~r_Qlle z7I0v{*LixPs#Y=~f1SSg#}9l<=c3qh3tpTd8H&7^GPk#8F&+UqLc4y1H45~lp)ANL zGRgDmqtA#i&h@wQC7ncP1ylwRI$vt)^5Ta~cJLdS$|P}reu))@L~`)BLUDN+PYJL3 zDEi14@!rhi>jcJSwmgAf)j|QfGDOwOq>wk zCCqCGzoqCxcUC|?dA2#aj(oII>v`AkYOdll5+c&Pc)(g58X4jj=v2=@?bfoiuZ445 zfI+rfG95RSk_s;_*IjCI)?yRcMmmTa)ylGbT*ai!!pkZK5mI*=xl!IE*_n2u(gE01 z;!vmcB~Ss=%J=jyaw#c4PgO;8sT+^uZB2}6Z7|JMiw|g*-t=s##f*O}AiW?xSkzcr z&D9{aTB6nI3dJ`H^nk&UBO45h-q$OA9?# zbc(q@veNjwV4yIg+B=30Jr>o}A%;s8Js|TI>(rTNuFfiAZ6DqIW&8Ih+V#ju6FPXx zF0C0528O*?#;WM5JtR_Tij-Qk5hj)rSLu)jH}T$(jWFebyO-`rB~Rc-j7_}DuE5rx_YB*#@x4ypM?a;aPf zi1FE#VHdn6k4uVtsL_3Er`g>mQY z;7U`HrA>V!lhq^9^?$>m1tzAOEcyC2^OSQtQy(1-bIvaf(ao8^wzAD<$Mf#uEQMNl zE?d04^s?;~w~U~6V!^HN(4y6EQ+rmT$E5GAZjN4M&pI2J>04LBhr>gFg-3Udn^ALA zBnC!PI_L&fz%6`p&xV}=ZxAp<7P22nHDBs@E<{7Zp zjx~RDiYI%QYAkM~Ddw#0QO&Ec&uwx}wrb2w;c}IgH1|&WifysGIv^eRylN7SkbauS z&ChYmD#K%)7kO=UG8TQaEes+)))RhpPs6VWPxf~dJ{Y#Y4pJb61K6C2ipZcD3mX86fIX#{8%fAI zNld}0xA|FpQ~6_WCdSe|L*A{@%89*Q$EY>slY*6#5eVM|vU^EWA9R)-DKMu%crYL{ zWNYY}dkTav+daWzeY<#{!VzeEbs% z5=+h|#%#golD06~nYpqX#&?M2X4clVhb1$RC+s6~kcZ5jxE;%Yu5+sUIqK7IWdV3TZ~ZVJgMbvHr8()R<`JA}b~4LtT-V(njw z!x-D7F{};o_{5f|S6m~X4>U9Hjxo7c)~DkgB9KFYJv7`3raJdvSo$WYH8Q6P`SHJR zND&#y5E-cu>zb|W`$P@gyoJeTGRW}G2-+#zDQ2u3F&T_z36SOTtB4~M8R zi5j?n*z-bo)IjAk=z@|Kh()^CMqNuJVT==xFDaiJ&I8Nv_d338A85EoJf0)2RLEY7 z47ZJ8DXLLB-s=Y{Hn?`?YJ1wVz?w7NVE@qDlwd5nTIG@5w%ylo`e>@L{F?U;Jmuym z;N;3wimn$t@FT7k}4B@R6`wXf{^lpR1?kj#2NH_?Z!hWT6@Hnt0A zUVuFxm@scxk}vVb7%44<-7CWo*%ytUoNL%QZ$1xfEYPWFk<0v~C?AQwl9#x0?n3SH zXdjwB!00j5^z6%=x=s}$V9VV*bV=`W>E%-mOSpP1jB`}g$ZjKY^KSb3 z#5*WvsB0b&nCcPf^LjIPs)x$mn!DR+>Lx#DYN!hk=}TN~shd>o(?Zvy`7QS>let%} zGGUz_SfTuWRtD;nL5R=T)xFITNXRVyNFJLXymZm_5uCw)~fp_}Ni z2vt%-s89cLpjt_!B?G=rhIpuZfq$JcJL0g2f+RaME=|_11Q;<}+~UBqFHseh&f@fr zQ5E#_q9Gi{ZkawC*H!_L$nrL(++#t^0J&?I^_@DRY(}}*2|8yS_z0;*gJI; zjF7!_z*<3jj;-5?M7K3)xkZ55)Zg}Eb`3+7eF6Wy=dG)^Z8PYNCZv=VESE+8Uc{}k z8S%53fUXp0fJ@hcBg!b(_#XE$(q`d(KSx-%KGG^BeK7>zvbS;#T<`sXYgJ&|TOd`AGPk zT3qNXl#+o6;bz3N4!&78dEnmA)}caoKBk7b5u5NVkedMdQMor-c~=V6k8QG4Pnl*% zmeC7Ow{&Y_#j&a6+!6i6(LYvD@I0G9?tx%4C2rltw;NcP=4^k~CKzlM@!54SU$u}m zS*4LyzO0m_T8!HrFjeJiCQ+5&M$tyT!=;lxe*H~!hhlJ4}AtQE><_}cF?zPFqfqgM((if8+`c|FhC z^?A!JC|E|3u=c=spsdvFtvSU=q z@Q$Yut3|K7nytHP_m_pFk;ub?{f}UvvGi9FDw#u3V%CC}s_}DD+gqeZh+cvzOH0YY zHa4|KrO8f5YVo>k0Bt}B+~Gm7x&EwGd5q6RD7pUI)r1|{v5F2~k6Um8 zu3W$aS%e*PmX{HXWAq`7Zkk9)#F6vm!*WC$CRx{Z%18;^V+KSguLIt6-Umg5yF&rQ zJG=G)l&9gCF@-%>0w~U*c>_0xTZa2a%w=n;_A{Wvt*_;i*6CwuxLgOG+{cGpX)MA+ z&egL2?R)Gt5`@@u&58CmPeg*cZxTt4+Z6eZMm;_Yk$QT#*5MSV%qLvk#ErzQj_V#u z#2=2>!5nJt!MWA#ezuXAtJ;|B8#u2TS?%Qy#kehQ75K47Yn&~1$o0_K2c0DL9dFJ!3s%c(t-AMA++C#8ufQnSHxRq?hL;eALJcpF2Jd@PVAt zsWy!492(uNZcH|`oNvF#ts{v|H|w6%34ruK_@#2*2nDJ1JLe@GMZk1dAWMa&L1O=j z5Q~IHS~Mfni{OHRI!BMOOx)1T2Yv>j2mW9zucWhbBuOMW5^J1LB34!4L{-#gD-|Nq z`96248E!dF!k@R@MV9ztUdj_^Ro=-EYwl+!*Hz<7>aa(8`lv*(DRc|7kMsi|?2tR1 zMpZDEBgWcxKOte7My;VagKLZHXeH%il|~##eONlbde0XtZj6!~@*5qg=86#1goO_;^7GYnZu? z(4r=uD(rx0OP~ahbGrf+4!;%%kzoD;82(>J@c~7h* zlje*a9@KF#rOYdQ=5^lt4f830X@@6AGkp*D$1CLYh`aDq>qH*;#b#&QU}>kn4)IxEanE7EJF$L83kNZ6VjpW%Bu5j6;+3sAxg4k>ap@u$CP_rh<4Gw> z@_FkY9nvr@_Ppejm?pFrtIxO7W(cxrVSZltjvmrT_LM&+UjnO?m_ z>kNI-t5^+#sh@VF6erD{;-G`j*7#n+5UY0ce=@#}uLlGyDS&YK7TAJraJ{o0@!1ym zzhwqd^?6nxEEp)1dm4yF`6&scshH=x*MC5J!hr>I0r3F=V#qB1$AlN*<8C=obx&;K zf&H(f!>=TxuVk|kKaGcQjGhLnDg3 zoh2Adf5HEAiT!sSaLr6(2@V|uM1=wbgyDZ#D5Wf%tH1_<+)%0+{a> zOuh3Whj^8*f*akN)>X&0))n0r+E&jk-J8u@Te-Q8yP0em*7k^Qzd3=oZMV6N-hvsIZzyX45cSp+2F--DdD95x(W<@n1-cutRG@trEX91 zbG;g|&r^hCQgLQ0Zlyj~tCt&ag!J>C1sVfGK_P#yAB#Y?(c+jg*BJMOqQsG!#N&Zh(MabjpFhRb8gKJXwJ65j-<`0b2nrCPw7S zTZBXil3?&QKK$!c3W{YQvF0md8xzdnu?oQ84@}RHK)eId%VkgCq&ox9^v72CBELd zPR!$G1U3n8kY+F^GpIq`oLB^a>(@6)Xz=gNq(CF`b)Ze}B9X)DjN~Mr>5(T#21go@ ztYPb@_f|R9N!W^h4VrA=-So#~;{>Opt*n)nrC9<@pL(f*`=~|*t-yDG!Jd+@-tVxa!uDX(?_2AVNMb!D=lQ)_8msulz>3MKUn6rGI6QLWwGvZkUK$8;0%-<5<{{PdrY|ns@OV3_8c| zVIO3!^z<~V<9J|-f-0o^_4{ftZp+{YJcnm|2GGadFJ>U(CCF1G`H?HatziyG!_8IF zuqlYlmN;@Ay%N79z0YDU415>XBNu*7-QAqbxZwIUaWw!wu8M#ey_OI*H~5aHq}rwf zFv#>f3%|~N__c`Cm?8uI7zi|PSAp758;835HFm2Pl9p^j^=VQxDW-tcCh_-Uo}VKw z^!WM9jylT$0r?r#`fS62Cafd0HT;WZxi`MVp~Q(s;pKhE#VFJw(S%0s&ROXQ<|XX= zCZ5c_#E#P8s#vw3Vt~21qggP;61c=u8=4T45BN_5s33F?L? zB0=`l_}Hh|KBLO)MIvw+7Kr3rBRxsn;0sY8HT*Qh6of107Ql!WULi&r50Z0p627)r z7(LYEqV!xeO%C})5iE>C9A-2+2f`_M?<@!8lNKJdGgU3Dd-*tkfZZyFsL zQee$A9dpf%r9+@jhlD@e&|ao@gfP(k+&_+nnuiT;GH)nt+qT%YK=;f$n7GMmMRbk~ z@t(Tk4=)m4JGXX3coF{e5)zVQR1|XCwjCNmcQR+}YyKb&^K%@TI-p7IOKAk?6*#xxx+~6|2e6dRQ6$o&j&d)U$(Ahqrzx9RohyR`d9Xn8g z{z6ks9ys7a>P9N(+4s8lgT5X5gY?d$u>S&afVjOqKBLf1G?0mqjAhh47h-f$ncdL= z>EyBR;2mtrBD0J^P{g(t(#AGIFipY~po@0(nfgoL-fLf^J7u!ER`BIo=Q`ME;Hp_7 z;D)<7R}r&lIiTeiHc=6JVg(v?kux*Xj-dOO6>H+KayDmC_Nxz)qN;7D-j}+lStu`$ z9d_tL61%8O6>LPL$G~V|G^M^Qz$JI3KS4mv*4(6I?a8H4 zcg#7_@nDy=nPPW4U~{xees*pDzHBSJY&CR+)Qx@Tw*Tin7#!Z)B|$)B-|}O&X~W(e z-EXjaQ``4I#ng(crphGObI2J$I+pj7ELaPE@yZ=rzBnNu0c(o9<|LtIJWGYrsEa1VC8CdA4|`eTAECn3k-YT+@^@glP!*Wu~(q zN)xNRs8ODS5B``+IB*(eol(0*49Xp5^(<5(D$n>P_%HEQQSkb0a`5`2C1}HpMZ;d= z^B+elRQqLY4Svwom`N37+DXX)&B83H0mH({;-4xi1#zKdG{ZWg{eq^rC8c@;uq4hR zzx3yk9iw0du$DN7mr-iQ|1+eu#q|bAX+?*Lu1F0BHH&r`#HT0BadYW&;dAJ16<=}W zaj6d22kfG}ov2a}#jvi4tM7hfGAAF}wH;h(As9KW1l%xsh|CW75r_F^9K3Y@SbL)K z4M6tsXS(T1d|l5!^k_2yZJXD7>clOv&t89{`s^*2w)&2pDjV!sdQ0yTj`xfmC97_v zj5bJ1IpB(iq^Uo~NEmz;+c(d`B}w#$c!cFi`5EaU+V)dBZ7f=!ls^!stlz-=zN--J zHtfS$DEu0{9*(eN{S#pS16a=Ono>AQ>8){0A|^y3jW!>YY)c9HCvMxGWVU+0?}wa@ z0p2g6NYa!Ujx?-qeh1Z4CHcu>o0P|v<^Pa- zGCNjrL;K?bY^+kLfjkp>z=LU#<-keI= z&?21ZT%r3vISRy#vB(rI#6ip`ULSbhiVugX@q^$8X0h^3Xx2}7%Sf0!KDeh>sNT=o zhawY^80(J+>$^ce-mdUt<=xavu3Wh@#e3xR(s2up zso9}o1#si4@e`-i*+z|{sbagJ<}f%?q|`d>?vJZDm3raRec|-yk7?X}Ex85Qa`Q;b z%hxY5Po7hG1x^%|O0$4i^Lcdo^^f~K_YJzgFx!7szzUY0vUTBZb9h@;bzH{%v=+U@ z@UWGhQFRl$oK`meqFxq&GE_>^J?8hup`SfsXGz13+Hh2A&@I7A9H5<}N0g$EEy`P@ zZ&7DJgycW5ZGdM~ZW8UT;0F+Y(2f>oKrd0l&&tACj%Wc&=_YQZ{Xlbi|1so*3fj_{9i=gOTTR$*&OSL++fqBA51~ zVSqY>5k(i(0=4iZNs$~QM~QXDr1lhAG>>-%_Xt5rk{~QFF|wXLjbqwcggM24^b||g zB7LRvXldq6?T$xqXYkM9QBAK(zER;8**+BWk!1Y=rSstkGXb9ory-a^JMN}4y!`;< z`G6ygDYE!H@>V_eAx^N#br>qbAmcV%7Yl@z8P2OQ1Ytile<-*!e%nAcPS_hWQn@pX z;K+?LAaWsuj~Uy`6gI&a(J;pCp4EQDU_Bz^h{K!0Fi~rv>o33`1~`K4f*cs^SE}2s zQZ<%c`r=)UF|<`;!cQE(f3t|`9qEoqnEHB{yBO$8s%Cho>TE_wAB=pVUU9lDXHG4m z8^QVv?Naos^w0g?p?HJL+8_~ZW3bw$Lih*u$&aeao-%6tL=ZEfJIUzZGRidi3>N)1 zp_3+wCB#O&v=1cj;G`lg@1)&7&_vws!MQ^zLr-N|>N9QssQgkwYf~8!g7aAPtq{v3 zPQ(ZkZANQW&MD0;$SI30w3P@CTu8lzmY$u-AE=rum;J@PlQ(!;DOE88g0kyenwONSO!_qGR@o>Ua1{hQD1rq`(qbV*`VEEBX;0;JjsW zO3Q-!!ztBLqW@-0B`G7X{d85#5;_k3H6QbW(z2IRbPp#v9`~*)OIL$#BOv~1Sz)OW zoyEW)XL0IUBy$fso^J`_MwI06nRMvPcfq^MuNmG33(thK2TnO zqtp-P511|Qh0G5L^hatvl4-}!j|6`YWmd~>S0QAbc9-T#!F3#yHz~tkk5x1&Gu3s# zUTeX!#wt@g-_Quxf!H_zF%WBnb%k-m3cg_9&|fu`g~tb8xQ!RSVJOOM&pCsh(B}^W zbAk^LmHHD-Cv$R(nHzgq&r~nRNi$S3n&iX`>IyHV4q|e40GG0e8Z#Bu?8_^FOMs-o zRP~$ndk-M*mS>H{Ge2U-$rxyLjR<&^1n0Zc#ok^Pg5x^dE>hUBmEWRtdNf zcKj1pnJECLqTf>xh!ngg8BY=)&_8u3Iy=dj!%_LsoTAWrdu^AND>vOS6D1F3#f&+K zK$|Xpp(bHsUJ`zSKsyr|Ig zTrcuc_4~BMb~2K$crU+UI}|IRM@xA~2y=3#egs&%0+gf;9=_7bLPf{C^HSkYR0(;= zh&1JB4N%I4JbAyIe$L9uEa}Cu?^u=Cu;dk2`{OM*yJr})3AFV|c5KK`EUH$@JlxB0 zi#qWU8b~J2OiGQI4J(eVtf?UjR07C5Vb)7Ke$vd8UCr`$p69@y&96|ROoJx4D^oiSm}jne0?h08!Z#85pttR1Yn0a%RZL2#jQ5c+CULTXWaU2?QBR zVr_bcX9J(+Qg#hHz2^BU1)7$)+S)${kC8#cYpyyOat5?3t5UUg9s2N?eQs8iuxT0( zk(t{~eLZu6zw`cZ|DN`LGXnO48pA#cKJQ0i<2f&n9sCkUo;pCSy;}XY;;R&|zuYR^ zY~!@4R`qKo_`CvU`FmrG1yl^1q2>NOcj1vAKY-=&pN*fh%jI~%{#{%vdi6zpEyVK# z=`b=L9nGh=m&wpUb#gCJi%tlqqj0YWKHN| zSd@3X+q^!%_uf>lKl!_FDF0brb0Bs}NZ%uyGzXF|BDe#$JmcW1UDVHEX+eGzV>M<^ z`#~X*r!I##1WuXJ1#eso227KS^VA#CO!#%VBZ0`2ky;=5C`iXcPckAQeFTYW)wS3a z0TbZrX%5viyt>m*i+_iA;MnzEbDEkdeHNE2<3?LkHy~iSCb+mT>?kw!+f|akWnkT6 ztrTw#>v4f^7%n}HKaHY%gJJ2MoeN0^PL$1~ET!yuGX_dP%)E`XLgSHbFznw``?!1|JcHd28lyqK=7NCH{G;V@6 zM+YNKm(-jjBgu)=K_Xa3)lkz?ZMpTJanv_1FLc7;Rj(-e*qW4Nt+YvI`AP7?#LT@uh;`qS zXh*%Ihx0`^>EfV0Q~!rLi3dl1m}`Xa2-b#{!-14Dyi||~XqzcrCHB_+!{H&Oe>|s4GoGLcmjjca%ECz(@~I=`^NTykvU6e;GkG5Q|)NnOT_wAe;| z%PSEX+UJcTeb=;P^>dBEYOP3=MLW@UNg(368@R85FcA415i~$V*a_kMAb6LwN&<0@ zMzn(GfqWOcW#HIhnX;F-sM3QODfmD5rS;~&SbpA`q zf{EHrv0oXO2kJ0S6nR909>?#Ksk^jQFMxse7Rqow2|d#gYs?p#1<}QR%r&_#hT}?y zpyx}q4E-Wa$CTE=6jFSo@*i^T*7KA)0%#aXD7uX#&9W#-VtO!g62pO&?2D8ZH_O_T zA&ij;D4Oy%=W-*9gPiHELpm3`)49?YRrDq>28(pIt7`hkF|w^;H`{92&s74Miy4^7 zE;{?T%lxb7yrnsCw@IdYg^Fdvc~`%N4g=t_v^ix;WJ~0ZQ!C6=B?kmg8*BCk5%Hz= zhpDH$5kQZbp^xmLx_lts3JCHCX&0$q8)2`HbUFwqUxx;*ehv`m`vlY7mW&$Y2#jZn zrEV*@BMZG9*lhnJh6ML~h})Q!1Vpc1NWI*VQm z9LX|Kriyt>`k+vyk$ri3CSxyoIqUl1%~hi2sAL>jykO<1jol-95E*K`9dW#%^j7Z1 zuB{AtiwQ(xn^Pf5#H+3F}S>!o_qKbSL<0&E$YOp8E&YYaqXYX^hd zVzQYRp+c{~osNs+yj6&t4vNDUzX}Q}V3=I@T3OY_qxy&Fur{Q+;G1J9G`r>NWy+yX z;Vh+1=fmbE<<50yof}&YNc%9d6b{CReQDuqeS$NZ{+6iei!$7!_(FXls^f?3HiUYa zS4aOA^sAM$oxV}XsRi1-=xD%H$ zi8+IiB-7J%Ew}WbWbevdv?#W%=c=?Jat4-@4?|+a3yYSEBU% zN%^TqnKPIo5dK)1T`KwpTZ{6~)?V0J#-KQvjlzF011;;T?RSUKd$#J5iOz&8RALQ! z--&}~h{SKs*k>^KdoO;~yM40~ynDvGZlU|1-BXQ!(cz!x=&Rn|W1pBj*L_KXQWfOG z9g1)`sS=t5#_Khhx!<--?DlPOW#cuwZj^nk-AJ|~VL$LzM<`7n<-!r15b-m9f!8XV zg^R}Ue22h6V+*jqP?WCpwuZQl>9prq6?V=J()86(w?=~c!hIf_FFoC_)4bON91(qU z{oncGzgakb)--zE{BzDAo&W@d`G468DJqGG{By|Q|1n_9Xv2EzuXqT0rI#;QlgA$? z@neC(n#qwJ5Kn0D4@d%Z;KwnO-$>200<(Mo@s>W1)8kd*)(Tg~XgMhT#$nMLEH+uf z)Ho|7NEE5V!ZO*EHd)H)U^ZF9Ixr#1Q5QkCe!gr;E2;i6pDX$9dmURk-@o(SfM3&< zW@FLT9o%aQT8qdA&tzP=B}82|B!7Nn=exdHZFdjs?-#FVDIRqM6tv|d762yT=y1o@n>*l?O;(N!9u)$3DUXnVG65Sj1a3r+U> zk5@U+Ms;&8=z$ND==U`GeA^a#+tuU5N?sPaw%Zb29CZ^X*M4{G=?AD6um|v2U+}?Mrflo&ETk5NtSDT>g<3U^M>vV$=!FNd| ziv=k=Zg*)L7L^z4F1f2Jj3g_dZ)g`)1{D++t10~WM~>H20-~v7 ztu%Io1aiPC^a_jZ{pyr+kgce+UK+LMO^-3PVM%w~UG8upO-rz-w^!)broa@7OpmF! z(CAzEqR5)9voiCw)mU4F3O<6%#xwC0^azb9>QD#;2-XMo^VEXQs_d6aj#9F25DM(% z&U(&{W(l3(g%@{ytZb-*+S*|#Lv3hL(*fb+aT4=0KVSywx;!BFEtYq|n zgBD;C#&0o`J&KY55?iS%HE{U-XoJD*8w$0hSIE_+6Dsl>@I}=kzK8_@O`t%h__D-&Wq01GX4O?}52oUW-j;<

ow8FX{y>G?mK9Y%l2RuVOt3NLM&058or9L_ z9Ex7|=ESmOwKfsJoWNPomg9YK*M-M}&@Gs2YnZ;TlpB(k&Fx|h5)uPJ<7q0^)#Ttj zCEmg~nx>y0Wov+7VwBJ%w?c;hJov}4=X*=t|GiOqYBI568sh_Bk3NG?kjDZMS7Tf# zo^7__^uvV)4M>KmU`?P?jYJ(%$2cLuXA8s1TTHdgewa3I$#s9h%ZB=4z@3kk$s1nW zWJYOTL(Zg!J(De0X0VLXI(v1UHA`}~0%QyTlbL#%Vr3zx(ZZMzN&$P0djRuxkS=XX zaF-uTM$ai7kp#i#h67o3y$$#g%)|X@nte&V`DbjY{7i@~~LAiHVOh z=7?3zBr8?0e5!dh1LinGA>cU*+adZQXt6e8m^c>KL<_J;Iu8KXKAvz8k#EYXA!~QL z8(NJZW3k&ZS;R!zldqBRFgy<5v#niE**aQygJLQy*p!-Vs-GAIZMgbgc z7v=-D{j;*6J9sA1t(w?}W`?#6re}Dz1A07X)iEj(YCUAFi5Q{B1$&)6I;jvs(%+wU+jrOPeokzG-a$%lq5Gk@+i%lZ=)hcP+lvk zKqy5(=rbs94LBHO+*?%sn_Q1bA}b;9WJND+y#Ou$-T6zmhmAPiX0<6hhG zA$Dr%*Kt$Gqo?=Sx>;LGRGNsZ$8tSLzwiooR(ovdnR+cXu7aix!26n1afL8AoBfGC z1Q!TT`KJ!o6>=xAEfLP+I~~6}SGHXb1F18y`!5>}A-8#ggwHiq;9J-tH=l-7xV4rl z4J2qkt*#{Y5*(b!WdY%33Fu`}?a%cKL}$c=OvNU5f}4~O`|`vkDilh&HE{K=R6!Xo zkX+Tvay*tY;UKOZhzUqKhGwGVY{$__Q&(TnS2cC3wyh~F;RA*~aKK0(A0R^}|4%bg zpd$z%J7g5g*qLV@2Lhn=1v<}tFI0GN8fvw8Nnx*czq5VLEn8ZRmupSH$LQ#Ou%&s^ z9SQdq_4c;TZ{W^lAGMjDh7Gp!5!u{eV)Rdj~vg_ zYrdR#qXC$SB<8x`m3kX|oQm2dol^uLan5(HWDhe4@rWzznvIMMPON%{J}X&_d{UiI z@B$b4-em(uRB<=|II~^WTl(zMVY3sv=_*8?9Ub>a z;Bm8u;{GV=WJTiqfe@IO-cR=hae27#ZnLnHft|Y+a~tyU%q}{?N|ZacAaQo-V{Isq z-}=lS!lSt8;lZ}NjrXfCySK*1s2r|iZvYf2t*o~IIyP$mQ=eej2>#f%Z^?9)d zE6VI_?9&ko^B36rqXg}sg07+w7+!t>lrL*y_?7%#&a>3B7TOT$@wyc;PknLxx9+I{ zhxda{rWYc2`@(V$apzcvIqd1b7;3eo9lf}C(2<9k8Uox8k>FC&TT)MCm8F{rzGz5H2A@c_~j~oL$&1I~T%$_nWah zUcqp0j68??g))$grFwhUJe*}8=;r{g#8J?tFj?=$G|^-J7$0NAFmS#gRWeK14h#6D`= zvs0}CpB9BFzToo%ow?00q~;(rb?*33#@9tDu}_3b|Fn;t2jWFjX9d3FD%U)>nOA@1uSrNP&|+u0NHESkmrqh>J`FfeA8X>_f7v=zk;{bge`eTDU@QFGEc zj!fVO=19vCArgt3a0gh8U%b!;!rSTcQehYeWdT$5W|;Z|=f;`!?QaTJo;{ zcqwe26C(i_o>^375wRO4cfbge-5SOSPbxDzlm%eFZ;9wj5MhrNo8hxd_&N^0`{kk&zIWh1bgWO;=FhdR8(c_|e^ zVC%%TPdqb=eVHEnoY7@svTIYk1;ICOlf24sUq-3gT1R&m8RV;H^W;7B4UQ0_bFwvB z^HDX}U-(;+!12ayvF!6b3mrqHo@ZKeAw)7d!!UKoc;M38wCa1i4%}~NO0}<5PLR~Z znFiwB)D+O({J}s9fcpbL-%2G=Crdi)rko*1kHiQhlu5PJ8#ZH|u35EP^5*cR8*anO zP@5hX`9<|>;wxFa49!1ChqMVI=My=4T2}l$>tp=u`!2*_sSn%p4^UUpY)#L2t*if3 zpb83iwgJ|*dBZwSY~6*U4?EenyN%k0pLf)_U`_RG^i0(~7PfycO~<(+0)4 zkVTHryVL(modx9sXJ!7GBB1~C3jp^2g*vNwII7z?Sh)QweeTh8aMstr4RrE+yR~#{ z`Z%Z5XLX=z;n*o@)+??xP@Rad-z+1yky)e`sc7rs%HGAX<7LV&fe-6L`CYmVrA*PMP@s8oSD{xRz`if`!K2 zA-EIV-QC^Y-66QUy9EpG?gV#tcXxO4$h|Y~&g9LTndpAQAb1UvX=i}~dk~UF}l-sCu%K-%!+u?VTov-V7m)ivuQ)Jwl!qQh4jI3rQgW?6d zCby|x5q(U>b`E=7#`e$|o13LrZEJ6RB^B2fNU+jh57V($4fqFS>qspq02z@J9=n@I z#mol?n6F^4>+!j7oYqc6eaeHY%ElGxUv2fhXZLr{CSqYz(0eGId2;?#c6QrCS$o8SMcp}j6nECTtF?~F zr4nA}Vok}opK5q@KpeIE+}{1QeYpFY!#&Dz-S`lkLt{sGO#B*wtg1cZ`Th?2e7(+i zy;49kU*oc$pO!SPsVQ(}OXsu46$3_-YZosq}F*?qmVT1&Nx_Oo3y2%%v>c9X?=AaYJ zk637K#My=|Ye`*Fs|HW3-6IaYearA*+AFM|YKA*S72+syV+&vTw+Zru9sC^-Xr~dt zua&HVQclH>>0x3SsAITw_gF*0S~Sa&xWP^k-Sk#`3b6-GFK4otP6af`K)a{xX$;X* zk~0N}`DmSn6E*^r!_pFE#DiQER|pBt>t$YWKvt+(3{MAA<^9~|M9?ry6beQqrUrJK zkXYn7r>9k~;ie-@gJNu0XRL#&*s`(L=xx)+Y~!D*TEFEPt4pPY7R`&@{WO*ZDNPwvR$3R zYznFH<^yIRl^t%6nZu);F5@(vX+-HyXQ(0VCu`Jf&!Uy>_EtU+e9GqI&cUT{@SPC& zxGU+WW+j&mDn@#P01Jxa+0{K9A8j)2HP3=1b~#BlM2ciQxUq?h<2lq#2n&whXnUBU zbYOf_%*Sn9jzX~Ga=*&);_LXWKp!A^aRtOiEW7_Kdt7Cwir8!V`Nq%@;CteGjW+9h`ZTl=oNCHK_^YCtAPZxa*Q;I*uU|A>jk@b1QslrMq zh8CNlr1^!+Nf(8Gx;*!3pF5ZOs5S$$;5?D8LS#U-8ZE&Ng3qWuVG(khE*$0-d&&Dz9DSVg`Pm6M z&)6EQ(+aQDqGQe8`Y`iz5RzM)u0M?04zee({(D_J>bWx_fihtkLO z^bmvz66~y{`j3nsfLS8;^rANb(Q0CBpW}voK`KD$+9`uCeW)3!z}PBF#lgAZ3SDWV zt0-lPL24I)VuA9gFZ+vGsN|PeBa9BxGkxbGTyKkO6xOeFqSfX|{A#Dd$1n99ZDq;J zy-CBr+U$`oU?Coq@inAMq@oDcrJf-~_UYqOR#TrtJs>Cn z)S}3$Bx#)VgaGIxi0C7_uti1c(YYIp!Cz%(2y?CZRhFVJWyo>zoO+t6b}5;9p810x z4+{!Y_YJ&AZT3vn`;w}MsdRX6(8}`SY9lj$l(7V4af_-S)^5yFc6CHt;WtuTvI7^1 zv7GLHo!l%2s%sISF#M!+iRysO-3{J47diI7>U7Qf8B zpP8UaxEK5W`gt#!>nvJGc!|7gP_lq$8Gxj#m#o0r^OSegjU}pBSrfL0KQ^B2H=;~) zWP?`aP@$u6!fkb8_5E2)bKf&)5|~KH@1aX;zAhko6jRX|(A(@Gdf6%`%i(wf+OL6) zRXsX8iHdDc5_+nf8dPKiV6I-zXVIf!(5-|DF z%#aHq%kvp`K(Jh$qv)Kbtlus^HXnJ2C-hoJHt`cx=mkRA_w`M@XHJ|-?ySexn5P3r zjtQ?Wim&K+p1`lSbWa0mg(DrG3#}*lZG+2EpQT0=Y!AT!YlKF1#RDCi7cxjP1#ifg;yAnFw<%F3zjf$ zpR~pM1daH^vu={<{ zM!)}M>*{qv++scrTG>adCL`ZCB*ENrCPT7(im^qlj(@GVtA=A<8Gxr|&Sayjx; zl8#7uXM7^`qh)jZpo#OKQ)z&a<*FHF%CRDTikwGxX?ZfV`U6m*>oODMHwxB7WgAh0 zZZ`#M3)KK=^L+hzfaG{NO5#Z>V_#bn`sC+Bdwd^spTT_1y*;Vv+tN`xxZ_fny*{hO z7lFI%3&6|@9J+IJqOwH_-*8#z$0DlXw0p-5E8YTCe=j7qOP~0^OYG?p#66I-?6W&R0~tblsbiryk%nmql_v^y_Kipz#>HQHq9ImgYSU#_NVBgHVp zRZs$yrXJvM$yn@Yer!EO)@=^5_UdAT4COaSE@(Kv=H^|XqeF*O%wdl$!HevEZCV-L z0L7VeeW+p=+uz!`)`3g6T6deoBwHhxt3`cNr9L+6)!6FF(#ZTm!`_5$-nqVDeJ z#R1-Q2Hoz_*}(m9CGl`-G=>f}0W>s#j2eL2o`3i=53*o1}W*dSigE+?tmU^ zM{*8GuakBW|4)HCaECqCwoH$}yAXFKeT63GG%o<7zJ)a)&o7u5j%pe&2IrPF+us{O zL!5F#I>G<^qR{6!=-?g)_85#npO9TDfrNDl$;*0+$?DQ_R0p}H^59fQ3x?w$3IV2d z*e9SKn6#>Rf=Rj-a>$Fa;0R60{|xYDpqFRaHy%9wmF$KjyIK@tEkSbXEifyjON@Z` ziqILdH*Ra`VA5XIV5}|CUNn#)?kX^}4^%5LDWp&qpQ1{D`V{vlOkjpICMxCn0uKL8 zQ^7@fJJ>`PUx_k?;!>cNGzP;yoj>>nOrX3EK~x~brAnZ@7xBI0-j_ZOi#LS|haN!` z8;iM8;2OVb4gUr}pnM(kdnzXQ>ak|9p9(%B|{OewUr= z1OD)V^gmpl)ZW$62x>7y zX|voY-keY)bQj3)g@{VcyXDPtoeNi^jw|-zk%qlyn|b`&X>Y&6dL8H_YrnHs6Bg#o zwJ{2unhgiTmjG2Wu&-P}?woeU?;^Pq-GIbbmo-tWHA6}WpL;7eo{qvc@!}?V ze`;koFIU>Ia|1R3;qmjXAl|`JM8bq@jO4X|`@q%v(5OF14xNx>Z!k}@1 z_yVP7zqo7k0@_4xMbMV6o6+Xph{BDSQI-@YwLmtBE}u0ZV{31W0}T>txQ5V_{2qO6 zf{kkvsnJkOt&a`z;;ocPLkH-uAloW*v`Gs)3u<)Zo=qkXwLet)Gr1ZeCG}Q7SRTBL zqMNB3(9dv>+hVCij)9i%&`grgojBvplNQ%$!=2y8-m_*yx6dxW02zl_1O~Wn4Ug7| z>47s-9uZrqdSNQb7S><7gp>bmg3$fn1i``(8@?AN z^;t3v!22UXKFN^F!xXt~)Z3yuQy52B1pQNjVB(4au5_J@GS@lAPfjY<*S$U*ILJ%uWz(|j1tly-D;!>Ea{RY`0QJ8{?WHI z5iWKk^hMVQwW0DU^o<1H1(+mUG9ks@3o-v){Ix41{lB4!y=S#ZM^PC2=s2yIsE?}FQ*=W*bdkG?K zY0+}ALGMuPxw(ZgcPLe?+%=(<8K%3f?Kjz{FMCiNEiJ%DIo@GIvW=gc3GQ`BMUz^g z@gzG`d8kQ!CF~;gWd^L9oO6>69a?e`IrQUI_>0&%=7KW7%;wMn?cxI!+bSrK@+9&2 z&4uA5P*q)e3%#&ql11cG5>dp2i33Wj9KY~LSEsVr(iR)*lJSG+>4U+K1r!& zHLFr$z!#=@@&Kw8hEnxL%NOhw#zMh;jFik~T@01i-;$&i%>d)*JxS{R+a#g?dy))W zP4ggeBDUCWvk}H$crrlq=E3TcLZTFr%eWMhf(po>o)Di!OWF1%a2idX>-73sGOt#W zAwc$|M)9qrs8PBsPK|gRtl5v(;DstiS}$;W{M%AiYlKEh2t$Kh~@bu8>eJd zvMcZfsm2z>xWwfl!sAFZ#ZJ@A)4^!Rt+y>3U*s4xkIVbIPEnj5Bq>u`(kZ~4(Krm5 zOYUOud*r#^IE9^~Uay=$-#@V9^l3WF!k|gRL3pgzn%?EH&Lh=7kZs zcYaM%`^E&lBc=#YCloeA8O%4ud@<5+ki8k{FYr`UZ6uk`CBAC|}xv z1aSZ-0WHksO++6RtO+#VWTWUWES+-w36yCcJXi5Rz;O>}wL5@-xg%e{O{5!MDKbY> zD=h;6+aBExH$2S})B-gwBQ98M98ZN6>1^WbgIeJN4xdy>2+0i z1VSxq^B-n9RtfoRBSes9eMj=ocb!aTp=-MLTuB7~&x_(;cbz}8B|^bc8j%;yv!1H$ z&P|R|21rl~#B^93RKT@=%9jrg>NCVcC)RGM@KC~v=Ie$RUCd{^m>%4XD7vvT>;N3$ zjp37%6Z&fo`mbNTe!ji|>p-0wFz6D8vKTd`Y#U{!fkIdt_-E9l`wODW8pkEcL}#<4 z5kU+itkIED1ZJl^R-37&_QJh-=3$s0wJRBklwudJ&seB3iY-zt&qPc?@dpE=rKZ;u zmnGGJ&dwbW+Q~2~s#i>qsT&5{>+sfu=6jw9?DAQCJ-qHS(lw34b1ma(w{s|!v+B*G zo1|(pD0G^gLCg2xtuYTYGA&&82mb1%XW}9%T%7|JRVQl@A-M{!;v<%-`@j)) zFP{ozCIUo3As8r3cuRZ^I_4{rq?MPgx|!4#o<8inyHEcRty{oaz(Qgrm>J8Ec-r05u$uG?(DXM}RA=)T9eOp-rri zEjlQ^`gf8CpQ!?WZ&QxEIzK67SsFgv@|wVm+yB)F`cr0@?*WFt`~8gTg8t83`(J0B zspap_$jcPXEi`(O-}+j#mXB|j)`B>lwjR*+*kQwvrdB|<94*q5wvo8y%=iXI-D=ic z+U6I7vPH!{2Y`Gcn#hwR&5jUQRzUJG^}#UtSo>ls=!H}y7n7y<9E7XX!>xcP@HBd| zdP_i>BUj-t?ry&~l43uWe!j--^|*)p!Q8elLLH8xuM@!?c-yLnc9U3))S!vaJnI|2 zM6;|fe|hu>xkmOa)4|KlWvs8)2C(u#+wnI{Vc{c<3~jBao2K>ByXF`Hv5?x5>yu3{ zOII?R9%MeNpV_EtTxW%C2LMS<6ZU2|>7R#(Q}?rx;Ry0#EBk=cF^s~+*YYt~`kzjH z1x|&F&Iv4~_?$Ttvda56;9t3^Em~%gi#gqH536=+DQcOLe%yy%czZKj^mV5+rqsv2 z?g^sQZyQJ)4WPE~XAOU!(0mGE7OP53sF&o{XN~^xW_L(~k zM=c$OsPmUl>WQU0#mj_A2baRHG;tz*atzBWsdZE3hXk=`jB%LOXg?Bzzxzt}m-h5! z#?<5Z__jZTg81lXg$>Yh2&iJ!x6vk6u<>Uxuf^I4(U_ovbxd4iQTIW zvTwzZEytn3lZK3pwyEY090a$OkY)y3?ea26UT17z8lwPfuAp|%>qiogf}pO5+FNaj z^&)V_(C{vZnQjm+43!;WZ{6vJR(IB-$r!xdU{boa!WAB{~oG!NoLFAd$6DO9gv_(dgsl??K z+z+Dk`o)8y@=j<^v&dmeOa+m)e)2_fgQrNCmHk@)DdX^)ZIF7?K42j zZyQ+(vXa+p4?ud{^c@H@ghN$+C2+ZJSn{BD)xk!=Jm9pVi#Ee~V`?aE&ysq?8YY{f zW$}_L)D-w~SZ9;oros(-Ox(r|TKQ|5Lt7+YZZf&@2f@TmEmhu#XM+#lr?8>3MgW+Z zABMggbNq-(+)P;e@G`~jw*gh$*A1iqE<@0^Z68Xco6D!Yc<&X z6rmW*DC34}r6Z^MZ(M01kr`);Na02gjSZ)V zTRDT;SDCXt2TNqfWUGf$7qpLEa?@P<^;-?YpzUzgcRrmz0j=GMmZu9bk7a>#_o1|U zTe^TQUxGPp&^=wiIBiKE^lMi^dUZEkI74kALT%DR)i|CZ^fsz1=ti0RXwxIQ3t_~9 zj%@oBh9}UA6CMVFfDbH=)tl#n7Sxj~5-KkeQX>)uIS?F{j4)15?v!Vfoj5R9*u1H4 zzet4Cv)30Vof_c%tf1!_JGrBV(qb@AsLa3bdfNg~NcfrPj zPhZ1qD)?D$fI&(+yw~AN+XEp#X*6Vd#p9V*ei=WBN?s4eq-7u8cRb_h7WWHXWgeDG zTQv+_HB@y<8n){_yAnL1)*d($Q%$iv5F3^3xWP;)&Ze+mDV~3XTVRoR>e-WB&k4p~QaL>@bN}6?@j_0O~b#HG$P>egGqFRs8CtT=mBp5#)j< z$#L}z(~)7@UBB!TW6iLI5%ZAH+_*{N=psWZV@=ZVu279wE^GgZ(Wr$wH$~chvPS@} zLv+n9i;xlS{{Bz++PDtPhv&0hZuT*4r_gZLu5$LipSQMe<#afi7pO1sBX8(jJ%aB3`?O)-w(Vc|SS~3xJ1YdKw2-J=R2_8GN_Sn@ z`%fRJp6?Z_zXq;8qdec;8{8XK?*SHHnHFDR7GJ4dAHl1iqYUo9rmiBZbUjq3-_ciN zHCx!T4TxC88{c1Xv?Trfwy^qH>PL@fbxVdUMP`zoU$A**QnvC5e{vy~Z52?iKtk!V z7sL2#>6m)(fe3eh7z>ZWD1bBDRjZo~d!9qP3vfEgQ89eo$~Au7$1$G9INq?#u?{)@ z5htuyfIDjA7A!0UXV&Yf>gUIQUWk{;koE_@E8*9_3)}x2ZTmlD1OHqS2wB@%>N+?W z{!R6-j1|HiY4`Trqh@eKiWnRcD3RWufEmdD6A(Tg=I3aCf=z&uYOG{+^I(1pCP=*R zC&g0mGUMnis?gxzW}qshW5K%F;mCNdaQ0rVYN$ja}a7uSx zyUweDeSNHw>J$oOxa{d?8Fd$fFh7B-aXDR$TG11b8a<4y$r1SH3wFyAXLwca|Wvs&$$pwJLRL0z9=laWCHMY1)om z`FT1qky>TnYui0*LNy!JJJpl-a6r8V&fDB)$^dJ9am&c9e(TQUE=i%z+nj*2?fW*s zTED>k_0HSQl_2UU9)+JTcyb(nwFAGt#{0vv471Dt0RC>P~+H;1c0r!aDOz78`^ z%w=JCR8b{z)Zjy7IJcZGCXVzHpbz)UOLBreUnhydO9()DD^BVo*Y~aI2dFrgL|hW& z7qV@x{;2)Og>STTzF&qOAVIa|E(}4nWiOHdZ(^Ow$nKJz+7u6%pxVk84S@FS zjWj^}_l;%1n^dPW(o37Km&`>J;7zpC8Tp02WSUl+uJM~1z-olRT6vMuC;RO-wFFc5dd^wP^| z2E2Wl6OM1o)5mi+Yula%Jh_ug#;4_0AJx_;vf{kmHl3LA>hh=x@PAA;1&%ibGTd+v;X);}C8p=(@?w*F4ijuCkk0nPO`{U}Z zrTMLy28DbgWuNMU2-fZf0M=R4Bvow(?)m8K+@tcU+18Bpv;h3Z6M?TvAYC-?`)-E4 zTWZo7(ERw83$$j%#U&*tpJ4Qg^NXEaJ-#;yg;Pt=X&k=ReIkQI`J!z^jjj`_;_pM5 zV*FTr^;Fzj$7Cm3o7;<8)KJU7!u+Kw6AQVMSWUX(uHo5?eR=MY?{>`*$hWcBFJkQn zz+c-bRnizcOVavlq+?je-9&UN|K66_Yt!@`7a3vv>VOqcx&za3&# zY=dvBUSh{8E*XDvs=6Z^_<^%mjVV{cD#g2sfe+3_eFM_GAm7^^iXK@V^_FF8W#4kP zxR7clLTmWX9GhImxK%VDVJl>L0P^(pvaU44j!=RUZUlbCrk$B(3NP8VK)e?+g@2Bt$wp@%*Aa_D(`0+6NiZjS>x9(nOH@R z<;1X7W$dGoj5T27d>%a0~hDJ{mu~z7d4Fo*%sl(#j7C5~5GY$T?4=c^Y5&p35d zaw(|hcXHJ|ztHpPF%`JIPo%0!tkAA!S?<^nl%#Bb2lpEeN=1uzrT&@xDXj3;Y7icl z0WBsP+Sum|T)IBL?diR~NR^}XrLd7wdh_b=NQ`-7b=>U)*&BEK?GD3qo&fc}pA(LL zt&|8FDh-W^9ET<-dDvyvPO(x zBmUI8c2jc44z~M`s(5~Gvmqhw7<`?~q*NFj(Bp8quOu>bF6O4{>ZUBEoh=VuH{RUW z2k(oc&TWjBVBG%4OOEuJji?I}yL-_c>$n5jyl>B8VA4Mzpx=OSO)qF)d@jPcEbh0O)wz< z?b(%8@rm$&ItK!eP?7~iQ-zLsN?TS^QdVAG%45tIG@o1`R%A}5moSIQ0D8^8ffVLx zj~AL7PD}#UcI6RRa%644t7wzw!B@DLQjQ@TLJ+YC1m1MysRchnMT4)yt#2@^^W)R( zL{vG8+-n}2BorKVDvGII7Mg%nX@~@^3JU*#rduNkEJ?a*DjNApHCleiCMC}EkU&}v z2}WpUGHJFzafO|>jK^->40N9(R{hLP{bKb~p;A=#crX5N_!s22o z8lI4uUObv4pCLU5Ux*%4L@lLt77^N&u-Y;jm3VjzXj^}EEtx9N5LLR9i)lIpK97G+ z8t-;5h>{&l90bU+dTD?Lt&eWIw{=?`ca-j-YE>A+e$V2f1Mrjpm%LP+QZYxk){h@R zC^l7E8!p*0(YwT3h(R(_ha|7KC1t&Ey~lCxHviq8`)+5_%nC z{U(en!Nf(;xIA=x-3mie;yHULY1L5-Q(1&ZCIwi9x54$OE$w5Ylx*PKdQ70Pk@Rxp zM&^1rWCf;Jiqdajh(DIZLmMOC+e#0mjj0-qQEWS?m3~Epp8ld#L$>NRn9;iU9d+8X zfIiKGq9s0EWQdyK^NAuG;b@BGV*-qbqfvkQU}{<>(z1@L43th&6bu^Aj%9mp_taM% zMI3CpN^rf#a2Q7mYK2F`%5u2ykqk`{9~~G~Fd-x;Bq_U^#|wBM=8`nVD(~2&LIg-t zsU!wTN`%?eLU=3u0nh9ZHQpqAVIJl>h7fvJA#33lWT7 zhzj2o+Zz$Y`Lf#;ybup#!bX8F-R?wp9xcUtV$@?q zG}?~flqTmDq@mUmKbW<~D9JTAV_%XVGymvysF5J9Qgi9#wVVZTaq|w(@JrtYnR`$n zK^}WFA3n_OSi?T^!S9tFVJ=cfP%^BemNMnWq(_w6HTM|t=by4_BhFsbhk7%=?~R1h zx5DgDXnuhs3$8~?GJH#&*hak6Mzm0NT6{U+*+dS~tJkzrJ42?A$cT6L#k1m*{^GRd zA>c5?ye_yn9NnLeNoQBuGc!xzSeJt0$S=>#$sxOKsVYBhnjA8ntkgG^uWKH~y#jw> z#qbsGqk?OAuBx@-X;p=(0~!$vNoPdsV0lwCKY!G%N(DU~^Lg#+*u>jhutTH0=7I#s zPV2EBDgrk>f`GLzc}7y9VQlNlSmb$u;d#b$dU~cZ8ur4*NUh&2a1}`dYPkvmtexnwn&G?#?+^&u z;mAs_xQcORRB_Q0IE{&twqti70xgW2KDN=PP-D8`_Wdd~50WOHx|Cd`p&j^&Z|DZh zT6_i5nm3A6OmbK{#*6aD1A^nrE4GJ=OxM$B8jQN)^+3yKs%-M6F4{R82$B$%Hm z&~Nss9Xe?pBG=jrdtWAB43}S!(EuI(+N#&ermyq$kJct{>X>hsG{Jo{4-?mxzDU!U zkHe;K1fO9JNjq|lt6|ci&nM*R;Wq9sz+e4n8N>GW=(bAHOu~!;x-Bpr$c$KEsR2I*Qg0uch;TVb0$mD&?(Z}}^}O&JU~#(On_j5o z8+NgGfI^>)W-NJV7%En?B3`bd<5neSyzD3yrVx|eF6|8uw)6M8>dj)tMjN{w4AQxKgn&>*FLN%s*@TcsnfYwFcJb4w*^TH$NBA-**BJ7uZ5wRUAxJWd z5fAv{_)OCzPu%n+1naskU?w?dMaYdbxa)$yU#I8D3QbjBWCI8Uy^a8on;TtMJ;5mC zg&k<|F)G3bVssI-drP^0QAyFmv9*cKN6DTtR(62XfK?Zw3L^d($t8pD0vcgU5-`x9 zgI}dCgqA?4#u(y2O;jNy#)>Kvx*+he>W69|Y2pv{4T`onTqsWggZ1ZVR(7hmq@<$uw<%}92c_BI+J*T2nKqv!+{kqX)159P zB>j3M;BjR2vbbai42yW&=z{Krv|KbiJ1lU{O#m}iFBI7)O2yli7!T5XcSlL?GSUP}M z`dOYnO~i;s>|uDW=&|LO@fJTFbF)i`gj2X()j|i-cyj2p;K+6LEkJ zMdIt*TR$<}%lp*E<3l+$@oZ!^!{ZKw7@WbHz6B2+w-PMv(nb?)}0#cSHD1^t?`m#h&myFdM6><+c&00aGEem)fOp!Z8wl!~UT+ zS(B!CB0jx9mehIl^b&#?A&NGUmVArG?ckdsKURNmJfu;Nq3=RHUsAsWWJ2E8x(UW{ zLZ%K#IRMeTFR8+<7=}IB{zs+Qr~OWrbXd^F5BVE>c71{}QH+&f=DM8JKBtXHI6n;E zm9D$D8?iEbkT0;x{gZ6#sPwdJ;-6Aec#vG+gVZ1hp?ALMV7ba&CeLg!*r_|jO&^m> zw}*ubbZ(NefiNKL{d>QPbtKhgMLA3Qkn{jQb7)wl{LvqF^{OSqi!3~WIAYo zI&hU`SqIZJ=LwOnfNmc1WfICJ1G`n7Fv6_u^{rpZ@`Mz-($*pH$o9a~Q8zhOrO7jk z;=8!woq(^6fj+zyN}|#@vJn)Et7LdYbBNt9`;wp!OvGd(Mr4+M4$9JU%M;Wz}} zSO_V6*iC9764})^Md*_v+Itmom|Kv>9RlgeDbw1p@!6CGW5^(CL(|_C2v1v-N zB6fmAY}*UNb#%3GbR$rk?3?D_)>T)-U2J9=%1#7WUoPKjm;chd+if!o->60|Iw)Z~ zEWC-~&#qIXJ|@8mmo#IPRcQulDA;JP zIJ2h++H^aH>*X-0Qx9P$Bp#*STglQhLU;~g*5GZR4!pHrIPJrex{kILEXPEjG{tsA z++MfX>{ud^YIzEqUVZI7q+m!c>~mM<3*NOR|sJvvhTM})dAr4|73 zlCC&;S(od~`+H*?`Eh~`kQOlJrP@O1e799A5X@%81=Jdd^~UH0t&{BPN<{7j3J2!> z2Eq$oc~9GeWh*lKrBf@&c@MS=>RC_AC3!2j^$(9)w=bOM-QA72UjFyn*Di3{{ot3D z9E5V0x-lV9!66TYq}_#uomRHAIEb1q8m->k@Lx6|E&*J4o)PyU4HxK_)R{=%Hl&Fl zzQqM@T+89SNu)-QdRb94{hylO+dnbxZkst5_oC-W(1QUjy+rVQjxd z3OB26NZF$9$p}h!mGqn@hq*?FGY6;9;zIKDwQZ?U=Ee9v_c&Jt3rRI&9_;q^kk?m+ zQk9B2{M@|S3g|4*De|;Vkq|U8*;5wa66_;G5$UUWVDghUOgDPTCBJ1Y9Txk>Xm_N6 zE*{J6m-ppRj*mHgc5nHaD1`64E1RD_B%`J*G{IPb^6>Cyw%+MxsN&9(?z&jb{HIg( zZHfqpHmdfiIZSAQ!`vvR-l;)wr#50J-pfb8+?5H{^Ou^<@c-Okrs5G)U?q=B&AHHtIgW0N zZKZ7P)mI`C^#hpU2J$we!C29L>>mSwK03@0&xxz7ozu*&%BfP*vMs55StC;{o6{rF2QUxZFa%18|M)YZRCZZl!7{rrzV2q_KO8GWDykmJ3+>$(W6kcha4E4CDrZL0kF3c} zKHGXL(Gw`9ou_^TWI+pW;sI$!@36?2d=mpVae8>rvajvDwL!vJv>e0PtwoFAySK9G z%@;N)j*Ef$fQDn~j)wp*(<2y-$J8leOB;@o#FM=sk=X_+)}wTFCf-R<-^o#ho!SFq zf|9h1(W*q*o8qS3j$#}W8MD-{$dV?+H_voG*SADyZW+7yV#srqM6)!ZnM&_S$QYy& zxSx#u!jQprf$DcNTV885;DT0tdnxO|;nP8rbDC=mKf5-FRBPWj*njowp+3+@B;fzw zd-$E$`QG3@obvuU{;$38+aFHEe-HhWB=EZz@vneiEzgJI{r!JK|G}B~9|!+eroDfJ z|1r40J4NhI3*Wzw`G0MG-z)h3)_zUb=x-7KXwv(S4?YXLP$;J;A&W&R7)zY&FhNBx~k`WNbn+<$@k zH)iSYsJ}A~|3bx5{LiR=@(+K<{GCtr7iO%=f5!a3?5f}Kf8U(_3;(;$e}n(qR;`RU TDA+Fu#P=7`d(X|~*Qfsh7x-an From f073b0c2604c7a177eca3c932f78330436e37c3d Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:38:36 -0400 Subject: [PATCH 088/121] Some bug fixes (#266) Thank you @dickermoshe * Do not use Timezone when calculating `getLocalMeanTime` * Refine equation of time calculation in NOAACalculator * Handle month transition for NISSAN in JewishDate * Fix variable scope for newt in NOAACalculator --- .../kosherjava/zmanim/AstronomicalCalendar.java | 5 +++-- .../zmanim/hebrewcalendar/JewishDate.java | 5 +++-- .../com/kosherjava/zmanim/util/NOAACalculator.java | 14 +++++++++----- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 538e0eb2..c2bbf5f1 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -721,8 +721,9 @@ public double getSunsetSolarDipFromOffset(double minutes) { * @see GeoLocation#getLocalMeanTimeOffset(Instant) */ public Instant getLocalMeanTime(LocalTime localTime) { - Instant civilTime = ZonedDateTime.of(getAdjustedLocalDate(), localTime, getGeoLocation().getZoneId()).toInstant(); - return getTimeOffset(civilTime, -getGeoLocation().getLocalMeanTimeOffset(civilTime)); + Instant localMeanTime = LocalDateTime.of(getAdjustedLocalDate(), localTime).toInstant(ZoneOffset.UTC); + long longitudeOffsetMillis = (long) (getGeoLocation().getLongitude() * 4 * MINUTE_MILLIS); + return getTimeOffset(localMeanTime, -longitudeOffsetMillis); } /** diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 577c9d5d..0e8a55dd 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -1093,8 +1093,9 @@ public void minusMonths(int months){ if (month == TISHREI) { month = ELUL; year--; - } else if ((! isJewishLeapYear(year) && month == ADAR) - || (isJewishLeapYear(year) && month == ADAR_II)){ + } else if (month == NISSAN) { + month = getLastMonthOfJewishYear(year); + } else if (!isJewishLeapYear(year) && month == ADAR){ month = SHEVAT; } else { month--; diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index dfd41802..880b42f4 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -478,11 +478,15 @@ private static double getSolarNoonMidnightUTC(double julianDay, double longitude double tnoon = getJulianCenturiesFromJulianDay(julianDay + longitude / 360.0); double equationOfTime = getEquationOfTime(tnoon); double solNoonUTC = (longitude * 4) - equationOfTime; // minutes - - // second pass - double newt = getJulianCenturiesFromJulianDay(julianDay + solNoonUTC / 1440.0); - equationOfTime = getEquationOfTime(newt); - return (solarEvent == SolarEvent.NOON ? 720 : 1440) + (longitude * 4) - equationOfTime; + + // Refine the equation of time at the calculated transit time. + double newt; + for (int i = 0; i < 2; i++) { + newt = getJulianCenturiesFromJulianDay(julianDay + solNoonUTC / 1440.0); + equationOfTime = getEquationOfTime(newt); + solNoonUTC = (solarEvent == SolarEvent.NOON ? 720 : 1440) + (longitude * 4) - equationOfTime; + } + return (solarEvent == SolarEvent.NOON ? 720 : 1440) + (longitude * 4 ) - equationOfTime; } /** From d563184896b9084e76e09e231847f81d689174dc Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 12:44:29 -0400 Subject: [PATCH 089/121] Update codeql-analysis.yml actions to @v4 --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9ff27ae1..2e38a31f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -49,7 +49,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -63,4 +63,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 From 20dec8361707ad4a5b9a58db9d60a5fc599a94bc Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 15:15:42 -0400 Subject: [PATCH 090/121] revert codeql-analysis.yml to @v3 --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2e38a31f..b36e3c0f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,7 +38,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v4 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -49,7 +49,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v4 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From 2ef1ea5816c253759249896f8adc248d7208ea75 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 22:43:10 -0400 Subject: [PATCH 091/121] Additional clarification that AstronomicalCalendar.getSolarMidnight() is at the end of the day --- .../zmanim/AstronomicalCalendar.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index c2bbf5f1..31332152 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -528,10 +528,11 @@ public Instant getSunTransit() { } /** - * A method that returns solar midnight at the end of the current day (that may actually be after midnight of the day it is being - * calculated for). It occurs when the Sun is transiting the - * lower celestial meridian, or when the sun is at it's nadir. The calculations used by this class depend on the {@link + * A method that returns solar midnight as the end of the day (that may actually be after midnight of the day it is + * being calculated for). For example calculating solar midnight for February 8, will calculate it for midnight between February + * 8 and February 9. It occurs when the Sun is transiting the + * lower celestial meridian, or when the sun is at it's + * nadir. The calculations used by this class depend on the {@link * AstronomicalCalculator} used. If this calendar instance is {@link setAstronomicalCalculator(AstronomicalCalculator) set} to use * the {@link com.kosherjava.zmanim.util.NOAACalculator} (the default) it will calculate astronomical midnight. If the calendar * instance is to use the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO Calculator}, that does not have code to @@ -540,10 +541,10 @@ public Instant getSunTransit() { * See The Definition of Chatzos for details on the proper * definition of solar noon / midday. * - * @return the Instant representing Sun's lower transit at the end of the current day. If the calculation can't be - * computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does not - * support getting solar noon or midnight for 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. This is not relevant when using the + * @return the Instant representing Sun's lower transit at the end of the current day. If the calculation + * can't be computed such as when using the {@link com.kosherjava.zmanim.util.SunTimesCalculator USNO calculator} that does + * not support getting solar noon or midnight for 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. This is not relevant when using the * {@link com.kosherjava.zmanim.util.NOAACalculator NOAA Calculator} that is never expected to return null. * See the detailed explanation on top of the page. * @@ -721,7 +722,7 @@ public double getSunsetSolarDipFromOffset(double minutes) { * @see GeoLocation#getLocalMeanTimeOffset(Instant) */ public Instant getLocalMeanTime(LocalTime localTime) { - Instant localMeanTime = LocalDateTime.of(getAdjustedLocalDate(), localTime).toInstant(ZoneOffset.UTC); + Instant localMeanTime = LocalDateTime.of(getAdjustedLocalDate(), localTime).toInstant(ZoneOffset.UTC); long longitudeOffsetMillis = (long) (getGeoLocation().getLongitude() * 4 * MINUTE_MILLIS); return getTimeOffset(localMeanTime, -longitudeOffsetMillis); } @@ -884,8 +885,8 @@ public Object clone() { // Required by the compiler. Should never be reached since we implement clone() } if (clone != null) { - clone.setGeoLocation((GeoLocation) getGeoLocation().clone()); - clone.setAstronomicalCalculator((AstronomicalCalculator) getAstronomicalCalculator().clone()); + clone.setGeoLocation((GeoLocation) getGeoLocation().clone()); // consider converting the GeoLocation class to be immutable to avoid the deep copy + clone.setAstronomicalCalculator((AstronomicalCalculator) getAstronomicalCalculator().clone()); // likely not needed } return clone; } From 5042f9d8d4a8c05399e5ce059df34c03a534d331 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 22:45:23 -0400 Subject: [PATCH 092/121] Calrify documentation that ZmanimCalendar.getChatzosHalayla() is at the end of the day --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 809184c9..fef567ff 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -378,29 +378,33 @@ public Instant getChatzosHayom() { } /** - * This method returns {@link getSolarMidnight() Astronomical chatzos halayla} if the {@link - * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link - * isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link #getChatzos(Instant, Instant) - * halfway point} between sunset and the following day's sunrise, 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 + * A method that returns chatzos halayla at the end of the day (the last zman of the day + * returned by the calendar, that may actually be after midnight of the day it is being calculated for). For example, if + * calculating it for the date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the + * zman as sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be + * returned if the {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link + * isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true. Otherwise the {@link #getChatzos(Instant, + * Instant) halfway point} between sunset and the following day's sunrise, 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 halayla as * halfway between sunset and the following day's sunrise (identical to six shaos zmaniyos after sunset), while the * NOAACalculator calculates it more accurately as {@link getSolarMidnight() astronomical chatzos halayla}. See The Definition of Chatzos for a detailed explanation of - * the ways to calculate Chatzos. Since half-night chatzos can be null in the Arctic on a day when - * either sunset or the following day's sunrise did not happen and astronomical chatzos halayla can be calculated even in - * the Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the - * calculator, astronomical chatzos will be returned to avoid returning a null. + * "https://kosherjava.com/2020/07/02/definition-of-chatzos/">The Definition of Chatzos for a detailed explanation + * of the ways to calculate Chatzos. Since half-night chatzos can be null in the Arctic on a day + * when either sunset or the following day's sunrise did not happen and astronomical chatzos halayla can be calculated + * even in the Arctic, if half-day chatzos calculates as null and astronomical chatzos is + * supported by the calculator, astronomical chatzos will be returned to avoid returning a null. * * @see getSolarMidnight() * @see getChatzos(Instant, Instant) * @see isUseAstronomicalChatzos() * @see setUseAstronomicalChatzos(boolean) - * @return the Instant of chatzos halayla. If the calculation can't be computed such as in the Arctic Circle - * where there is at least one day where the sun does not rise, and one where it does not set, and the calculator does not - * support astronomical calculations (that will never report a null) a null will be returned. - * See detailed explanation on top of the {@link AstronomicalCalendar} documentation. + * @return the Instant of chatzos halayla at the end of the current day. If the calculation can't be + * computed such as in the Arctic Circle where there is at least one day where the sun does not rise, and one where it + * does not set, and the calculator does not support astronomical calculations (that will never report a + * null) a null will be returned. See detailed explanation on top of the + * {@link AstronomicalCalendar} documentation. */ public Instant getChatzosHalayla() { if (isUseAstronomicalChatzos()) { From 6f1da01fa51a0bc8cb49a739a286a1726b078392 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:12:22 -0400 Subject: [PATCH 093/121] AstronomicalCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation() * This restores getSunrise() and getSunset() to their previous implementation (that was only recently changed on the 3-0-modernization branch) --- .../zmanim/AstronomicalCalendar.java | 76 ++++++------------- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 31332152..bc0185f2 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -110,12 +110,12 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The getSunriseWithElevation method returns a Instant 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 {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of - * refraction and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. - * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. + * The method returns an Instant 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 {@link + * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes + * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. See documentation for the + * specific implementation of the {@link AstronomicalCalculator} that you are using. * * @return the Instant representing the exact sunrise 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, a @@ -124,28 +124,13 @@ public class AstronomicalCalendar implements Cloneable { * @see getSeaLevelSunrise() * @see getUTCSunrise(double) */ - public Instant getSunriseWithElevation() { - double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); - if (Double.isNaN(sunrise)) { + public Instant getSunrise() { + double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); + if (Double.isNaN(sunrise)) { return null; } else { return getInstantFromTime(sunrise, SolarEvent.SUNRISE); } - } - /** - * @deprecated Use {@link getSunriseWithElevation()} instead. This method already accounts for the observer's elevation, but the - * name does not clearly indicate this behavior. The replacement method has a clearer and more descriptive name. - * - * @return the Instant representing the exact sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith(double, double) - * @see getSeaLevelSunrise() - * @see getUTCSunrise(double) - */ - @Deprecated(forRemoval = false) - public Instant getSunrise() { - return getSunriseWithElevation(); } /** @@ -202,15 +187,14 @@ public Instant getBeginNauticalTwilight() { public Instant getBeginAstronomicalTwilight() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } - + /** - * The getSunsetWithElevation method returns an Instant 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 {@link AstronomicalCalculator} to add approximately 50/60 of a - * degree to account for 34 archminutes of refraction and 16 archminutes for the sun's radius for a total of {@link - * AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See documentation for the specific implementation of the - * {@link AstronomicalCalculator} that you are using. + * The method returns an Instant 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 {@link + * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes + * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See + * documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. * Note: In certain cases the calculates sunset will occur before sunrise. This will typically happen when a time zone other than * the local timezone is used (calculating Los Angeles sunset using a GMT time zone for example). In this case the sunset date * will be incremented to the following date. @@ -222,29 +206,13 @@ public Instant getBeginAstronomicalTwilight() { * @see getSeaLevelSunset() * @see getUTCSunset(double) */ - public Instant getSunsetWithElevation() { - double sunset = getUTCSunset(GEOMETRIC_ZENITH); - if (Double.isNaN(sunset)) { - return null; - } else { - return getInstantFromTime(sunset, SolarEvent.SUNSET); - } - } - - /** - * @deprecated Use {@link getSunsetWithElevation()} instead. This method already accounts for the observer's elevation, but its - * name does not clearly reflect that behavior. The replacement method provides a more accurate and descriptive name. - * - * @return the Instant representing the exact sunset 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, a - * null will be returned. See detailed explanation on top of the page. - * @see AstronomicalCalculator#adjustZenith(double, double) - * @see getSeaLevelSunset() - * @see getUTCSunset(double) - */ - @Deprecated(forRemoval = false) public Instant getSunset() { - return getSunsetWithElevation(); + double sunset = getUTCSunset(GEOMETRIC_ZENITH); + if (Double.isNaN(sunset)) { + return null; + } else { + return getInstantFromTime(sunset, SolarEvent.SUNSET); + } } /** From e5b6076c9da806516a38a9a07b50c083c515f337 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:18:01 -0400 Subject: [PATCH 094/121] JavaDoc changes for recent AstronomicalCalendar changes --- .../zmanim/AstronomicalCalendar.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index bc0185f2..3297ea82 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -30,8 +30,8 @@ import com.kosherjava.zmanim.util.ZmanimFormatter; /** - * A Java calendar that calculates astronomical times such as {@link getSunriseWithElevation() sunrise}, {@link - * getSunsetWithElevation() sunset} and twilight times. This class contains a {@link getLocalDate() LocalDate} and can therefore + * A Java calendar that calculates astronomical times such as {@link getSunrise() sunrise}, {@link + * getSunset() sunset} and twilight times. This class contains a {@link getLocalDate() LocalDate} and can therefore * use the standard Calendar functionality to change dates etc. The calculation engine used to calculate the astronomical times can * be changed to a different implementation by implementing the abstract {@link AstronomicalCalculator} and setting it withthe {@link * setAstronomicalCalculator(AstronomicalCalculator)}. A number of different calculation engine implementations are included in the @@ -142,7 +142,7 @@ public Instant getSunrise() { * @return the Instant representing the exact sea-level sunrise 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, a null will be returned. See detailed explanation on top of the page. - * @see getSunriseWithElevation() + * @see getSunrise() * @see getUTCSeaLevelSunrise(double) * @see getSeaLevelSunset() */ @@ -224,7 +224,7 @@ public Instant getSunset() { * @return the Instant representing the exact sea-level sunset 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, a null will be returned. See detailed explanation on top of the page. - * @see getSunsetWithElevation() + * @see getSunset() * @see getUTCSeaLevelSunset(double) */ public Instant getSeaLevelSunset() { @@ -303,15 +303,15 @@ public static Instant getTimeOffset(Instant time, long offsetMillis) { } /** - * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunriseWithElevation() + * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunrise() * sunrise}. Note that the degree offset is from the vertical, so for a calculation of 14° before sunrise, an offset of 14 * + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees before {@link getSunriseWithElevation()} to use in the calculation. For time after sunrise use negative + * the degrees before {@link getSunrise()} to use in the calculation. For time after sunrise use negative * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° before sunrise, an offset * of 14 + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunriseWithElevation()}. If the calculation + * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunrise()}. 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 page. @@ -323,15 +323,15 @@ public Instant getSunriseOffsetByDegrees(double offsetZenith) { } /** - * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunsetWithElevation() + * A utility method that returns the time of an offset by degrees below or above the horizon of {@link getSunset() * sunset}. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an offset of 14 + * {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. * * @param offsetZenith - * the degrees after {@link getSunsetWithElevation()} to use in the calculation. For time before sunset use negative + * the degrees after {@link getSunset()} to use in the calculation. For time before sunset use negative * numbers. Note that the degree offset is from the vertical, so for a calculation of 14° after sunset, an offset * of 14 + {@link GEOMETRIC_ZENITH} = 104 would have to be passed as a parameter. - * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunsetWithElevation()}. If the calculation + * @return The {@link java.time.Instant} of the offset after (or before) {@link getSunset()}. 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 * and one where it does not set, a null will be returned. See detailed explanation on top of the page. */ @@ -449,7 +449,7 @@ public long getTemporalHour() { /** * A utility method that will allow the calculation of a temporal (solar) hour based on the sunrise and sunset passed as * parameters to this method. An example of the use of this method would be the calculation of a elevation adjusted temporal - * hour by passing in {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} as parameters. + * hour by passing in {@link getSunrise() sunrise} and {@link getSunset() sunset} as parameters. * * @param startOfDay * The start of the day. From d8870e8f8fb43d87cb29be39f22e63b161133870 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:31:07 -0400 Subject: [PATCH 095/121] ZmanimCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation() * This restores getSunrise() and getSunset() to their previous implementation (that was only recently changed on the 3-0-modernization branch) --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 188 ++++++++---------- 1 file changed, 86 insertions(+), 102 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index fef567ff..98dec99a 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -39,7 +39,7 @@ * >Shimush Zekeinim, Ch. 1, page 17 states that obstructing horizons should be factored into zmanim calculations. The * setting defaults to false (elevation will not be used for zmanim calculations besides sunrise and sunset), unless the * setting is changed to true in {@link setUseElevation(boolean)}. This will impact sunrise and sunset-based zmanim such as - * {@link getSunriseWithElevation()}, {@link getSunsetWithElevation()}, {@link getSofZmanShmaGRA()}, alos-based + * {@link getSunrise()}, {@link getSunset()}, {@link getSofZmanShmaGRA()}, alos-based * zmanim such as {@link getSofZmanShmaMGA72Minutes()} that are based on a fixed offset of sunrise or sunset and * zmanim based on a percentage of the day such as {@link ComprehensiveZmanimCalendar#getSofZmanShmaMGA90MinutesZmanis()} * that are based on sunrise and sunset. Even when set to true it will not impact zmanim that are a degree-based offset of @@ -252,44 +252,28 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), - * or elevation adjusted {@link getSunriseWithElevation()} if it is true. This allows relevant zmanim in this and - * extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. - * - * @return {@link getSeaLevelSunrise()} if {@link isUseElevation()} is false (the default), or elevation adjusted - * {@link getSunriseWithElevation()} if it is true. - * @see getSunriseWithElevation() - */ - protected Instant getSunriseBasedOnElevationSetting() { - if (isUseElevation()) { - return super.getSunriseWithElevation(); - } - return getSeaLevelSunrise(); - } - - /** - * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), - * or elevation adjusted {@link getSunriseWithElevation()} if it is true. This allows relevant zmanim - * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. + * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim in this and extending classes + * (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * * @return {@link getSeaLevelSunset()} if {@link isUseElevation()} is false (the default), or elevation adjusted - * {@link getSunsetWithElevation()} if it is true. - * @see getSunsetWithElevation() + * {@link getSunset()} if it is true. + * @see getSunset() */ - protected Instant getSunsetBasedOnElevationSetting() { + /*protected Instant getSunset() { if (isUseElevation()) { - return super.getSunsetWithElevation(); + return super.getSunset(); } return getSeaLevelSunset(); - } + }*/ /** - * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the - * {@link GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunsetWithElevation() sunset}, a time that Rabbi - * Meir Posen in his the Ohr Meir calculated that 3 small - * stars are visible, which is later than the required 3 medium stars. This calculation is based on the sun's position below - * the horizon 36 minutes after {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which - * is 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}. + * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the {@link + * GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunset() sunset}, a time that Rabbi Meir Posen in his the + * Ohr Meir calculated that 3 small stars are visible, which is + * later than the required 3 medium stars. This calculation is based on the sun's position below the horizon 36 minutes after + * {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which is + * 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return The Instant of nightfall. 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 @@ -303,11 +287,11 @@ public Instant getTzaisGeonim8Point5Degrees() { /** * Returns alos (dawn) based on the time when the sun is {@link ZENITH_16_POINT_1 16.1°} below the - * eastern {@link GEOMETRIC_ZENITH geometric horizon} before {@link getSunriseWithElevation() sunrise}. This is based on the + * eastern {@link GEOMETRIC_ZENITH geometric horizon} before {@link getSunrise() sunrise}. This is based on the * calculation that the time between dawn and sunrise (and sunset to nightfall) is 72 minutes, the time that is * takes to walk 4 mil at * 18 minutes a mil (Rambam and others). The sun's position - * below the horizon 72 minutes before {@link getSunriseWithElevation() sunrise} in Jerusalem on the around the equinox / equilux is * 16.1° below {@link GEOMETRIC_ZENITH}. * @@ -323,7 +307,7 @@ public Instant getAlos16Point1Degrees() { } /** - * Method to return alos (dawn) calculated as 72 minutes before {@link getSunriseWithElevation() sunrise} or + * Method to return alos (dawn) calculated as 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 @@ -337,23 +321,24 @@ public Instant getAlos16Point1Degrees() { * documentation. */ public Instant getAlos72Minutes() { - return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS); + return getTimeOffset(getSunrise(), -72 * MINUTE_MILLIS); } /** - * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the - * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and - * {@link isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() - * 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 + * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the {@link + * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link isUseAstronomicalChatzos() + * isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() 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 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 - * the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can be calculated even in the - * Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the - * calculator, astronomical chatzos will be returned to avoid returning a null. + * chatzos}. See The Definition of + * Chatzos for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can + * be null in the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can + * be calculated even in the Arctic, if half-day chatzos calculates as null and astronomical + * chatzos is supported by the calculator, astronomical chatzos will be returned to avoid returning a + * null. * * @see getSunTransit() * @see getChatzosHayomAsHalfDay() @@ -378,11 +363,11 @@ public Instant getChatzosHayom() { } /** - * A method that returns chatzos halayla at the end of the day (the last zman of the day - * returned by the calendar, that may actually be after midnight of the day it is being calculated for). For example, if - * calculating it for the date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the - * zman as sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be - * returned if the {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link + * A method that returns chatzos halayla at the end of the day (the last zman of the day returned by the + * calendar, that may actually be after midnight of the day it is being calculated for). For example, if calculating it for the + * date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the zman as + * sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be returned if the + * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link * isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true. Otherwise the {@link #getChatzos(Instant, * Instant) halfway point} between sunset and the following day's sunrise, 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, @@ -503,9 +488,9 @@ public Instant getChatzosHayomAsHalfDay() { * hours), and the latest zman krias shema is calculated as 3 of those shaos zmaniyos after the beginning of * the day. If {@link isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be * based on 1/6 of the time between sunrise and {@link getSunTransit() astronomical chatzos}. As an example, passing - * {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() sea level - * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunriseBasedOnElevationSetting()} and - * {@link getSunsetBasedOnElevationSetting()} that is driven off the {@link isUseElevation()} setting) will return sof zman + * {@link getSunrise() sunrise} and {@link getSunset() sunset} or {@link getSeaLevelSunrise() sea level + * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunrise()} and + * {@link getSunset()} that is driven off the {@link isUseElevation()} setting) will return sof zman * krias shema according to the opinion of the GRA. In cases where * the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar * #getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees()} false should be passed to the synchronous parameter @@ -536,9 +521,10 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean sync } /** - * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, boolean)} - * 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. + * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, + * boolean)} 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 * to this method. @@ -556,13 +542,12 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { } /** - * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * - * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() 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 getSeaLevelSunset() sea level - * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the - * {@link isUseElevation()} setting). + * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * {@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 getSeaLevelSunset() sea level sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} + * (depending on the {@link isUseElevation()} setting). * * @see getSofZmanShma(Instant, Instant) * @see getShaahZmanisGRA() @@ -574,17 +559,16 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { * of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanShmaGRA() { - return getSofZmanShma(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getSofZmanShma(getSunrise(), getSunset(), true); } /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link - * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion - * of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to - * {@link getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link - * getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}. + * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis72Minutes() + * shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion of the MGA that the day is + * calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link getTzais72Minutes() nightfall} of + * 72 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 @@ -608,7 +592,7 @@ public Instant getSofZmanShmaMGA72Minutes() { * 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 getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} is used. + * offset from either {@link getSunset() sunset} or {@link getSeaLevelSunset() sea level sunset} is used. * * @see ComprehensiveZmanimCalendar#getTzais16Point1Degrees() * @return the Instant representing 72 minutes after sunset. If the calculation can't be @@ -617,7 +601,7 @@ public Instant getSofZmanShmaMGA72Minutes() { * {@link AstronomicalCalendar} documentation. */ public Instant getTzais72Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 72 * MINUTE_MILLIS); } /** @@ -645,7 +629,7 @@ public Instant getCandleLighting() { * 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 sof zman tfila is calculated as 4 of those shaos zmaniyos after the beginning of the day. - * As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() + * 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 {@link isUseElevation()} * elevation setting) to this method will return zman tfilah according to the opinion of the GRA. This method's synchronous parameter indicates if the start @@ -802,11 +786,11 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * - * {@link getShaahZmanisGRA() shaos zmaniyos }(solar hours) after {@link getSunriseWithElevation() sunrise} or + * {@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 getSeaLevelSunset() sea level - * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the + * sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} (depending on the * {@link isUseElevation()} setting). * * @see getSofZmanTfila(Instant, Instant) @@ -818,7 +802,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanTfilaGRA() { - return getSofZmanTfila(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getSofZmanTfila(getSunrise(), getSunset(), true); } @@ -826,8 +810,8 @@ public Instant getSofZmanTfilaGRA() { * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * {@link * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes()}, according to the * Magen Avraham (MGA). The day is calculated - * from 72 minutes before {@link getSunriseBasedOnElevationSetting()} to 72 minutes after {@link - * getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link isUseElevation()} setting). + * from 72 minutes before {@link getSunrise()} to 72 minutes after {@link + * getSunset()}. The use of elevation depends on the {@link isUseElevation()} setting). * * @return the Instant 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 @@ -846,7 +830,7 @@ public Instant getSofZmanTfilaMGA72Minutes() { * 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 - * of the day. As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or + * of the day. 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 {@link * isUseElevation()} elevation setting) to this method will return mincha gedola according to the opinion of the * GRA. Alternatively, this method uses {@link @@ -913,14 +897,14 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { /** * This method returns the latest mincha gedola,the earliest time one can pray mincha that is 6.5 * - * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() sunrise} or + * {@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. Mincha gedola is the earliest * time one can pray mincha. The Ramba"m is of the opinion that it is better to delay mincha until * {@link getMinchaKetanaGRA() mincha ketana GRA} 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 getSeaLevelSunset() sea level - * sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} + * 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 * getSunTransit() astronomical chatzos} or {@link getChatzosHayomAsHalfDay() chatzos as half a day} @@ -936,7 +920,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaGedolaGRA() { - return getMinchaGedola(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getMinchaGedola(getSunrise(), getSunset(), true); } /** @@ -945,7 +929,7 @@ public Instant getMinchaGedolaGRA() { * 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 * samuch lemincha ketana is calculated as 9 of those shaos zmaniyos after the beginning of the day. - * For example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() sea + * For 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 samuch lemincha ketana according to the opinion of the * GRA. See the shaos zmaniyos (temporal hours), and * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() sea + * 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 if the start @@ -1063,12 +1047,12 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { /** * This method returns mincha ketana,the preferred earliest time to pray mincha in the * opinion of the Rambam and others, that is 9.5 - * * {@link getShaahZmanisGRA() shaos zmaniyos} (solar hours) after {@link getSunriseWithElevation() sunrise} or + * * {@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. For more information on this see the * documentation on {@link getMinchaGedolaGRA() mincha gedola}. * The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} to {@link getSeaLevelSunset() sea level - * sunset} or from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} + * sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} (depending on the {@link isUseElevation()} * setting. * * @see getMinchaKetana(Instant, Instant) @@ -1081,7 +1065,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaKetanaGRA() { - return getMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getMinchaKetana(getSunrise(), getSunset(), true); } /** @@ -1090,7 +1074,7 @@ public Instant getMinchaKetanaGRA() { * the day passed to the method. * The time from the start of day to the end of day are divided into 12 shaos zmaniyos (temporal hours), and * plag hamincha is calculated as 10.75 of those shaos zmaniyos after the beginning of the day. As an - * example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link getSeaLevelSunrise() sea level + * 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 plag mincha according to the opinion of the * GRA. This method's synchronous parameter indicates if the start @@ -1144,11 +1128,11 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { /** * This method returns plag hamincha, that is 10.75 * {@link getShaahZmanisGRA() shaos zmaniyos} - * (solar hours) after {@link getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on + * (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 getSeaLevelSunset() sea level - * sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} + * sunset} or {@link getSunrise() sunrise} to {@link getSunset() sunset} (depending on the {@link isUseElevation()} * * @see getPlagHamincha(Instant, Instant, boolean) * @see getPlagHamincha(Instant, Instant) @@ -1159,14 +1143,14 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getPlagHaminchaGRA() { - return getPlagHamincha(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getPlagHamincha(getSunrise(), getSunset(), true); } /** * A method that returns a shaah zmanis ({@link getTemporalHour(Instant, Instant) 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 level - * sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() + * sunrise} to {@link getSeaLevelSunset() 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 account for elevation. * @@ -1180,13 +1164,13 @@ public Instant getPlagHaminchaGRA() { * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() */ public long getShaahZmanisGRA() { - return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting()); + return getTemporalHour(getSunrise(), getSunset()); } /** * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. As an * example passing 1.5 to this method as done in the {@link ComprehensiveZmanimCalendar#getTzais90Zmanis()} will return - * the time 90 minutes zmaniyos after {@link getSunsetBasedOnElevationSetting()}, a zman known as + * the time 90 minutes zmaniyos after {@link getSunset()}, a zman known as * the achtel zman or 1/8th of the length of the day (12 * 60 = 720-minute day / 8 = 90 or 1.5 hours * zmaniyos) after sunset. * @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn @@ -1209,9 +1193,9 @@ public Instant getZmanisBasedOffset(double hours) { } if (hours > 0) { - return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunset(), (long) (shaahZmanis * hours)); } else { - return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunrise(), (long) (shaahZmanis * hours)); } } @@ -1219,9 +1203,9 @@ public Instant getZmanisBasedOffset(double hours) { * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72-minute 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 getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() + * 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 - * getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} elevation + * getSunset() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} elevation * setting). This day is split into 12 equal parts with each part being a shaah zmanis. Alternate methods of calculating * a shaah zmanis according to the Magen Avraham (MGA) are available in the subclass {@link ComprehensiveZmanimCalendar}. * @@ -1285,7 +1269,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { /** * This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition. * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this - * class. Sunset is the classes current day's {@link getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the + * class. Sunset is the classes current day's {@link getSunset() elevation adjusted sunset} that observes the * {@link isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. * * @param currentTime the current time @@ -1304,7 +1288,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr jewishCalendar.setInIsrael(inIsrael); - if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunsetBasedOnElevationSetting()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah + if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunset()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah return true; } @@ -1341,7 +1325,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr * 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 page. * - * @see getSunriseWithElevation() + * @see getSunrise() * @see getSeaLevelSunrise() * @see getSunsetBaalHatanya() * @see ZENITH_1_POINT_583 @@ -1372,7 +1356,7 @@ protected Instant getSunriseBaalHatanya() { * rise, and one where it does not set, a null will be returned. See detailed explanation on top of * the {@link AstronomicalCalendar} documentation. * - * @see getSunsetWithElevation() + * @see getSunset() * @see getSeaLevelSunset() * @see getSunriseBaalHatanya() * @see ZENITH_1_POINT_583 @@ -1385,7 +1369,7 @@ protected Instant getSunsetBaalHatanya() { * 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 shaos zmaniyos passed to the method. This * simplifies the code in other methods such as {@link getPlagHamincha(Instant, Instant)} and cuts down on code replication. - * As an example, passing {@link getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() sunset} or {@link + * 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 {@link * isUseElevation()} elevation setting) and 10.75 hours to this method will return plag mincha according to the * opinion of the GRA. From 628328ac27b94ce3594b4af392982bf61783a951 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:32:53 -0400 Subject: [PATCH 096/121] ComprehensiveZmanimCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation() * This restores getSunrise() and getSunset() to their previous implementation (that was only recently changed on the 3-0-modernization branch) --- .../zmanim/ComprehensiveZmanimCalendar.java | 202 +++++++++--------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index e4650d95..72f4f72d 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -30,7 +30,7 @@ * 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 * {@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 getSunriseWithElevation() sunrise} and {@link getSunsetWithElevation() + * 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. *

First create the Calendar for the location you would like to calculate: * @@ -422,11 +422,11 @@ public long getShaahZmanis60Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation + * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This calculation * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day - * from {@link getSunrise() sunrise} to {@link getSunset() sunset}. + * from {@link getSunset() sunrise} to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -457,10 +457,10 @@ public long getShaahZmanis90Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides + * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal - * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunrise() sunrise} + * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunset() sunrise} * to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed @@ -477,11 +477,11 @@ public long getShaahZmanis90MinutesZmanis() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides + * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 equal * parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from {@link - * getSunrise() sunrise} to {@link getSunset() sunset}. + * getSunset() sunrise} to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -498,7 +498,7 @@ public long getShaahZmanis96MinutesZmanis() { * Method to return a shaah zmanis (temporal hour) according to the opinion of the * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th * of sunrise to sunset day, or {@link getAlos72Zmanis() 72} minutes zmaniyos of such a day before - * {@link getSunrise() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40 + * {@link getSunset() 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 (midday) will not be the point that the sun is {@link getSunTransit() halfway across @@ -600,11 +600,11 @@ public long getShaahZmanis120Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides + * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes * zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is split into 12 equal * parts with each part being a shaah zmanis. This is identical to 1/6th of the day from {@link - * getSunrise() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are + * getSunset() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached, * zmanim that use this should only be used lechumra such as delaying the start of nighttime mitzvos. * @@ -673,7 +673,7 @@ public Instant getPlagHamincha120Minutes() { } /** - * Method to return alos (dawn) calculated as 60 minutes before {@link getSunrise() sunrise} or + * Method to return alos (dawn) calculated as 60 minutes before {@link getSunset() sunrise} or * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is the * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the mil so the time for 4 mil is * 72 minutes which is 1/10th 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 + * level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link * getSunset() sunset} (depending on the {@link isUseElevation()} setting). The actual calculation is {@link - * getSunrise()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars + * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * @@ -727,7 +727,7 @@ public Instant getAlos72Zmanis() { } /** - * Method to return alos (dawn) calculated using 96 minutes before {@link getSunrise() sunrise} or + * Method to return alos (dawn) calculated using 96 minutes before {@link getSunset() 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. @@ -742,18 +742,18 @@ public Instant getAlos72Zmanis() { * documentation. */ public Instant getAlos96Minutes() { - return getTimeOffset(getSunrise(), -96 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -96 * MINUTE_MILLIS); } /** * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before - * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link * isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 mil is 90 minutes * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} - * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunrise() sunrise} to {@link + * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link * getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is - * {@link getSunrise()} - ({@link getShaahZmanisGRA()} * 1.5). + * {@link getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.5). * * @return the Instant 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, @@ -767,13 +767,13 @@ public Instant getAlos90Zmanis() { /** * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before - * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link * isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 minutes * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} - * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunrise() sunrise} to {@link + * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link * getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is {@link - * getSunrise()} - ({@link getShaahZmanisGRA()} * 1.6). + * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.6). * * @return the Instant 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, @@ -786,7 +786,7 @@ public Instant getAlos96Zmanis() { } /** - * Method to return alos (dawn) calculated using 90 minutes before {@link getSunrise() sunrise} or + * Method to return alos (dawn) calculated using 90 minutes before {@link getSunset() sunrise} or * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) based on the time * to walk the distance of 4 mil at * 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the lechumra only and returns alos (dawn) calculated using 120 minutes - * before {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the + * before {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the * {@link isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a * mil. Time based offset calculations for alos are based on the* opinion of the lechumra only and method returns alos (dawn) calculated using - * 120 minutes zmaniyos or 1/6th of the day before {@link getSunrise() sunrise} or {@link + * 120 minutes zmaniyos or 1/6th of the day before {@link getSunset() sunrise} or {@link * getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is based * on a 24-minute 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 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()} + * getSunset() sunrise} to {@link getSunset() sunset} (depending on the {@link + * isUseElevation()}. The actual calculation used is {@link getSunset()} - ({@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 performed during the day. * @@ -944,7 +944,7 @@ public Instant getAlos19Point8Degrees() { /** * This method returns misheyakir based on the position of the sun {@link ZENITH_12_POINT_85 12.85°} * below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly - * later than 57 minutes before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux. This * zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES * 11.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes - * before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * @todo recalculate. @@ -1008,7 +1008,7 @@ public Instant getMisheyakir11Point5Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES * 11°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes - * before {@link getSunrise() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11° below {@link GEOMETRIC_ZENITH geometric zenith}. * @@ -1026,7 +1026,7 @@ public Instant getMisheyakir11Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_10_POINT_2 * 10.2°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes - * before {@link getSunrise() sunrise} in Jerusalem around the equinox which calculates * to 10.2° below {@link GEOMETRIC_ZENITH geometric zenith}. * @@ -1104,7 +1104,7 @@ public Instant getMisheyakir9Point5Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This * time is 3 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall * with both being 19.8° below sunrise or sunset. This returns the time of 3 * @@ -1124,7 +1124,7 @@ public Instant getSofZmanShmaMGA19Point8Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 3 {@link + * getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 3 {@link * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based on * the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. * This returns the time of 3 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. @@ -1143,7 +1143,7 @@ public Instant getSofZmanShmaMGA16Point1Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 3 + * on alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 3 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 3 * {@link getShaahZmanis18Degrees()} after @@ -1164,7 +1164,7 @@ public Instant getSofZmanShmaMGA18Degrees() { * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based * on alos being {@link getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before - * {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} + * {@link getSunset() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} * (solar hours) after {@link getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated * from a {@link getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before * {@link getSeaLevelSunrise() sea level sunrise} to {@link getTzais72Zmanis() nightfall} of 72 minutes @@ -1186,7 +1186,7 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based on - * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 3 + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 3 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * @@ -1207,7 +1207,7 @@ public Instant getSofZmanShmaMGA90Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() + * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() * sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} @@ -1229,7 +1229,7 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 3 {@link + * getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 3 {@link * getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on the opinion * of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link * getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis96Minutes()} @@ -1250,7 +1250,7 @@ public Instant getSofZmanShmaMGA96Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunrise() + * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunset() * sunrise}. This time is 3 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} @@ -1301,7 +1301,7 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunrise() + * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunset() * sunrise}. This time is 3 {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link * getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} * of 120 minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of @@ -1343,7 +1343,7 @@ public Instant getSofZmanShmaMGA120Minutes() { * @see getSeaLevelSunset() */ public Instant getSofZmanShmaAlos16Point1ToSunset() { - return getSofZmanShma(getAlos16Point1Degrees(), getSunset(), false); + return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); } /** @@ -1372,7 +1372,7 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This time + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This time * is 4 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link @@ -1394,7 +1394,7 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time + * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time * is 4 {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link @@ -1415,7 +1415,7 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 4 + * alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 4 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 4 * {@link getShaahZmanis18Degrees()} after @@ -1436,7 +1436,7 @@ public Instant getSofZmanTfilaMGA18Degrees() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This time is 4 + * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This time is 4 * {@link getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos72Zmanis() dawn} * based on the opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 * minutes zmaniyos before sunrise to {@link getTzais72Zmanis() nightfall} of 72 minutes zmaniyos @@ -1456,7 +1456,7 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 4 + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 4 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 * @@ -1476,7 +1476,7 @@ public Instant getSofZmanTfilaMGA90Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This time is + * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This time is * 4 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos90Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos90Zmanis() dawn} * of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} of 90 minutes @@ -1497,7 +1497,7 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 4 + * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 4 * {@link getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before * sunrise to {@link getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * @@ -1517,7 +1517,7 @@ public Instant getSofZmanTfilaMGA96Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This time is + * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This time is * 4 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos96Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos96Zmanis() dawn} * of 96 minutes zmaniyos before sunrise to {@link getTzais96Zmanis() nightfall} of 96 minutes @@ -1538,7 +1538,7 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunrise() sunrise} . This time is 4 + * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunset() sunrise} . This time is 4 * {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link getAlos120Minutes() dawn} * based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} of 120 * minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of @@ -2055,7 +2055,7 @@ public Instant getPlagHamincha18Degrees() { */ @Deprecated (forRemoval=false) public Instant getPlagAlosToSunset() { - return getPlagHamincha(getAlos16Point1Degrees(), getSunset(), false); + return getPlagHamincha(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); } /** @@ -2141,7 +2141,7 @@ public Instant getBainHashmashosRT13Point24Degrees() { * */ public Instant getBainHashmashosRT58Point5Minutes() { - return getTimeOffset(getSunset(), 58.5 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 58.5 * MINUTE_MILLIS); } /** @@ -2174,11 +2174,11 @@ public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { */ public Instant getBainHashmashosRT2Stars() { Instant alos19Point8 = getAlos19Point8Degrees(); - Instant sunrise = getSunrise(); + Instant sunrise = getSunriseBasedOnElevationSetting(); if (alos19Point8 == null || sunrise == null) { return null; } - return getTimeOffset(getSunset(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); + return getTimeOffset(getSunsetBasedOnElevationSetting(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); } /** @@ -2195,7 +2195,7 @@ public Instant getBainHashmashosRT2Stars() { * @see getBainHashmashosYereim3Point05Degrees() */ public Instant getBainHashmashosYereim18Minutes() { - return getTimeOffset(getSunset(), -18 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS); } /** @@ -2248,7 +2248,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() { * @see getBainHashmashosYereim2Point8Degrees() */ public Instant getBainHashmashosYereim16Point875Minutes() { - return getTimeOffset(getSunset(), -16.875 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS); } /** @@ -2291,7 +2291,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() { * @see getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim13Point5Minutes() { - return getTimeOffset(getSunset(), -13.5 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS); } /** @@ -2596,7 +2596,7 @@ public Instant getTzaisGeonim9Point75Degrees() { * @see getShaahZmanis60Minutes() */ public Instant getTzais60Minutes() { - return getTimeOffset(getSunset(), 60 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS); } /** @@ -2616,7 +2616,7 @@ public Instant getTzais60Minutes() { * @see setAteretTorahSunsetOffset(double) */ public Instant getTzaisAteretTorah() { - return getTimeOffset(getSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); } /** @@ -2836,7 +2836,7 @@ public Instant getTzais96Zmanis() { * @see getAlos90Minutes() */ public Instant getTzais90Minutes() { - return getTimeOffset(getSunset(), 90 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 90 * MINUTE_MILLIS); } /** @@ -2863,7 +2863,7 @@ public Instant getTzais90Minutes() { */ @Deprecated (forRemoval=false) public Instant getTzais120Minutes() { - return getTimeOffset(getSunset(), 120 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 120 * MINUTE_MILLIS); } /** @@ -2976,7 +2976,7 @@ public Instant getTzais19Point8Degrees() { * @see getAlos96Minutes() */ public Instant getTzais96Minutes() { - return getTimeOffset(getSunset(), 96 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS); } /** @@ -3326,13 +3326,13 @@ public Instant getTchilasZmanKidushLevana7Days() { * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzGRA() { - return getSofZmanAchilasChametz(getSunrise(), getSunset(), true); + return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is identical to the + * being {@link getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is identical to the * {@link getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link @@ -3355,7 +3355,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion * of the Magen Avraham (MGA) based on alos being {@link - * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunrise() sunrise}. This time is identical to the + * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunset() sunrise}. This time is identical to the * {@link getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to @@ -3379,7 +3379,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { /** * This method returns the latest time one is allowed eating 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 4 {@link + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 4 {@link * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based * on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or * sunset. This returns the time of 4 {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. @@ -3412,13 +3412,13 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzGRA() { - return getSofZmanBiurChametz(getSunrise(), getSunset(), true); + return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** * 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 - * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 5 {@link + * getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is 5 {@link * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link getShaahZmanis72Minutes()} @@ -3438,7 +3438,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { /** * 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 - * getAlos72Zmanis() 72} minutes zmanis before {@link getSunrise() sunrise}. This time is 5 {@link + * getAlos72Zmanis() 72} minutes zmanis before {@link getSunset() sunrise}. This time is 5 {@link * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link @@ -3459,7 +3459,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { /** * 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 + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 5 * {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° * below sunrise or sunset. This returns the time of 5 {@link getShaahZmanis16Point1Degrees()} after @@ -3511,7 +3511,7 @@ public long getShaahZmanisBaalHatanya() { /** * Returns the Baal Hatanya's alos * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link GEOMETRIC_ZENITH geometric horizon} - * before {@link getSunrise() sunrise}. It is based on the calculation that the time between dawn and + * before {@link getSunset() sunrise}. It is based on the calculation that the time between dawn and * netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes * a mil (Rambam and others). The sun's position at 72 * minutes before {@link getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem Rav Moshe Feinstein's opinion of the * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion * of the GRA that the day is calculated from sunrise to sunset, but - * calculated using the first half of the day only. The half a day starts at {@link getSunrise() sunrise} and + * calculated using the first half of the day only. The half a day starts at {@link getSunset() sunrise} and * ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar * hours) after sunrise or half of this half-day. * @@ -3781,12 +3781,12 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * 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. - * @see getSunrise() + * @see getSunset() * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 3); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3); } /** @@ -3794,19 +3794,19 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers)) * according to the opinion of the GRA that the day is * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at - * {@link getSunrise() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman + * {@link getSunset() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman * tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see getSunrise() + * @see getSunset() * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 4); + return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4); } /** @@ -3846,7 +3846,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 3.5); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5); } /** @@ -3867,7 +3867,7 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 4.75); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75); } /** @@ -3882,17 +3882,17 @@ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { * documentation. */ public Instant getTzais50Minutes() { - return getTimeOffset(getSunset(), 50 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 50 * MINUTE_MILLIS); } /** * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated - * according to the GRA using a day starting at sunrise and ending at - * sunset. This is the time that eating or other activity can't begin prior to praying mincha. The calculation used - * is 9 * {@link getShaahZmanisGRA()} after {@link getSunrise() sunrise} or {@link getSunrise() elevation adjusted sunrise} - * (depending on the {@link isUseElevation()} setting). See the Mechaber and Mishna Berurah 232 and shaos zmaniyos (solar hours) after the start of + * the day, calculated according to the GRA using a day starting at + * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha. + * The calculation used is 9 * {@link getShaahZmanisGRA()} after {@link getSunset() sunrise} or {@link + * getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link isUseElevation()} setting). See the + * Mechaber and Mishna Berurah 232 and 249:2. * * @see getShaahZmanisGRA() @@ -3904,7 +3904,7 @@ public Instant getTzais50Minutes() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSamuchLeMinchaKetanaGRA() { - return getSamuchLeMinchaKetana(getSunrise(), getSunset(), true); + return getSamuchLeMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index 98dec99a..a78d5f2a 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -252,28 +252,44 @@ public void setUseAstronomicalChatzosForOtherZmanim(boolean useAstronomicalChatz /** * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), - * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim in this and extending classes - * (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. + * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim in this and + * extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. + * + * @return {@link getSeaLevelSunrise()} if {@link isUseElevation()} is false (the default), or elevation adjusted + * {@link getSunrise()} if it is true. + * @see getSunrise() + */ + protected Instant getSunriseBasedOnElevationSetting() { + if (isUseElevation()) { + return super.getSunrise(); + } + return getSeaLevelSunrise(); + } + + /** + * This method will return {@link getSeaLevelSunrise() sea level sunrise} if {@link isUseElevation()} is false (the default), + * or elevation adjusted {@link getSunrise()} if it is true. This allows relevant zmanim + * in this and extending classes (such as the {@link ComprehensiveZmanimCalendar}) to automatically adjust to the elevation setting. * * @return {@link getSeaLevelSunset()} if {@link isUseElevation()} is false (the default), or elevation adjusted * {@link getSunset()} if it is true. * @see getSunset() */ - /*protected Instant getSunset() { + protected Instant getSunsetBasedOnElevationSetting() { if (isUseElevation()) { return super.getSunset(); } return getSeaLevelSunset(); - }*/ + } /** - * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the {@link - * GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunset() sunset}, a time that Rabbi Meir Posen in his the - * Ohr Meir calculated that 3 small stars are visible, which is - * later than the required 3 medium stars. This calculation is based on the sun's position below the horizon 36 minutes after - * {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which is - * 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}. + * A method that returns tzais (nightfall) when the sun is {@link ZENITH_8_POINT_5 8.5°} below the + * {@link GEOMETRIC_ZENITH geometric horizon} (90°) after {@link getSunset() sunset}, a time that Rabbi + * Meir Posen in his the Ohr Meir calculated that 3 small + * stars are visible, which is later than the required 3 medium stars. This calculation is based on the sun's position below + * the horizon 36 minutes after {@link getSeaLevelSunrise() sunset} in Jerusalem around the equinox / equilux, which + * is 8.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * * @return The Instant of nightfall. 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 @@ -321,24 +337,23 @@ public Instant getAlos16Point1Degrees() { * documentation. */ public Instant getAlos72Minutes() { - return getTimeOffset(getSunrise(), -72 * MINUTE_MILLIS); + return getTimeOffset(getSunriseBasedOnElevationSetting(), -72 * MINUTE_MILLIS); } /** - * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the {@link - * com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link isUseAstronomicalChatzos() - * isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() 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 + * This method returns {@link getSunTransit() Astronomical chatzos hayom} if the + * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and + * {@link isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true or the {@link getChatzosHayomAsHalfDay() + * 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 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 the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can - * be calculated even in the Arctic, if half-day chatzos calculates as null and astronomical - * chatzos is supported by the calculator, astronomical chatzos will be returned to avoid returning a - * null. + * chatzos}. See The Definition of Chatzos + * for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can be null in + * the Arctic on a day when either sunrise or sunset did not happen and astronomical chatzos can be calculated even in the + * Arctic, if half-day chatzos calculates as null and astronomical chatzos is supported by the + * calculator, astronomical chatzos will be returned to avoid returning a null. * * @see getSunTransit() * @see getChatzosHayomAsHalfDay() @@ -363,11 +378,11 @@ public Instant getChatzosHayom() { } /** - * A method that returns chatzos halayla at the end of the day (the last zman of the day returned by the - * calendar, that may actually be after midnight of the day it is being calculated for). For example, if calculating it for the - * date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the zman as - * sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be returned if the - * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link + * A method that returns chatzos halayla at the end of the day (the last zman of the day + * returned by the calendar, that may actually be after midnight of the day it is being calculated for). For example, if + * calculating it for the date of Erev Pesach, the calculation will be for Lail Pesach to allow you to use the + * zman as sof zman achilas chametz. {@link getSolarMidnight() Astronomical chatzos halayla} will be + * returned if the {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} class used supports it and {@link * isUseAstronomicalChatzos() isUseAstronomicalChatzos()} is set to true. Otherwise the {@link #getChatzos(Instant, * Instant) halfway point} between sunset and the following day's sunrise, 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, @@ -489,8 +504,8 @@ public Instant getChatzosHayomAsHalfDay() { * the day. If {@link isUseAstronomicalChatzosForOtherZmanim()} is true, the 3 shaos zmaniyos will be * based on 1/6 of the time between sunrise and {@link getSunTransit() astronomical chatzos}. As an example, passing * {@link getSunrise() sunrise} and {@link getSunset() sunset} or {@link getSeaLevelSunrise() sea level - * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunrise()} and - * {@link getSunset()} that is driven off the {@link isUseElevation()} setting) will return sof zman + * sunrise} and {@link getSeaLevelSunset() sea level sunset} to this method (or {@link getSunriseBasedOnElevationSetting()} and + * {@link getSunsetBasedOnElevationSetting()} that is driven off the {@link isUseElevation()} setting) will return sof zman * krias shema according to the opinion of the GRA. In cases where * the start and end dates are not synchronous such as in {@link ComprehensiveZmanimCalendar * #getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees()} false should be passed to the synchronous parameter @@ -521,10 +536,9 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay, boolean sync } /** - * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, - * boolean)} 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. + * A generic method for calculating the latest zman krias shema that calls {@link getSofZmanShma(Instant, Instant, boolean)} + * 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 * to this method. @@ -542,12 +556,13 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { } /** - * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * {@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 getSeaLevelSunset() sea level sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} - * (depending on the {@link isUseElevation()} setting). + * This method returns the latest zman krias shema (time to recite shema in the morning) that is 3 * + * {@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 getSeaLevelSunset() sea level + * sunset} or from {@link getSunrise() sunrise} to {@link getSunset() sunset} (depending on the + * {@link isUseElevation()} setting). * * @see getSofZmanShma(Instant, Instant) * @see getShaahZmanisGRA() @@ -559,16 +574,17 @@ public Instant getSofZmanShma(Instant startOfDay, Instant endOfDay) { * of the {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanShmaGRA() { - return getSofZmanShma(getSunrise(), getSunset(), true); + return getSofZmanShma(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis72Minutes() - * shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion of the MGA that the day is - * calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link getTzais72Minutes() nightfall} of - * 72 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}. + * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 3 {@link + * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes() dawn} based on the opinion + * of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to + * {@link getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 3 * {@link + * getShaahZmanis72Minutes()} after {@link getAlos72Minutes() dawn}. * * @return the Instant of the latest zman krias shema. 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 @@ -601,7 +617,7 @@ public Instant getSofZmanShmaMGA72Minutes() { * {@link AstronomicalCalendar} documentation. */ public Instant getTzais72Minutes() { - return getTimeOffset(getSunset(), 72 * MINUTE_MILLIS); + return getTimeOffset(getSunsetBasedOnElevationSetting(), 72 * MINUTE_MILLIS); } /** @@ -802,7 +818,7 @@ public Instant getSofZmanTfila(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getSofZmanTfilaGRA() { - return getSofZmanTfila(getSunrise(), getSunset(), true); + return getSofZmanTfila(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } @@ -810,8 +826,8 @@ public Instant getSofZmanTfilaGRA() { * This method returns the latest zman tfila (time to recite shema in the morning) that is 4 * {@link * getShaahZmanis72Minutes() shaos zmaniyos} (solar hours) after {@link getAlos72Minutes()}, according to the * Magen Avraham (MGA). The day is calculated - * from 72 minutes before {@link getSunrise()} to 72 minutes after {@link - * getSunset()}. The use of elevation depends on the {@link isUseElevation()} setting). + * from 72 minutes before {@link getSunriseBasedOnElevationSetting()} to 72 minutes after {@link + * getSunsetBasedOnElevationSetting()}. The use of elevation depends on the {@link isUseElevation()} setting). * * @return the Instant 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 @@ -920,7 +936,7 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaGedolaGRA() { - return getMinchaGedola(getSunrise(), getSunset(), true); + return getMinchaGedola(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -1065,7 +1081,7 @@ public Instant getMinchaKetana(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getMinchaKetanaGRA() { - return getMinchaKetana(getSunrise(), getSunset(), true); + return getMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -1143,7 +1159,7 @@ public Instant getPlagHamincha(Instant startOfDay, Instant endOfDay) { * {@link AstronomicalCalendar} documentation. */ public Instant getPlagHaminchaGRA() { - return getPlagHamincha(getSunrise(), getSunset(), true); + return getPlagHamincha(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); } /** @@ -1164,13 +1180,13 @@ public Instant getPlagHaminchaGRA() { * @see ComprehensiveZmanimCalendar#getShaahZmanisBaalHatanya() */ public long getShaahZmanisGRA() { - return getTemporalHour(getSunrise(), getSunset()); + return getTemporalHour(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting()); } /** * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. As an * example passing 1.5 to this method as done in the {@link ComprehensiveZmanimCalendar#getTzais90Zmanis()} will return - * the time 90 minutes zmaniyos after {@link getSunset()}, a zman known as + * the time 90 minutes zmaniyos after {@link getSunsetBasedOnElevationSetting()}, a zman known as * the achtel zman or 1/8th of the length of the day (12 * 60 = 720-minute day / 8 = 90 or 1.5 hours * zmaniyos) after sunset. * @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn @@ -1193,9 +1209,9 @@ public Instant getZmanisBasedOffset(double hours) { } if (hours > 0) { - return getTimeOffset(getSunset(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunsetBasedOnElevationSetting(), (long) (shaahZmanis * hours)); } else { - return getTimeOffset(getSunrise(), (long) (shaahZmanis * hours)); + return getTimeOffset(getSunriseBasedOnElevationSetting(), (long) (shaahZmanis * hours)); } } @@ -1269,7 +1285,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { /** * This is a utility method to determine if the current Instant passed in has a melacha (work) prohibition. * Since there are many opinions on the time of tzais, the tzais for the current day has to be passed to this - * class. Sunset is the classes current day's {@link getSunset() elevation adjusted sunset} that observes the + * class. Sunset is the classes current day's {@link getSunsetBasedOnElevationSetting() elevation adjusted sunset} that observes the * {@link isUseElevation()} settings. The {@link JewishCalendar#getInIsrael()} will be set by the inIsrael parameter. * * @param currentTime the current time @@ -1288,7 +1304,7 @@ public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsr jewishCalendar.setInIsrael(inIsrael); - if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunset()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah + if (jewishCalendar.hasCandleLighting() && currentTime.compareTo(getSunsetBasedOnElevationSetting()) >= 0) { //erev shabbos, YT or YT sheni and after shkiah return true; } From 090b68040afb47fe09ca5cf26f592747b57210d5 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 3 May 2026 14:06:01 -0400 Subject: [PATCH 100/121] Add NOAA Solar Elevation Refraction adjustments --- .../zmanim/util/NOAACalculator.java | 53 +++++++++++-------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index 880b42f4..319098e4 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -336,7 +336,6 @@ private static double getSunHourAngle(double latitude, double solarDeclination, */ public double getSolarElevation(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { return getSolarElevationAzimuth(zonedDateTime, geoLocation, false); - } /** @@ -353,7 +352,7 @@ public double getSolarAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocati * adjusted for altitude. * * @param zonedDateTime - * time of calculation + * date-time of calculation * @param geoLocation * The location for calculating the elevation or azimuth. * @param isAzimuth @@ -364,49 +363,59 @@ public double getSolarAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocati * @see #getSolarAzimuth(ZonedDateTime, GeoLocation) */ private double getSolarElevationAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation, boolean isAzimuth) { - double lat = Math.toRadians(geoLocation.getLatitude()); double lon = geoLocation.getLongitude(); - ZonedDateTime utc = zonedDateTime.withZoneSameInstant(ZoneOffset.UTC); - - double fractionalDay = - (utc.getHour() - + (utc.getMinute() + double fractionalDay = (utc.getHour() + (utc.getMinute() + (utc.getSecond() + utc.getNano() / 1_000_000_000.0) / 60.0) / 60.0) / 24.0; - double jd = getJulianDay(utc.toLocalDate()) + fractionalDay; double jc = getJulianCenturiesFromJulianDay(jd); - double decl = Math.toRadians(getSunDeclination(jc)); double eot = getEquationOfTime(jc); - double trueSolarTime = ((fractionalDay + eot / 1440.0 + lon / 360.0) + 2) % 1; double hourAngle = trueSolarTime * 2 * Math.PI - Math.PI; - - double cosZenith = - Math.sin(lat) * Math.sin(decl) - + Math.cos(lat) * Math.cos(decl) * Math.cos(hourAngle); - - double zenith = Math.acos(Math.max(-1, Math.min(1, cosZenith))); - double elevation = 90 - Math.toDegrees(zenith); - + double cosZenith = Math.sin(lat) * Math.sin(decl) + Math.cos(lat) * Math.cos(decl) * Math.cos(hourAngle); + double zenith = Math.acos(Math.max(-1, Math.min(1, cosZenith))); + double zenithDeg = Math.toDegrees(zenith); + double elevation = 90.0 - zenithDeg; + elevation = 90.0 - (zenithDeg - adjustElevationForRefraction(elevation)); double azimuth; double azDenom = Math.cos(lat) * Math.sin(zenith); if (Math.abs(azDenom) > 0.001) { - double az = - (Math.sin(lat) * Math.cos(zenith) - Math.sin(decl)) / azDenom; + double az = (Math.sin(lat) * Math.cos(zenith) - Math.sin(decl)) / azDenom; azimuth = 180 - Math.toDegrees(Math.acos(Math.max(-1, Math.min(1, az)))) * (hourAngle > 0 ? -1 : 1); } else { azimuth = geoLocation.getLatitude() > 0 ? 180 : 0; } - return isAzimuth ? (azimuth + 360) % 360 : elevation; } + /** + * Apply refraction adjustment to solar elevation. + * @param elevation the elevation to adjust. + * @return the adjusted elevation. + */ + private double adjustElevationForRefraction(double elevation) { + if (elevation > 85.0) { + return 0.0; + } + + double te = Math.tan(Math.toRadians(elevation)); + double correction; + + if (elevation > 5.0) { + correction = 58.1 / te - 0.07 / Math.pow(te, 3) + 0.000086 / Math.pow(te, 5); + } else if (elevation > -0.575) { + correction = 1735.0 + elevation * (-518.2 + elevation * (103.4 + elevation * (-12.79 + 0.711 * elevation))); + } else { + correction = -20.774 / te; + } + return correction / 3600.0; + } + /** * Return the Universal Coordinated Time (UTC) * of solar noon for the given day at the given location From a8b1cc421e9506a09fac46150958fe95d3d95562 Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Sun, 3 May 2026 14:06:54 -0400 Subject: [PATCH 101/121] Fix Daf Yomi Yerushalmi cycle boundaries and skipped-day drift (#268) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This fixes Daf Yomi Yerushalmi calculation bugs around cycle boundaries and skipped days. The previous implementation could return `null` on the first day of a new cycle, and could drift by one daf in later cycles because cycle lengths and skipped days were handled inconsistently. ## Bugs Fixed The first issue was an exact cycle-boundary bug. For example, `1984-05-13` should be the first day of the next Yerushalmi cycle, returning `Berachos 1`. Instead, the calculator treated it as still belonging to the previous cycle. Since the offset was exactly one past the final daf, no masechta matched and the method returned `null`. The second issue was skipped-day drift. The calculator counted special days using a strictly-between range and used the nominal `9 Av` date rather than the observed fast date when Tisha B’Av is delayed. Over many cycles, this could shift the computed daf by a day. --- .../YerushalmiYomiCalculator.java | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java index 1e9d83e5..e9dee2c4 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/YerushalmiYomiCalculator.java @@ -69,16 +69,13 @@ public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { } // Initialize cycle dates - LocalDate nextCycle = DAF_YOMI_START_DAY; LocalDate prevCycle = DAF_YOMI_START_DAY; + LocalDate nextCycle = getNextCycleStart(prevCycle); // Loop through cycles until we reach the requested date - while (requested.isAfter(nextCycle)) { + while (!requested.isBefore(nextCycle)) { prevCycle = nextCycle; - - // Add whole cycle days - nextCycle = nextCycle.plusDays(WHOLE_SHAS_DAFS); - nextCycle = nextCycle.plusDays(getNumOfSpecialDays(prevCycle, nextCycle)); + nextCycle = getNextCycleStart(prevCycle); } // Days between start of cycle and requested date @@ -101,9 +98,28 @@ public static Daf getDafYomiYerushalmi(JewishCalendar jewishCalendar) { } /** - * Counts the number of "special days" (Yom Kippur, Tisha B’Av) between two ZonedDateTimes. + * Returns the start date of the cycle after the one beginning on {@code cycleStart}. + * The cycle end is inclusive, so skipped days on the tentative end date extend the cycle. + * @param cycleStart the first day of the current cycle + * @return the first day of the following cycle + */ + private static LocalDate getNextCycleStart(LocalDate cycleStart) { + LocalDate endDate = cycleStart.plusDays(WHOLE_SHAS_DAFS - 1); + int specialDays = getNumOfSpecialDays(cycleStart, endDate); + + while (specialDays > 0) { + LocalDate newStart = endDate.plusDays(1); + endDate = endDate.plusDays(specialDays); + specialDays = getNumOfSpecialDays(newStart, endDate); + } + + return endDate.plusDays(1); + } + + /** + * Counts the number of "special days" (Yom Kippur, Tisha B’Av) between two dates. * @param start the start date for the calculation - * @param end the start date for the calculation + * @param end the end date for the calculation * @return the number of special days */ private static int getNumOfSpecialDays(LocalDate start, LocalDate end) { @@ -116,12 +132,12 @@ private static int getNumOfSpecialDays(LocalDate start, LocalDate end) { // Loop over each Jewish year in range for (int year = startYear; year <= endYear; year++) { // Create Yom Kippur and Tisha B’Av for that Jewish year - JewishCalendar yomKippur = new JewishCalendar(5770, 7, 10); // month/day are constants - JewishCalendar tishaBeav = new JewishCalendar(5770, 5, 9); - - yomKippur.setJewishYear(year); - tishaBeav.setJewishYear(year); - + JewishCalendar yomKippur = new JewishCalendar(year, JewishCalendar.TISHREI, 10); + JewishCalendar tishaBeav = new JewishCalendar(year, JewishCalendar.AV, 9); + // Check if Tisha B'Av is a Nidche. + if (tishaBeav.getDayOfWeek() == 7) { + tishaBeav.plusDays(1); + } LocalDate ykDate = yomKippur.getLocalDate(); LocalDate tbDate = tishaBeav.getLocalDate(); @@ -132,15 +148,16 @@ private static int getNumOfSpecialDays(LocalDate start, LocalDate end) { return specialDays; } + /** - * Checks if a date is strictly between start and end. + * Checks if a date is after start and on or before end. * @param start the start ZonedDateTime * @param date the ZonedDateTime to check * @param end the end ZonedDateTime * @return if the date is between the two dates */ private static boolean isBetween(LocalDate start, LocalDate date, LocalDate end) { - return start.isBefore(date) && end.isAfter(date); + return start.isBefore(date) && !end.isBefore(date); } /** From 7b18104f7e8ab3411fc467cbe24918b5dd0911af Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 4 May 2026 22:48:33 -0400 Subject: [PATCH 102/121] Remove the private and unused GeoLocation.vincentyDirectFormulaDestination() - This is not needed for zmanim or tefila direction calculation. If someone comes up with a good use case for it, it can be restored. - Clean up validation and error messages. - Remove inaccurate and incomplete note about cloning --- .../kosherjava/zmanim/util/GeoLocation.java | 76 +++---------------- 1 file changed, 11 insertions(+), 65 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java index 6d6ae4a4..9ddb08fd 100644 --- a/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java +++ b/src/main/java/com/kosherjava/zmanim/util/GeoLocation.java @@ -208,11 +208,12 @@ public void setLatitude(double latitude) { * IllegalArgumentException will be thrown if the value is not "S" or "N". */ public void setLatitude(int degrees, int minutes, double seconds, String direction) { - double tempLat = degrees + ((minutes + (seconds / 60.0)) / 60.0); - if (tempLat > 90 || tempLat < 0 || Double.isNaN(tempLat)) { //FIXME An exception should be thrown if degrees, minutes or seconds are negative - throw new IllegalArgumentException( - "Latitude must be between 0 and 90. Use direction of S instead of negative."); + if (degrees > 90 || degrees < 0 || Double.isNaN(degrees) || minutes > 59 || minutes < 0 || Double.isNaN(minutes) || + seconds > 59 || seconds < 0 || Double.isNaN(seconds)){ + throw new IllegalArgumentException("Latitude degrees must be between 0 and 90. Minutes and seconds must be between 0 and 59. Use a direction of \"S\" instead of negative."); } + + double tempLat = degrees + ((minutes + (seconds / 60.0)) / 60.0); if (direction.equals("S")) { tempLat *= -1; } else if (!direction.equals("N")) { @@ -264,14 +265,16 @@ public void setLongitude(double longitude) { * An IllegalArgumentException will be thrown if the value is not E or W. */ public void setLongitude(int degrees, int minutes, double seconds, String direction) { - double longTemp = degrees + ((minutes + (seconds / 60.0)) / 60.0); - if (longTemp > 180 || longitude < 0 || Double.isNaN(longTemp)) { //FIXME An exception should be thrown if degrees, minutes or seconds are negative - throw new IllegalArgumentException("Longitude must be between 0 and 180. Use a direction of W instead of negative."); + if (degrees > 180 || degrees < 0 || Double.isNaN(degrees) || minutes > 59 || minutes < 0 || Double.isNaN(minutes) || + seconds > 59 || seconds < 0 || Double.isNaN(seconds)){ + throw new IllegalArgumentException("Longitude degrees must be between 0 and 180. Minutes and seconds must be between 0 and 59. Use a direction of \"W\" instead of negative."); } + + double longTemp = degrees + ((minutes + (seconds / 60.0)) / 60.0); if (direction.equals("W")) { longTemp *= -1; } else if (!direction.equals("E")) { - throw new IllegalArgumentException("Longitude direction must be E or W"); + throw new IllegalArgumentException("Longitude direction must be \"E\" or \"W\""); } this.longitude = longTemp; } @@ -423,61 +426,6 @@ public double getGeodesicFinalBearing(GeoLocation location) { public double getGeodesicDistance(GeoLocation location) { return vincentyInverseFormula(location, DISTANCE); } - - /** - * Calculate the destination point based on an initial bearing and distance in meters from the current location using - * Thaddeus Vincenty's direct formula. See T Vincenty, "Direct and Inverse Solutions of Geodesics on the Ellipsoid - * with application of nested equations", Survey Review, vol XXII no 176, 1975. - * - * @param initialBearing the initialBearing - * @param distance the distance in meters. - * @return the GeoLocation containing the destination point. The ZoneId is set to the origin point (current object). - */ - private GeoLocation vincentyDirectFormulaDestination(double initialBearing, double distance) { - double major_semi_axis = 6378137; - double minor_semi_axis = 6356752.3142; - double flattening = 1 / 298.257223563; // WGS-84 ellipsoid - double initial_bearing_radians = Math.toRadians(initialBearing); - double sinAzimuth1 = Math.sin(initial_bearing_radians); - double cosAzimuth1 = Math.cos(initial_bearing_radians); - double tanU1 = (1 - flattening) * Math.tan(Math.toRadians(getLatitude())); - double cosU1 = 1 / Math.sqrt((1 + tanU1*tanU1)); - double sinU1 = tanU1 * cosU1; - double eq_p1_ang_dist = Math.atan2(tanU1, cosAzimuth1); // eq_p1_ang_dist = angular distance on the sphere from the equator to P1 - double sinAzimuth = cosU1 * sinAzimuth1; //azimuth of the geodesic at the equator - double cosSqAzimuth = 1 - sinAzimuth*sinAzimuth; - double uSq = cosSqAzimuth * (Math.pow(major_semi_axis, 2) - 1.0); - double a = 1 + uSq/16384*(4096 + uSq *(-768 + uSq *(320 - 175 * uSq))); - double b = uSq / 1024 * (256 + uSq *(-128 + uSq * (74-47 * uSq))); - double p1_p2_ang_dist = distance / (minor_semi_axis * a); //p1_p2_ang_dist = angular distance P1 P2 on the sphere - double sinSigma ; - double cosSigma ; - double cos2_eq_mid_ang_distance; // # eq_mid_ang_distance = angular distance on the sphere from the equator to the midpoint of the line - double a_prime; - int iterations = 0; - - do { - cos2_eq_mid_ang_distance = Math.cos(2*eq_p1_ang_dist + p1_p2_ang_dist); - sinSigma = Math.sin(p1_p2_ang_dist); - cosSigma = Math.cos(p1_p2_ang_dist); - double delta_ang_distance = b * sinSigma * (cos2_eq_mid_ang_distance + b / 4 * - (cosSigma * (-1 + 2 * cos2_eq_mid_ang_distance * cos2_eq_mid_ang_distance) - b / 6 * cos2_eq_mid_ang_distance * - (-3+4*sinSigma*sinSigma)*(-3+4*cos2_eq_mid_ang_distance*cos2_eq_mid_ang_distance))); - a_prime = p1_p2_ang_dist; - p1_p2_ang_dist = distance / (minor_semi_axis * a) + delta_ang_distance; - } while (Math.abs(p1_p2_ang_dist-a_prime) > 1e-12 && ++iterations < 100); // iterate until negligible change in lambda (about 0.006mm) - - double x = sinU1 * sinSigma - cosU1 * cosSigma * cosAzimuth1; - double other_latitude = Math.toDegrees(Math.atan2(sinU1 * cosSigma + cosU1 * sinSigma * cosAzimuth1, (1 - flattening) * Math.sqrt(sinAzimuth*sinAzimuth + x * x))); - double lambda = Math.atan2(sinSigma*sinAzimuth1, cosU1*cosSigma - sinU1*sinSigma*cosAzimuth1); - double c = flattening/16*cosSqAzimuth*(4+flattening*(4-3*cosSqAzimuth)); - double l = lambda - (1-c) * flattening * sinAzimuth * - (p1_p2_ang_dist + c * sinSigma * (cos2_eq_mid_ang_distance + c * cosSigma * (-1 + 2 * cos2_eq_mid_ang_distance * cos2_eq_mid_ang_distance))); - double other_longitude = longitude + Math.toDegrees(l); - - return new GeoLocation("Destination", other_latitude, other_longitude, getZoneId()); //ToDo - we can easily return final_bearing, it just needs some minor refactoring - } /** * Calculate geodesic distance in Meters between @@ -688,8 +636,6 @@ public String toString() { /** * An implementation of the {@link java.lang.Object#clone()} method that creates a deep copy of the object. - * Note: If the {@link java.time.ZoneId} in the clone will be changed from the original, it is critical - * that {@link com.kosherjava.zmanim.AstronomicalCalendar#getLocalDate()}. * * @see java.lang.Object#clone() */ From 17f59978f5979a8d298238cfe1c0e554cf3a5ca8 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Mon, 4 May 2026 23:19:18 -0400 Subject: [PATCH 103/121] AstronomicalCalculator Documentation corrections --- .../zmanim/util/AstronomicalCalculator.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index 9125e7cf..212825b0 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -141,7 +141,7 @@ public abstract double getUTCSunrise(LocalDate localDate, GeoLocation geoLocatio * {@link com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. * @param adjustForElevation * Should the time be adjusted for elevation - * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in + * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in * the calculation (expected behavior for some locations such as near the poles, * {@link java.lang.Double#NaN} will be returned. * @see #getElevationAdjustment(double) @@ -282,13 +282,13 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation } /** - * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 - * arcminutes. The Errata and Notes - * for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists the - * actual average refraction value as 34.478885263888294 or approximately 34' 29". The refraction value as well - * as the solarRadius and elevation adjustment are added to the zenith used to calculate sunrise and sunset. + * Method to get the refraction value to be used when calculating sunrise and sunset. The default value is 34 arcminutes + * (returned in degrees). The Errata and + * Notes for Calendrical Calculations: The Millennium Edition by Edward M. Reingold and Nachum Dershowitz lists the + * actual average refraction value as 34.478885263888294 or approximately 34' 29". The refraction value as well as the + * solar radius and elevation adjustment are added to the zenith used to calculate sunrise and sunset. * - * @return The refraction in arcminutes. + * @return The refraction in degrees. */ public double getRefraction() { return this.refraction; @@ -300,7 +300,7 @@ public double getRefraction() { * locations might be used for increased accuracy. * * @param refraction - * The refraction in arcminutes. + * The refraction in degrees. * @see #getRefraction() */ public void setRefraction(double refraction) { @@ -322,7 +322,7 @@ public void setRefraction(double refraction) { * they show the extreme difference on days that are not the perihelion or aphelion, but are shown for illustrative * purposes only. * - * @return The sun's radius in arcminutes. + * @return The sun's radius in degrees. */ public double getSolarRadius() { return this.solarRadius; @@ -332,7 +332,7 @@ public double getSolarRadius() { * Method to set the sun's radius. * * @param solarRadius - * The sun's radius in arcminutes. + * The sun's radius in degrees. * @see #getSolarRadius() */ public void setSolarRadius(double solarRadius) { From d314d52238a2932111d69ba0a251788faac7bdcf Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 5 May 2026 14:22:09 -0400 Subject: [PATCH 104/121] HebrewDateFormatter use rlm char to format JavaDocs properly --- .../hebrewcalendar/HebrewDateFormatter.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index c591d61c..26ae3c9e 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -89,7 +89,7 @@ public class HebrewDateFormatter { /** * Unicode {@link EnumMap} of Hebrew parshiyos.  The list includes double and special parshiyos and - * contains "בראשית, נח, לך לך, + * contains ‏בראשית, נח, לך לך, * וירא, חיי שרה, * תולדות, ויצא, וישלח, * וישב, מקץ, ויגש, ויחי, @@ -114,7 +114,7 @@ public class HebrewDateFormatter { * נצבים וילך, שקלים, * זכור, פרה, החדש, * שובה,שירה,הגדול, - * חזון,נחמו" + * חזון,נחמו */ private final EnumMap hebrewParshaMap; @@ -406,7 +406,7 @@ public void setTransliteratedHolidayList(String[] transliteratedHolidays) { } /** - * Hebrew holiday array in the following format.
["ערב פסח", + * Hebrew holiday array in the following format.
‏["ערב פסח", * "פסח", "חול המועד * פסח", "פסח שני", "ערב * שבועות", "שבועות", @@ -634,10 +634,10 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { } /** - * Unicode list of Hebrew months in the following format ["\u05E0\u05D9\u05E1\u05DF","\u05D0\u05D9\u05D9\u05E8", - * "\u05E1\u05D9\u05D5\u05DF","\u05EA\u05DE\u05D5\u05D6","\u05D0\u05D1","\u05D0\u05DC\u05D5\u05DC", - * "\u05EA\u05E9\u05E8\u05D9","\u05D7\u05E9\u05D5\u05DF","\u05DB\u05E1\u05DC\u05D5","\u05D8\u05D1\u05EA", - * "\u05E9\u05D1\u05D8","\u05D0\u05D3\u05E8","\u05D0\u05D3\u05E8 \u05D1","\u05D0\u05D3\u05E8 \u05D0"] + * Unicode list of Hebrew months in the following format ‏["\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", + * "\u05E1\u05D9\u05D5\u05DF", "\u05EA\u05DE\u05D5\u05D6", "\u05D0\u05D1", "\u05D0\u05DC\u05D5\u05DC", + * "\u05EA\u05E9\u05E8\u05D9", "\u05D7\u05E9\u05D5\u05DF", "\u05DB\u05E1\u05DC\u05D5", "\u05D8\u05D1\u05EA", + * "\u05E9\u05D1\u05D8", "\u05D0\u05D3\u05E8", "\u05D0\u05D3\u05E8 \u05D1", "\u05D0\u05D3\u05E8 \u05D0"] * * @see formatMonth(JewishDate) */ @@ -648,9 +648,9 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { "\u05D0\u05D3\u05E8 \u05D0" }; /** - * Unicode list of Hebrew days of week in the format of ["ראשון", - * "שני","שלישי","רביעי", - * "חמישי","ששי","שבת"] + * Unicode list of Hebrew days of week in the format of ‏["ראשון", + * "שני", "שלישי", "רביעי", + * "חמישי", "ששי", "שבת"] */ private static final String[] hebrewDaysOfWeek = { "\u05E8\u05D0\u05E9\u05D5\u05DF", "\u05E9\u05E0\u05D9", "\u05E9\u05DC\u05D9\u05E9\u05D9", "\u05E8\u05D1\u05D9\u05E2\u05D9", "\u05D7\u05DE\u05D9\u05E9\u05D9", From e9885d20fb0bae718c28d90592290a50999dfac5 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Tue, 5 May 2026 17:52:10 -0400 Subject: [PATCH 105/121] JavaDoc whitespace in HebrewDateFormatter --- .../zmanim/hebrewcalendar/HebrewDateFormatter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 26ae3c9e..85fe6990 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -369,7 +369,7 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { "Rosh Hashana", "Fast of Gedalyah", "Erev Yom Kippur", "Yom Kippur", "Erev Succos", "Succos", "Chol Hamoed Succos", "Hoshana Rabbah", "Shemini Atzeres", "Simchas Torah", "Erev Chanukah", "Chanukah", "Tenth of Teves", "Tu B'Shvat", "Fast of Esther", "Purim", "Shushan Purim", "Purim Katan", "Rosh Chodesh", - "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", "Lag B'Omer","Shushan Purim Katan", + "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", "Lag B'Omer", "Shushan Purim Katan", "Isru Chag"}; /** @@ -383,7 +383,7 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { * "Erev Succos", "Succos", "Chol Hamoed Succos", "Hoshana Rabbah", "Shemini Atzeres", "Simchas Torah", * "Erev Chanukah", "Chanukah", "Tenth of Teves", "Tu B'Shvat", "Fast of Esther", "Purim", "Shushan Purim", * "Purim Katan", "Rosh Chodesh", "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", - * "Lag B'Omer","Shushan Purim Katan","Isru Chag"]. + * "Lag B'Omer", "Shushan Purim Katan", "Isru Chag"]. * * @see setTransliteratedMonthList(String[]) * @see formatYomTov(JewishCalendar) @@ -592,7 +592,7 @@ public String[] getHebrewMonthList() { * "אדר", "אדר ב", "אדר". * * @param hebrewMonths the array of Hebrew months beginning in "ניסן" and ending in - * "אדר","אדר ב","אדר א" + * "אדר", "אדר ב", "אדר א" * @see getHebrewMonthList() */ public void setHebrewMonthList(String[] hebrewMonths) { From bbfeddaa0ee75d0f07915bc6f0098cbe228d4385 Mon Sep 17 00:00:00 2001 From: Ely Jacobi Date: Wed, 6 May 2026 16:42:39 -0400 Subject: [PATCH 106/121] Make jewish calendar thread safe (#269) * add synchronize to the JewishCalendar and JewishDate. One day we will try to make the classes immutable. --- .../kosherjava/zmanim/hebrewcalendar/JewishCalendar.java | 6 +++--- .../com/kosherjava/zmanim/hebrewcalendar/JewishDate.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index 533013d5..8d8e7c92 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -482,7 +482,7 @@ private int getParshaYearType() { * * @return the current parsha. */ - public Parsha getParshah() { + public synchronized Parsha getParshah() { if (getDayOfWeek() != Calendar.SATURDAY) { return Parsha.NONE; } @@ -532,7 +532,7 @@ public Parsha getUpcomingParshah() { * {@link Parsha#SHUVA Shuva}, {@link Parsha#SHIRA Shira}, or {@link Parsha#NONE Parsha.NONE} for a regular * Shabbos (or any weekday). */ - public Parsha getSpecialShabbos() { + public synchronized Parsha getSpecialShabbos() { if (getDayOfWeek() == Calendar.SATURDAY) { if ((getJewishMonth() == SHEVAT && !isJewishLeapYear()) || (getJewishMonth() == ADAR && isJewishLeapYear())) { if (getJewishDayOfMonth() == 25 || getJewishDayOfMonth() == 27 || getJewishDayOfMonth() == 29) { @@ -593,7 +593,7 @@ public Parsha getSpecialShabbos() { * * @see HebrewDateFormatter#formatYomTov(JewishCalendar) */ - public int getYomTovIndex() { + public synchronized int getYomTovIndex() { final int day = getJewishDayOfMonth(); final int dayOfWeek = getDayOfWeek(); diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index 0e8a55dd..d3d0df44 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -701,7 +701,7 @@ public int getDaysInJewishMonth() { * Computes and sets the Jewish date fields based on the provided absolute (Gregorian) date. * @param gregorianAbsDate the Gregorian absolute date. */ - private void setAbsDate(int gregorianAbsDate) { + private synchronized void setAbsDate(int gregorianAbsDate) { if (gregorianAbsDate <= 0) { throw new IllegalArgumentException("Dates in the BC era are not supported"); } @@ -952,7 +952,7 @@ public void setJewishDate(int year, int month, int dayOfMonth) { * larger a larger number of chalakim such as 793 (TaShTzaG) break the chalakim into minutes (18 * chalakim per minutes, so it would be 44 minutes and 1 chelek in the case of 793 (TaShTzaG). */ - public void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { + public synchronized void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) { validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim); From 5db8af22a0fff3b0ee3fa6891b3af95e415a82f6 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 6 May 2026 23:43:01 -0400 Subject: [PATCH 107/121] Minor JavaDoc tweaks for AstronomicalCalculator --- .../zmanim/util/AstronomicalCalculator.java | 75 +++++++++++-------- 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java index 212825b0..245b1fba 100644 --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java @@ -106,9 +106,9 @@ public static AstronomicalCalculator getDefault() { * method is implemented by the classes that extend this class. * * @param localDate - * Used to calculate day of year. + * The LocalDate representing the date to calculate sunrise for. * @param geoLocation - * The location information used for astronomical calculating sun times. + * The location information used for astronomical calculation of solar times. * @param zenith * the azimuth below the vertical zenith of 90 degrees. for sunrise typically the {@link #adjustZenith * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts} @@ -117,9 +117,8 @@ public static AstronomicalCalculator getDefault() { * {@link com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. * @param adjustForElevation * Should the time be adjusted for elevation - * @return The UTC time of sunrise in 24-hour format. 5:45:00 AM will return 5.75.0. If an error was encountered in - * the calculation (expected behavior for some locations such as near the poles, - * {@link java.lang.Double#NaN} will be returned. + * @return The UTC time of sunrise in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in the + * calculation (expected behavior for some locations such as near the poles, {@link Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ public abstract double getUTCSunrise(LocalDate localDate, GeoLocation geoLocation, double zenith, @@ -130,9 +129,9 @@ public abstract double getUTCSunrise(LocalDate localDate, GeoLocation geoLocatio * method is implemented by the classes that extend this class. * * @param localDate - * Used to calculate day of year. + * The LocalDate representing the date to calculate sunset for. * @param geoLocation - * The location information used for astronomical calculating sun times. + * The location information used for astronomical calculation of solar times. * @param zenith * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts} @@ -141,43 +140,55 @@ public abstract double getUTCSunrise(LocalDate localDate, GeoLocation geoLocatio * {@link com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. * @param adjustForElevation * Should the time be adjusted for elevation - * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in - * the calculation (expected behavior for some locations such as near the poles, - * {@link java.lang.Double#NaN} will be returned. + * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in the + * calculation (expected behavior for some locations such as near the poles, {@link Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation); - /** - * Return solar noon (UTC) for the given day at the - * given location on earth. The {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates - * true solar noon, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating - * the time as halfway between sunrise and sunset. + * Return the Universal Coordinated Time (UTC) of + * solar noon (UTC) for the given day at the given location. The + * {@link NOAACalculator}, the default calculator implementation calculates true solar noon, something that can be calculated + * even in the Arctic / Antarctic where there may be no sunrise or sunset, while the {@link SunTimesCalculator} approximates it, + * calculating the time as halfway between sunrise and sunset, something that can't be calculated in Polar regions where there is + * no sunrise or sunset for part of the year. See The + * Definition of Chatzos for details on solar noon / + * midnight calculations. * * @param localDate - * Used to calculate day of year. + * The LocalDate representing the date to calculate noon for. * @param geoLocation - * The location information used for astronomical calculating sun times. + * The location information used for astronomical calculation of solar times. * - * @return the time in minutes from zero UTC + * @return The UTC time of solar noon in 24-hour format. 1:45:00 PM will return 13.75. If an error was encountered in the + * the calculation (expected behavior for some locations such as near the poles, {@link Double#NaN} will be returned. + * @see #getUTCMidnight(LocalDate, GeoLocation) */ public abstract double getUTCNoon(LocalDate localDate, GeoLocation geoLocation); /** - * Return solar midnight (UTC) for the given day at the - * given location on earth. The the {@link com.kosherjava.zmanim.util.NOAACalculator} implementation calculates - * true solar midnight, while the {@link com.kosherjava.zmanim.util.SunTimesCalculator} approximates it, calculating - * the time as 12 hours after halfway between sunrise and sunset. + * Return the Universal Coordinated Time (UTC) of + * solar midnight (UTC) for the given day at the given location. The + * {@link NOAACalculator}, the default calculator implementation calculates true solar midnight, something that can be calculated + * even in the Arctic / Antarctic where there may be no sunrise or sunset, while the {@link SunTimesCalculator} approximates it, + * calculating the time as 12 hours after halfway between sunrise and sunset, something that can't be calculated in Polar + * regions where there is no sunrise or sunset for part of the year. See The Definition of Chatzos for details on solar noon / + * midnight calculations. * * @param localDate - * Used to calculate day of year. + * The LocalDate representing the date to calculate midnight for. The calculation will be for midnight + * at the end of the day passed in. * @param geoLocation - * The location information used for astronomical calculating sun times. + * The location information used for astronomical calculation of solar times. * - * @return the time in minutes from zero UTC + * @return The UTC time of solar midnight in in a 24-hour double format. 1:45:00 AM will return 1.75. If an error + * was encountered in the calculation (expected behavior for the {@link SunTimesCalculator} at times of the year in + * Polar regions), {@link Double#NaN} will be returned. + * @see #getUTCNoon(LocalDate, GeoLocation) */ public abstract double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation); @@ -187,9 +198,9 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation * horizon. Not corrected for altitude. * * @param zonedDateTime - * the ZonedDateTime of the time of calculation + * The ZonedDateTime to calculate the elevation for. * @param geoLocation - * The location information + * The location information used for astronomical calculation of solar times. * @return solar elevation in degrees. The horizon (calculated in a vacuum using the solar radius as the point) * is 090°, civil twilight is -690° etc. This means that sunrise and sunset that do use * refraction and are calculated from the upper limb of the sun will return about 0.83390°. @@ -202,9 +213,9 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation * degrees. * * @param zonedDateTime - * The ZonedDateTime of the time of calculation. + * The ZonedDateTime to calculate the azimuth for.ac * @param geoLocation - * The location information + * The location information used for astronomical calculation of solar times. * @return the solar azimuth in degrees. Astronomical midday would be 180 in the norther hemosphere and 0 in the * southern hemosphere. Depending on the location and time of year, sunrise will have an azimuth of about * 90° and sunset about 270°. @@ -340,7 +351,7 @@ public void setSolarRadius(double solarRadius) { } /** - * @see java.lang.Object#equals(Object) + * @see Object#equals(Object) */ public boolean equals(Object object) { if (this == object) { @@ -356,7 +367,7 @@ public boolean equals(Object object) { } /** - * @see java.lang.Object#hashCode() + * @see Object#hashCode() */ public int hashCode() { int result = 17; @@ -368,7 +379,7 @@ public int hashCode() { } /** - * @see java.lang.Object#clone() + * @see Object#clone() * @since 1.1 */ public Object clone() { From a370c92bfea6f66d677ad9d71370098c235f946a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 6 May 2026 23:45:12 -0400 Subject: [PATCH 108/121] Minor JavaDoc tweaks for SunTimesCalculator --- .../zmanim/util/SunTimesCalculator.java | 95 +++++++------------ 1 file changed, 34 insertions(+), 61 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java index 06b1ac0c..cc723ecf 100644 --- a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java @@ -25,7 +25,7 @@ * href="https://aa.usno.navy.mil/publications/asa">Astronomical Almanac and used with his permission. Added to Kevin's * code is adjustment of the zenith to account for elevation. This algorithm returns the same time every year and does not * account for leap years. It is not as accurate as the Jean Meeus based {@link NOAACalculator} that is the default calculator - * use by the KosherJava zmanim library. + * use by the KosherJava zmanim library. It also does not have an implementation of some solar calculation methods. * * @author © Eliyahu Hershfeld 2004 - 2026 * @author © Kevin Boone 2000 @@ -39,29 +39,23 @@ public SunTimesCalculator() { super(); } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getCalculatorName() - */ + @Override public String getCalculatorName() { return "US Naval Almanac Algorithm"; } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(LocalDate, GeoLocation, double, boolean) - */ - public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + @Override + public double getUTCSunrise(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(dt, geoLocation, adjustedZenith, true); + return getTimeUTC(localDate, geoLocation, adjustedZenith, true); } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean) - */ - public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { + @Override + public double getUTCSunset(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { double elevation = adjustForElevation ? geoLocation.getElevation() : 0; double adjustedZenith = adjustZenith(zenith, elevation); - return getTimeUTC(dt, geoLocation, adjustedZenith, false); + return getTimeUTC(localDate, geoLocation, adjustedZenith, false); } /** @@ -119,7 +113,8 @@ private static double cosDeg(double deg) { * Get time difference between location's longitude and the Meridian, in hours. * * @param longitude the longitude - * @return time difference between the location's longitude and the Meridian, in hours. West of Meridian has a negative time difference + * @return time difference between the location's longitude and the Meridian, in hours. West of Meridian has a negative + * time difference */ private static double getHoursFromMeridian(double longitude) { return longitude / DEG_PER_HOUR; @@ -134,7 +129,7 @@ private static double getHoursFromMeridian(double longitude) { * @param isSunrise true for sunrise and false for sunset * * @return the approximate time of sunset or sunrise in days since midnight Jan 1st, assuming 6am and 6pm events. We - * need this figure to derive the Sun's mean anomaly. + * need this figure to derive the Sun's mean anomaly. */ private static double getApproxTimeDays(int dayOfYear, double hoursFromMeridian, boolean isSunrise) { if (isSunrise) { @@ -220,20 +215,18 @@ private static double getLocalMeanTime(double localHour, double sunRightAscensio } /** - * Get sunrise or sunset time in UTC, according to flag. This time is returned as - * a double and is not adjusted for time-zone. + * Get sunrise or sunset time in UTC, according to flag. This time is returned as a double and is not adjusted for time-zone. * * @param localDate * the LocalDate object to extract the day of year for calculation * @param geoLocation - * the GeoLocation object that contains the latitude and longitude + * The location information used for astronomical calculation of solar times. * @param zenith - * Sun's zenith, in degrees + * Sun's zenith in degrees * @param isSunrise * True for sunrise and false for sunset. - * @return the time as a double. If an error was encountered in the calculation - * (expected behavior for some locations such as near the poles, - * {@link Double#NaN} will be returned. + * @return the time as a double. If an error was encountered in the calculation (expected behavior for some locations such as + * near the poles, {@link Double#NaN} will be returned. */ private static double getTimeUTC(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean isSunrise) { int dayOfYear = localDate.getDayOfYear(); @@ -256,23 +249,7 @@ private static double getTimeUTC(LocalDate localDate, GeoLocation geoLocation, d return pocessedTime > 0 ? pocessedTime % 24 : pocessedTime % 24 + 24; // ensure that the time is >= 0 and < 24 } - /** - * Return the Universal Coordinated Time (UTC) - * of solar noon for the given day at the given location - * on earth. This implementation returns solar noon as the time halfway between sunrise and sunset. - * {@link NOAACalculator}, the default calculator, returns true solar noon. See The Definition of Chatzos for details on solar - * noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) - * @see NOAACalculator - * - * @param localDate - * The LocalDate representing the date to calculate solar noon for - * @param geoLocation - * The location information used for astronomical calculating sun times. - * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for - * some locations such as near the poles, {@link Double#NaN} will be returned. - */ + @Override public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { double sunrise = getUTCSunrise(localDate, geoLocation, 90, false); double sunset = getUTCSunset(localDate, geoLocation, 90, false); @@ -286,38 +263,34 @@ public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { return noon; } - /** - * Return the Universal Coordinated Time (UTC) - * of midnight for the given day at the given location on earth. This implementation returns solar midnight as 12 hours - * after utc noon that is halfway between sunrise and sunset. - * {@link NOAACalculator}, the default calculator, returns true solar noon. See The Definition of Chatzos for details on solar - * noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) - * @see NOAACalculator - * - * @param localDate - * The LocalDate representing the date to calculate solar noon for - * @param geoLocation - * The location information used for astronomical calculating sun times. - * @return the time in minutes from zero UTC. If an error was encountered in the calculation (expected behavior for - * some locations such as near the poles, {@link Double#NaN} will be returned. - */ + @Override public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { return (getUTCNoon(localDate, geoLocation) + 12); } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(ZonedDateTime, GeoLocation) + * This calculator class does not implement the getSolarAzimuth method, and throws a {@link UnsupportedOperationException}. + * Use the {@link NOAACalculator}if this method is required. + *
{@inheritDoc} + * @throws UnsupportedOperationException This calculator class does not implement the getSolarAzimuth method. Use the + * {@link NOAACalculator} instead. */ + @Override public double getSolarAzimuth(ZonedDateTime zdt, GeoLocation geoLocation) { - throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarAzimuth method. Use the NOAACalculator instead."); + throw new UnsupportedOperationException( + "The SunTimesCalculator class does not implement the getSolarAzimuth method. Use the {@link NOAACalculator} instead."); } /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) + * This calculator class does not implement the getSolarElevation method, and throws a {@link UnsupportedOperationException}. + * Use the {@link NOAACalculator}if this method is required. + *
{@inheritDoc} + * @throws UnsupportedOperationException This calculator class does not implement the getSolarElevation method. Use the + * {@link NOAACalculator} instead. */ + @Override public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) { - throw new UnsupportedOperationException("The SunTimesCalculator class does not implement the getSolarElevation method. Use the NOAACalculator instead."); + throw new UnsupportedOperationException( + "The SunTimesCalculator class does not implement the getSolarElevation method. Use the NOAACalculator instead."); } } From 747bc1e1799c87047789a021f937e90a62029936 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Wed, 6 May 2026 23:47:11 -0400 Subject: [PATCH 109/121] Monor JavaDoc tweaks for NOAACalculator --- .../zmanim/util/NOAACalculator.java | 75 +++++-------------- 1 file changed, 18 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index 319098e4..0176bc6b 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -62,23 +62,17 @@ public NOAACalculator() { super(); } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getCalculatorName() - */ + @Override public String getCalculatorName() { return "US National Oceanic and Atmospheric Administration Algorithm"; // Implementation of the Jean Meeus algorithm } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunrise(LocalDate, GeoLocation, double, boolean) - */ + @Override public double getUTCSunrise(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { return getUTCSunRiseSet(dt, geoLocation, zenith, adjustForElevation,SolarEvent.SUNRISE); } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCSunset(LocalDate, GeoLocation, double, boolean) - */ + @Override public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, boolean adjustForElevation) { return getUTCSunRiseSet(dt, geoLocation, zenith, adjustForElevation,SolarEvent.SUNSET); } @@ -90,19 +84,18 @@ public double getUTCSunset(LocalDate dt, GeoLocation geoLocation, double zenith, * @param localDate * Used to calculate day of year. * @param geoLocation - * The location information used for astronomical calculating sun times. + * The location information used for astronomical calculation of solar times. * @param zenith - * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith - * zenith} used for the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts} - * this slightly to account for solar refraction and the sun's radius. Another example would be - * {@link com.kosherjava.zmanim.AstronomicalCalendar#getEndNauticalTwilight()} that passes - * {@link com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. + * the azimuth below the vertical zenith of 90°. For sunset typically the {@link #adjustZenith zenith} used for + * the calculation uses geometric zenith of 90° and {@link #adjustZenith adjusts} this slightly to account for + * solar refraction and the sun's radius. Another example would be {@link + * com.kosherjava.zmanim.AstronomicalCalendar#getEndNauticalTwilight()} that passes {@link + * com.kosherjava.zmanim.AstronomicalCalendar#NAUTICAL_ZENITH} to this method. * @param adjustForElevation * Should the time be adjusted for elevation * @param solarEvent if the calculation is for {@link SolarEvent#SUNRISE} or {@link SolarEvent#SUNSET} - * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in - * the calculation (expected behavior for some locations such as near the poles, - * {@link java.lang.Double#NaN} will be returned. + * @return The UTC time of sunset in 24-hour format. 5:45:00 AM will return 5.75. If an error was encountered in the + * calculation (expected behavior for some locations such as near the poles, {@link Double#NaN} will be returned. * @see #getElevationAdjustment(double) */ private double getUTCSunRiseSet(LocalDate localDate, GeoLocation geoLocation, double zenith, boolean adjustForElevation, @@ -330,17 +323,13 @@ private static double getSunHourAngle(double latitude, double solarDeclination, } return hourAngle; } - - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarElevation(ZonedDateTime, GeoLocation) - */ + + @Override public double getSolarElevation(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { return getSolarElevationAzimuth(zonedDateTime, geoLocation, false); } - /** - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getSolarAzimuth(ZonedDateTime, GeoLocation) - */ + @Override public double getSolarAzimuth(ZonedDateTime zonedDateTime, GeoLocation geoLocation) { return getSolarElevationAzimuth(zonedDateTime, geoLocation, true); } @@ -417,21 +406,8 @@ private double adjustElevationForRefraction(double elevation) { } /** - * Return the Universal Coordinated Time (UTC) - * of solar noon for the given day at the given location - * on earth. This implementation returns true solar noon as opposed to the time halfway between sunrise and sunset. - * Other calculators may return a more simplified calculation of halfway between sunrise and sunset. See The Definition of Chatzos for details on - * solar noon calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) + * {@inheritDoc} * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) - * - * @param localDate - * The localDate representing the date to calculate solar noon for - * @param geoLocation - * The location information used for astronomical calculating sun times. This class uses only requires - * the longitude for calculating noon since it is the same time anywhere along the longitude line. - * @return the time in minutes from zero UTC */ public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { double noon = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.NOON); @@ -440,22 +416,8 @@ public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { } /** - * Return the Universal Coordinated Time - * (UTC) of the solar midnight for the end of the given civil - * day at the given location on earth (about 12 hours after solar noon). This implementation returns true solar - * midnight as opposed to the time halfway between sunrise and sunset. Other calculators may return a more - * simplified calculation of halfway between sunrise and sunset. See The Definition of Chatzos for details on - * solar noon / midnight calculations. - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) + * {@inheritDoc} * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) - * - * @param localDate - * The LocalDate representing the date to calculate solar noon for - * @param geoLocation - * The location information used for astronomical calculating sun times. This class uses only requires - * the longitude for calculating noon since it is the same time anywhere along the longitude line. - * @return the time in minutes from zero UTC */ public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { double midnight = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); @@ -469,8 +431,7 @@ public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { * midnight (about 12 hours after solar noon) of the given day at the given location on earth. * * @param julianDay - * The Julian day since J2000.0. + * The Julian day since J2000.0. * @param longitude * The longitude of observer in degrees * @param solarEvent @@ -478,8 +439,8 @@ public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { * * @return the time in minutes from zero UTC * - * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getUTCNoon(LocalDate, GeoLocation) * @see #getUTCNoon(LocalDate, GeoLocation) + * @see #getUTCMidnight(LocalDate, GeoLocation) */ private static double getSolarNoonMidnightUTC(double julianDay, double longitude, SolarEvent solarEvent) { julianDay = (solarEvent == SolarEvent.NOON) ? julianDay : julianDay + 0.5; From 94721d47ae82c99c15b0f33e219d012d50f4d393 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Sun, 10 May 2026 01:29:05 -0400 Subject: [PATCH 110/121] HebrewDateFormatter JavaDoc tweaks --- .../hebrewcalendar/HebrewDateFormatter.java | 332 +++++++++--------- 1 file changed, 173 insertions(+), 159 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 85fe6990..d11da217 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -23,8 +23,8 @@ * * 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. - * Sample full date output includes (using various options): + * and Hachodesh), Yomim Tovim in Hebrew or Latin chars, and has various settings. Sample full date output + * includes (using various options): *

    *
  • 21 Shevat, 5729
  • *
  • כא שבט תשכט
  • @@ -42,79 +42,73 @@ public class HebrewDateFormatter { /** - * See {@link isHebrewFormat()} and {@link setHebrewFormat(boolean)}. + * See {@link #isHebrewFormat()} and {@link #setHebrewFormat(boolean)}. */ private boolean hebrewFormat = false; /** - * See {@link isUseLongHebrewYears()} and {@link setUseLongHebrewYears(boolean)}. + * See {@link #isUseLongHebrewYears()} and {@link #setUseLongHebrewYears(boolean)}. */ private boolean useLonghebrewYears = false; /** - * See {@link isUseGershGershayim()} and {@link setUseGershGershayim(boolean)}. + * See {@link #isUseGershGershayim()} and {@link #setUseGershGershayim(boolean)}. */ private boolean useGershGershayim = true; /** - * See {@link isLongWeekFormat()} and {@link setLongWeekFormat(boolean)}. + * See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. */ private boolean longWeekFormat = true; /** - * See {@link isUseFinalFormLetters()} and {@link setUseFinalFormLetters(boolean)}. + * See {@link #isUseFinalFormLetters()} and {@link #setUseFinalFormLetters(boolean)}. */ private boolean useFinalFormLetters = false; /** - * The internal DateFormat.  See {@link isLongWeekFormat()} and {@link setLongWeekFormat(boolean)}. + * The internal DateFormat. See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. */ private DateTimeFormatter weekFormat; /** - * List of transliterated parshiyos using the default Ashkenazi pronunciation.  The formatParsha method - * uses this for transliterated parsha formatting.  This list can be overridden (for Sephardi - * English transliteration for example) by setting the {@link setTransliteratedParshiosList(EnumMap)}.  The list - * includes double and special parshiyos is set as "Bereshis, Noach, Lech Lecha, Vayera, Chayei Sara, - * Toldos, Vayetzei, Vayishlach, Vayeshev, Miketz, Vayigash, Vayechi, Shemos, Vaera, Bo, Beshalach, Yisro, Mishpatim, - * Terumah, Tetzaveh, Ki Sisa, Vayakhel, Pekudei, Vayikra, Tzav, Shmini, Tazria, Metzora, Achrei Mos, Kedoshim, Emor, - * Behar, Bechukosai, Bamidbar, Nasso, Beha'aloscha, Sh'lach, Korach, Chukas, Balak, Pinchas, Matos, Masei, Devarim, - * Vaeschanan, Eikev, Re'eh, Shoftim, Ki Seitzei, Ki Savo, Nitzavim, Vayeilech, Ha'Azinu, Vezos Habracha, - * Vayakhel Pekudei, Tazria Metzora, Achrei Mos Kedoshim, Behar Bechukosai, Chukas Balak, Matos Masei, Nitzavim Vayeilech, - * Shekalim, Zachor, Parah, Hachodesh,Shuva, Shira, Hagadol, Chazon, Nachamu". + * List of transliterated parshiyos using the default Ashkenazi pronunciation. For information on the format, see + * {@link #getTransliteratedParshiosList()}. * - * @see formatParsha(JewishCalendar) + * @see #getTransliteratedParshiosList() + * @see #setTransliteratedParshiosList(EnumMap) + * @see #HebrewDateFormatter() where the map is initially set. */ private EnumMap transliteratedParshaMap; /** - * Unicode {@link EnumMap} of Hebrew parshiyos.  The list includes double and special parshiyos and + * An {@link EnumMap} of Hebrew parshiyos. The list includes double and special parshiyos and * contains ‏בראשית, נח, לך לך, - * וירא, חיי שרה, - * תולדות, ויצא, וישלח, - * וישב, מקץ, ויגש, ויחי, - * שמות, וארא, בא, בשלח, - * יתרו, משפטים, תרומה, - * תצוה, כי תשא, ויקהל, - * פקודי, ויקרא, צו, - * שמיני, תזריע, מצרע, - * אחרי מות, קדושים, - * אמור, בהר, בחקתי, - * במדבר, נשא, בהעלתך, - * שלח לך, קרח, חוקת, בלק, - * פינחס, מטות, מסעי, - * דברים, ואתחנן, עקב, - * ראה, שופטים, כי תצא, - * כי תבוא, נצבים, וילך, - * האזינו, וזאת הברכה, - * ויקהל פקודי, תזריע - * מצרע, אחרי מות - * קדושים, בהר בחקתי, - * חוקת בלק, מטות מסעי, - * נצבים וילך, שקלים, - * זכור, פרה, החדש, - * שובה,שירה,הגדול, - * חזון,נחמו + * וירא, חיי שרה, + * תולדות, ויצא, וישלח, + * וישב, מקץ, ויגש, ויחי, + * שמות, וארא, בא, בשלח, + * יתרו, משפטים, תרומה, + * תצוה, כי תשא, ויקהל, + * פקודי, ויקרא, צו, + * שמיני, תזריע, מצרע, + * אחרי מות, קדושים, + * אמור, בהר, בחקתי, + * במדבר, נשא, בהעלתך, + * שלח לך, קרח, חוקת, בלק, + * פינחס, מטות, מסעי, + * דברים, ואתחנן, עקב, + * ראה, שופטים, כי תצא, + * כי תבוא, נצבים, וילך, + * האזינו, וזאת הברכה, + * ויקהל פקודי, תזריע + * מצרע, אחרי מות + * קדושים, בהר בחקתי, + * חוקת בלק, מטות מסעי, + * נצבים וילך, שקלים, + * זכור, פרה, החדש, + * שובה,שירה,הגדול, + * חזון,נחמו
    */ private final EnumMap hebrewParshaMap; @@ -271,20 +265,20 @@ public HebrewDateFormatter() { } /** - * Returns if the {@link formatDayOfWeek(JewishDate)} will use the long format such as ראשון - * or short such as א when formatting the day of week in {@link isHebrewFormat() Hebrew}. + * Returns if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as ראשון + * or short such as א when formatting the day of week in {@link #isHebrewFormat() Hebrew}. * * @return the longWeekFormat - * @see setLongWeekFormat(boolean) - * @see formatDayOfWeek(JewishDate) + * @see #setLongWeekFormat(boolean) + * @see #formatDayOfWeek(JewishDate) */ public boolean isLongWeekFormat() { return longWeekFormat; } /** - * Setting to control if the {@link formatDayOfWeek(JewishDate)} will use the long format such as - * ראשון or short such as א when formatting the day of week in {@link isHebrewFormat() + * Setting to control if the {@link #formatDayOfWeek(JewishDate)} will use the long format such as + * ראשון or short such as א when formatting the day of week in {@link #isHebrewFormat() * Hebrew}. * * @param longWeekFormat @@ -312,10 +306,10 @@ public void setLongWeekFormat(boolean longWeekFormat) { private static final String GERSHAYIM = "\u05F4"; /** - * Transliterated month names.  Defaults to ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", - * "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" ]. - * @see getTransliteratedMonthList() - * @see setTransliteratedMonthList(String[]) + * Transliterated month names that default to ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", + * "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" ]. + * @see #getTransliteratedMonthList() + * @see #setTransliteratedMonthList(String[]) */ private String[] transliteratedMonths = { "Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" }; @@ -323,25 +317,26 @@ public void setLongWeekFormat(boolean longWeekFormat) { /** * The Hebrew omer prefix charachter. It defaults to ב producing בעומר, * but can be set to ל to produce לעומר (or any other prefix). - * @see getHebrewOmerPrefix() - * @see setHebrewOmerPrefix(String) + * @see #getHebrewOmerPrefix() + * @see #setHebrewOmerPrefix(String) */ private String hebrewOmerPrefix = "\u05D1"; /** - * The default value for formatting Shabbos (Saturday).  Defaults to Shabbos. - * @see getTransliteratedShabbosDayOfWeek() - * @see setTransliteratedShabbosDayOfWeek(String) + * The default value for formatting "Shabbos" (Saturday) when transliterated. + * @see #getTransliteratedShabbosDayOfWeek() + * @see #setTransliteratedShabbosDayOfWeek(String) */ private String transliteratedShabbosDayOfWeek = "Shabbos"; /** * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation "Shabbos". - * This can be overwritten using the {@link setTransliteratedShabbosDayOfWeek(String)} + * This can be overwritten using the {@link #setTransliteratedShabbosDayOfWeek(String)}. It is uesd by {@link + * #formatDayOfWeek(JewishDate)}. * * @return the transliteratedShabbos. The default list of months uses Ashkenazi pronunciation "Shabbos". - * @see setTransliteratedShabbosDayOfWeek(String) - * @see formatDayOfWeek(JewishDate) + * @see #setTransliteratedShabbosDayOfWeek(String) + * @see #formatDayOfWeek(JewishDate) */ public String getTransliteratedShabbosDayOfWeek() { return transliteratedShabbosDayOfWeek; @@ -349,20 +344,20 @@ public String getTransliteratedShabbosDayOfWeek() { /** * Setter to override the default transliterated name of "Shabbos" to alternate spelling such as "Shabbat" used by - * the {@link formatDayOfWeek(JewishDate)} + * the {@link #formatDayOfWeek(JewishDate)}. * * @param transliteratedShabbos * the transliteratedShabbos to set * - * @see getTransliteratedShabbosDayOfWeek() - * @see formatDayOfWeek(JewishDate) + * @see #getTransliteratedShabbosDayOfWeek() + * @see #formatDayOfWeek(JewishDate) */ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { this.transliteratedShabbosDayOfWeek = transliteratedShabbos; } /** - * See {@link getTransliteratedHolidayList()} and {@link setTransliteratedHolidayList(String[])}. + * See {@link #getTransliteratedHolidayList()} and {@link #setTransliteratedHolidayList(String[])}. */ private String[] transliteratedHolidays = {"Erev Pesach", "Pesach", "Chol Hamoed Pesach", "Pesach Sheni", "Erev Shavuos", "Shavuos", "Seventeenth of Tammuz", "Tishah B'Av", "Tu B'Av", "Erev Rosh Hashana", @@ -373,29 +368,34 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) { "Isru Chag"}; /** - * Returns the array of holidays transliterated into Latin chars. This is used by the - * {@link formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses - * Ashkenazi pronunciation in typical American English spelling. + * Returns the array of Yomim Tovim (holidays) transliterated into Latin chars. This is used by the {@link + * #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months usesnAshkenazi + * pronunciation in typical American English spelling. 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", "Erev Chanukah", "Chanukah", + * "Tenth of Teves", "Tu B'Shvat", "Fast of Esther", "Purim", "Shushan Purim",m"Purim Katan", "Rosh Chodesh", "Yom HaShoah", + * "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", "Lag B'Omer", "Shushan Purim Katan", "Isru Chag"]. * - * @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", - * "Erev Chanukah", "Chanukah", "Tenth of Teves", "Tu B'Shvat", "Fast of Esther", "Purim", "Shushan Purim", - * "Purim Katan", "Rosh Chodesh", "Yom HaShoah", "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", - * "Lag B'Omer", "Shushan Purim Katan", "Isru Chag"]. + * @return the array of transliterated Yomim Tovim (holidays). * - * @see setTransliteratedMonthList(String[]) - * @see formatYomTov(JewishCalendar) - * @see isHebrewFormat() + * @see #setTransliteratedMonthList(String[]) + * @see #formatYomTov(JewishCalendar) + * @see #isHebrewFormat() */ public String[] getTransliteratedHolidayList() { return transliteratedHolidays; } /** - * Sets the array of holidays transliterated into Latin chars. This is used by the - * {@link formatYomTov(JewishCalendar)} when formatting the Yom Tov String. + * Sets the array of Yomim Tovim (holidays) transliterated into Latin chars. This is used by the + * {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The list uses the following order and uses + * the spelling as follows. + * ["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", "Erev Chanukah", "Chanukah", + * "Tenth of Teves", "Tu B'Shvat", "Fast of Esther", "Purim", "Shushan Purim", "Purim Katan", "Rosh Chodesh", "Yom HaShoah", + * "Yom Hazikaron", "Yom Ha'atzmaut", "Yom Yerushalayim", "Lag B'Omer", "Shushan Purim Katan", "Isru Chag"]. * * @param transliteratedHolidays * the transliteratedHolidays to set. Ensure that the sequence exactly matches the list returned by the @@ -406,7 +406,8 @@ public void setTransliteratedHolidayList(String[] transliteratedHolidays) { } /** - * Hebrew holiday array in the following format.
    ‏["ערב פסח", + * Hebrew Yomim Tovim (holidays) array in the following format.
    + * ‏["ערב פסח", * "פסח", "חול המועד * פסח", "פסח שני", "ערב * שבועות", "שבועות", @@ -467,11 +468,11 @@ public void setTransliteratedHolidayList(String[] transliteratedHolidays) { "\u05D0\u05E1\u05E8\u05D5 \u05D7\u05D2"}; /** - * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters. + * Formats the Yom Tov (holiday) in Hebrew or transliterated Latin characters. * * @param jewishCalendar the JewishCalendar - * @return the formatted holiday or an empty String if the day is not a holiday. - * @see isHebrewFormat() + * @return the formatted Yom Tov (holiday) or an empty String if the day is not a Yom Tov (holiday). + * @see #isHebrewFormat() */ public String formatYomTov(JewishCalendar jewishCalendar) { int index = jewishCalendar.getYomTovIndex(); @@ -518,12 +519,12 @@ public String formatRoshChodesh(JewishCalendar jewishCalendar) { * Returns if the formatter is set to use Hebrew formatting in the various formatting methods. * * @return the hebrewFormat - * @see setHebrewFormat(boolean) - * @see format(JewishDate) - * @see formatDayOfWeek(JewishDate) - * @see formatMonth(JewishDate) - * @see formatOmer(JewishCalendar) - * @see formatYomTov(JewishCalendar) + * @see #setHebrewFormat(boolean) + * @see #format(JewishDate) + * @see #formatDayOfWeek(JewishDate) + * @see #formatMonth(JewishDate) + * @see #formatOmer(JewishCalendar) + * @see #formatYomTov(JewishCalendar) */ public boolean isHebrewFormat() { return hebrewFormat; @@ -534,52 +535,54 @@ public boolean isHebrewFormat() { * * @param hebrewFormat * the hebrewFormat to set - * @see isHebrewFormat() - * @see format(JewishDate) - * @see formatDayOfWeek(JewishDate) - * @see formatMonth(JewishDate) - * @see formatOmer(JewishCalendar) - * @see formatYomTov(JewishCalendar) + * @see #isHebrewFormat() + * @see #format(JewishDate) + * @see #formatDayOfWeek(JewishDate) + * @see #formatMonth(JewishDate) + * @see #formatOmer(JewishCalendar) + * @see #formatYomTov(JewishCalendar) */ public void setHebrewFormat(boolean hebrewFormat) { this.hebrewFormat = hebrewFormat; } /** - * Returns the Hebrew Omer prefix.  By default it is the letter ב producing - * בעומר, but it can be set to ל to produce - * לעומר (or any other prefix) using the {@link setHebrewOmerPrefix(String)}. + * Returns the Hebrew Omer prefix. By default it is the letter ב producing בעומר, + * but it can be set to ל to produce לעומר (or any other prefix) using the + * {@link #setHebrewOmerPrefix(String)}. * * @return the hebrewOmerPrefix - * - * @see hebrewOmerPrefix - * @see setHebrewOmerPrefix(String) - * @see formatOmer(JewishCalendar) + * @see #hebrewOmerPrefix + * @see #setHebrewOmerPrefix(String) + * @see #formatOmer(JewishCalendar) */ public String getHebrewOmerPrefix() { return hebrewOmerPrefix; } /** - * Method to set the Hebrew Omer prefix.  By default it is the letter ב producing - * בעומר, but it can be set to ל to produce - * לעומר (or any other prefix) + * Method to set the Hebrew Omer prefix. By default it is the letter ב producing בעומר, + * but it can be set to ל to produce לעומר (or any other prefix). * @param hebrewOmerPrefix * the hebrewOmerPrefix to set. You can use the Unicode \u05DC to set it to ל. - * @see hebrewOmerPrefix - * @see getHebrewOmerPrefix() - * @see formatOmer(JewishCalendar) + * @see #hebrewOmerPrefix + * @see #getHebrewOmerPrefix() + * @see #formatOmer(JewishCalendar) */ public void setHebrewOmerPrefix(String hebrewOmerPrefix) { this.hebrewOmerPrefix = hebrewOmerPrefix; } /** - * Returns the Hebrew array of months. This list has a length of 14 starting with "ניסן" and ending - * with 3 variations of Adar - "אדר", "אדר ב", "אדר - * א". + * Returns the Hebrew array of months in the order of ‏["\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", + * "\u05E1\u05D9\u05D5\u05DF", "\u05EA\u05DE\u05D5\u05D6", "\u05D0\u05D1", "\u05D0\u05DC\u05D5\u05DC", + * "\u05EA\u05E9\u05E8\u05D9", "\u05D7\u05E9\u05D5\u05DF", "\u05DB\u05E1\u05DC\u05D5", "\u05D8\u05D1\u05EA", + * "\u05E9\u05D1\u05D8", "\u05D0\u05D3\u05E8", "\u05D0\u05D3\u05E8 \u05D1", "\u05D0\u05D3\u05E8 \u05D0"]. This list has + * a length of 14 starting with "ניסן" and ending with 3 variations of Adar - + * "אדר", "אדר ב", "אדר א". * @return the array of Hebrew months. - * @see setHebrewMonthList(String[]) + * @see #hebrewMonths + * @see #setHebrewMonthList(String[]) */ public String[] getHebrewMonthList() { return hebrewMonths; @@ -593,7 +596,7 @@ public String[] getHebrewMonthList() { * * @param hebrewMonths the array of Hebrew months beginning in "ניסן" and ending in * "אדר", "אדר ב", "אדר א" - * @see getHebrewMonthList() + * @see #getHebrewMonthList() */ public void setHebrewMonthList(String[] hebrewMonths) { if(hebrewMonths.length !=14) { @@ -603,14 +606,14 @@ public void setHebrewMonthList(String[] hebrewMonths) { } /** - * Returns the array of months transliterated into Latin chars. The default list of months uses Ashkenazi - * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar - - * "Adar", "Adar II", "Adar I" + * Returns the array of months transliterated into Latin chars. The default list of months uses Ashkenazi pronunciation in + * typical American English spelling. This list has a length of 14 with 3 variations for Adar - "Adar", "Adar II", "Adar I". + * The array of months beginn in Nissan and end in "Adar", "Adar II", "Adar I". The default list is + * ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves", "Shevat", "Adar", + * "Adar II", "Adar I"]. * - * @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[]) + * @return the array of 14 month names beginning in Nissan and ending in "Adar", "Adar II", "Adar I". + * @see #setTransliteratedMonthList(String[]) */ public String[] getTransliteratedMonthList() { return transliteratedMonths; @@ -618,13 +621,13 @@ public String[] getTransliteratedMonthList() { /** * Setter method to allow overriding of the default list of months transliterated into Latin chars. The default list uses - * Ashkenazi American English transliteration. The array of transliterated month names begins in "Nissan" and ends in the - * 3 Adar variations - "Adar", "Adar II", "Adar I". + * Ashkenazi American English transliteration. The array of 14 transliterated month names begin in "Nissan" and end in the + * 3 Adar variations - "Adar", "Adar II", "Adar I". The default list is + * ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves", "Shevat", "Adar", + * "Adar II", "Adar I"]. * - * @param transliteratedMonths - * an array of 14 month names that defaults to ["Nissan", "Iyar", "Sivan", "Tamuz", "Av", "Elul", "Tishrei", - * "Heshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II", "Adar I"]. - * @see getTransliteratedMonthList() + * @param transliteratedMonths the array of 14 month names beginning in Nissan and ending in "Adar", "Adar II", "Adar I". + * @see #getTransliteratedMonthList() */ public void setTransliteratedMonthList(String[] transliteratedMonths) { if(transliteratedHolidays.length !=14) { @@ -634,12 +637,12 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { } /** - * Unicode list of Hebrew months in the following format ‏["\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", - * "\u05E1\u05D9\u05D5\u05DF", "\u05EA\u05DE\u05D5\u05D6", "\u05D0\u05D1", "\u05D0\u05DC\u05D5\u05DC", - * "\u05EA\u05E9\u05E8\u05D9", "\u05D7\u05E9\u05D5\u05DF", "\u05DB\u05E1\u05DC\u05D5", "\u05D8\u05D1\u05EA", - * "\u05E9\u05D1\u05D8", "\u05D0\u05D3\u05E8", "\u05D0\u05D3\u05E8 \u05D1", "\u05D0\u05D3\u05E8 \u05D0"] + * List of Hebrew months. The list has* a length of 14 starting with "ניסן" and ending with the + * 3 variations of Adar - "אדר", "אדר ב", "אדר א". * - * @see formatMonth(JewishDate) + * @see #getHebrewMonthList() + * @see #setHebrewMonthList(String[]) + * @see #formatMonth(JewishDate) */ private String[] hebrewMonths = { "\u05E0\u05D9\u05E1\u05DF", "\u05D0\u05D9\u05D9\u05E8", "\u05E1\u05D9\u05D5\u05DF", "\u05EA\u05DE\u05D5\u05D6", "\u05D0\u05D1", "\u05D0\u05DC\u05D5\u05DC", @@ -657,14 +660,14 @@ public void setTransliteratedMonthList(String[] transliteratedMonths) { "\u05E9\u05E9\u05D9", "\u05E9\u05D1\u05EA" }; /** - * Formats the day of week. If {@link isHebrewFormat() Hebrew formatting} is set, it will display in the format + * Formats the day of week. If {@link #isHebrewFormat() Hebrew formatting} is set, it will display in the format * ראשון etc. If Hebrew formatting is not in use it will return it in the format * of Sunday etc. There are various formatting options that will affect the output. * * @param jewishDate the JewishDate Object * @return the formatted day of week - * @see isHebrewFormat() - * @see isLongWeekFormat() + * @see #isHebrewFormat() + * @see #isLongWeekFormat() */ public String formatDayOfWeek(JewishDate jewishDate) { if (hebrewFormat) { @@ -794,10 +797,10 @@ public String format(JewishDate jewishDate) { * @param jewishDate * the JewishDate to format * @return the formatted month name - * @see isHebrewFormat() - * @see setHebrewFormat(boolean) - * @see getTransliteratedMonthList() - * @see setTransliteratedMonthList(String[]) + * @see #isHebrewFormat() + * @see #setHebrewFormat(boolean) + * @see #getTransliteratedMonthList() + * @see #setTransliteratedMonthList(String[]) */ public String formatMonth(JewishDate jewishDate) { final int month = jewishDate.getJewishMonth(); @@ -827,11 +830,11 @@ public String formatMonth(JewishDate jewishDate) { * * @return a String of the Omer day in the form or an empty string if there is no Omer this day. The default * formatting has a ב׳ prefix that would output בעומר, but this - * can be set via the {@link setHebrewOmerPrefix(String)} method to use a ל and output + * can be set via the {@link #setHebrewOmerPrefix(String)} method to use a ל and output * ל״ג לעומר. - * @see isHebrewFormat() - * @see getHebrewOmerPrefix() - * @see setHebrewOmerPrefix(String) + * @see #isHebrewFormat() + * @see #getHebrewOmerPrefix() + * @see #setHebrewOmerPrefix(String) */ public String formatOmer(JewishCalendar jewishCalendar) { int omer = jewishCalendar.getDayOfOmer(); @@ -881,7 +884,7 @@ public String getFormattedKviah(int jewishYear) { /** * Formats the Daf Yomi Bavli in the format of - * "עירובין נ״ב" in {@link isHebrewFormat() Hebrew}, + * "עירובין נ״ב" in {@link #isHebrewFormat() Hebrew}, * or the transliterated format of "Eruvin 52". * @param daf the Daf to be formatted. * @return the formatted daf. @@ -896,7 +899,7 @@ public String formatDafYomiBavli(Daf daf) { /** * Formats the Daf Yomi Yerushalmi in the format - * of "עירובין נ״ב" in {@link isHebrewFormat() Hebrew}, or + * of "עירובין נ״ב" in {@link #isHebrewFormat() Hebrew}, or * the transliterated format of "Eruvin 52". * * @param daf the Daf to be formatted. @@ -935,9 +938,9 @@ public String formatDafYomiYerushalmi(Daf daf) { * @param number * the number to be formatted. It will trow an IllegalArgumentException if the number is < 0 or > 9999. * @return the Hebrew formatted number such as תשכ״ט - * @see isUseFinalFormLetters() - * @see isUseGershGershayim() - * @see isHebrewFormat() + * @see #isUseFinalFormLetters() + * @see #isUseGershGershayim() + * @see #isHebrewFormat() * */ public String formatHebrewNumber(int number) { @@ -1021,9 +1024,20 @@ public String formatHebrewNumber(int number) { } /** - * Returns the map of transliterated parshiyos used by this formatter. + * Returns the map of transliterated parshiyos used by this formatter. This list using the default Ashkenazi + * pronunciation. This list can be overridden (for Sephardi English transliteration for example) by setting the + * {@link #setTransliteratedParshiosList(EnumMap)}. The list includes double and special parshiyos in the following + * order and spelling "Bereshis, Noach, Lech Lecha, Vayera, Chayei Sara, Toldos, Vayetzei, Vayishlach, Vayeshev, Miketz, + * Vayigash, Vayechi, Shemos, Vaera, Bo, Beshalach, Yisro, Mishpatim, Terumah, Tetzaveh, Ki Sisa, Vayakhel, Pekudei, Vayikra, + * Tzav, Shmini, Tazria, Metzora, Achrei Mos, Kedoshim, Emor, Behar, Bechukosai, Bamidbar, Nasso, Beha'aloscha, Sh'lach, + * Korach, Chukas, Balak, Pinchas, Matos, Masei, Devarim, Vaeschanan, Eikev, Re'eh, Shoftim, Ki Seitzei, Ki Savo, Nitzavim, + * Vayeilech, Ha'Azinu, Vezos Habracha, Vayakhel Pekudei, Tazria Metzora, Achrei Mos Kedoshim, Behar Bechukosai, Chukas Balak, + * Matos Masei, Nitzavim Vayeilech, Shekalim, Zachor, Parah, Hachodesh,Shuva, Shira, Hagadol, Chazon, Nachamu". * * @return the map of transliterated Parshios + * @see #setTransliteratedParshiosList(EnumMap) + * @see #formatParsha(JewishCalendar) + * @see #formatParsha(JewishCalendar.Parsha) */ public EnumMap getTransliteratedParshiosList() { return transliteratedParshaMap; @@ -1035,7 +1049,7 @@ public EnumMap getTransliteratedParshiosList() { * * @param transliteratedParshaMap * the transliterated Parshios as an EnumMap to set - * @see getTransliteratedParshiosList() + * @see #getTransliteratedParshiosList() for information on the format. */ public void setTransliteratedParshiosList(EnumMap transliteratedParshaMap) { this.transliteratedParshaMap = transliteratedParshaMap; @@ -1045,7 +1059,7 @@ public void setTransliteratedParshiosList(EnumMap * Returns a String with the name of the current parsha(ios). This method gets the current parsha by * calling {@link JewishCalendar#getParshah()} that does not return a parsha for any non-Shabbos * or a Shabbos that occurs on a Yom Tov, and will return an empty String in those - * cases. If the class {@link isHebrewFormat() is set to format in Hebrew} it will return a String + * cases. If the class {@link #isHebrewFormat() is set to format in Hebrew} it will return a String * of the current parsha(ios) in Hebrew for example בראשית or * נצבים וילך or an empty string if there * are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin chars. The @@ -1059,8 +1073,8 @@ public void setTransliteratedParshiosList(EnumMap * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example * Bereshis or Nitzavim Vayeilech or an empty string if there are none. - * @see formatParsha(JewishCalendar) - * @see isHebrewFormat() + * @see #formatParsha(JewishCalendar) + * @see #isHebrewFormat() * @see JewishCalendar#getParshah() */ public String formatParsha(JewishCalendar jewishCalendar) { @@ -1069,9 +1083,9 @@ public String formatParsha(JewishCalendar jewishCalendar) { } /** - * Returns a String with the name of the current parsha(ios). This method overloads {@link - * HebrewDateFormatter#formatParsha(JewishCalendar)} and unlike that method, it will format the parsha passed - * to this method regardless of the day of week. This is the way to format a parsha retrieved from calling + * Returns a String with the name of the current parsha(ios). This method overloads {@link #formatParsha(JewishCalendar)} and + * unlike that method, it will format the parsha passed to this method regardless of the day of week. This is the way + * to format a parsha retrieved from calling * {@link JewishCalendar#getUpcomingParshah()}. * * @param parsha a JewishCalendar.Parsha object @@ -1081,7 +1095,7 @@ public String formatParsha(JewishCalendar jewishCalendar) { * there are none. If not set to Hebrew, it returns a string of the parsha(ios) transliterated into Latin * chars. The default uses Ashkenazi pronunciation in typical American English spelling, for example * Bereshis or Nitzavim Vayeilech or an empty string if there are none. - * @see formatParsha(JewishCalendar) + * @see #formatParsha(JewishCalendar) * @see JewishCalendar#getUpcomingParshah() */ public String formatParsha(JewishCalendar.Parsha parsha) { From 4d11aa2103f6f3bfa3e2c23719caf5b7d4f8954f Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 16:28:12 -0400 Subject: [PATCH 111/121] Add back Renamed getMinchaGedolaGRAGreaterThan30() - Add # back to JavaDoc method names (best practice and better IDE support) --- .../zmanim/ComprehensiveZmanimCalendar.java | 1569 +++++++++-------- 1 file changed, 801 insertions(+), 768 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 0b7722d4..c64e5f8b 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -30,7 +30,7 @@ * 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 * {@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 getSunset() sunrise} and {@link getSunset() + * time based on degrees or time before or after {@link #getSunset() sunrise} and {@link #getSunset() * sunset} and are of interest for calculation beyond zmanim calculations. Here are some examples. *

    First create the Calendar for the location you would like to calculate: * @@ -75,7 +75,7 @@ * A number of this calendar's zmanim are calculated based on a day starting at alos of 12° before * sunrise and ending at tzais of 7.083° after sunset. Be aware that since the alos and tzais * do not use identical degree-based offsets, this leads to chatzos being at a time other than the - * {@link getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note + * {@link #getSunTransit() solar transit} (solar midday). To calculate this zman, use the following steps. Note * that plag hamincha is 10.75 hours after the start of the day, and the following steps are all that it takes. *
    *

    @@ -110,19 +110,19 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     
     	/**
     	 * The zenith of 3.7° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim3Point7Degrees()
    +	 * @see #getTzaisGeonim3Point7Degrees()
     	 */
     	protected static final double ZENITH_3_POINT_7 = GEOMETRIC_ZENITH + 3.7;
     
     	/**
     	 * The zenith of 3.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim3Point8Degrees()
    +	 * @see #getTzaisGeonim3Point8Degrees()
     	 */
     	protected static final double ZENITH_3_POINT_8 = GEOMETRIC_ZENITH + 3.8;
     
     	/**
     	 * The zenith of 5.95° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim5Point95Degrees()
    +	 * @see #getTzaisGeonim5Point95Degrees()
     	 */
     	protected static final double ZENITH_5_POINT_95 = GEOMETRIC_ZENITH + 5.95;
     
    @@ -130,123 +130,123 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     	 * The zenith of 7.083° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is often referred to as
     	 * 7°5' (7° and 5 minutes).
     	 * 
    -	 * @see getTzaisGeonim7Point083Degrees()
    -	 * @see getBainHashmashosRT13Point5MinutesBefore7Point083Degrees()
    +	 * @see #getTzaisGeonim7Point083Degrees()
    +	 * @see #getBainHashmashosRT13Point5MinutesBefore7Point083Degrees()
     	 */
     	protected static final double ZENITH_7_POINT_083 = GEOMETRIC_ZENITH + 7 + (5.0 / 60);
     
     	/**
     	 * The zenith of 10.2° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir10Point2Degrees()
    +	 * @see #getMisheyakir10Point2Degrees()
     	 */
     	protected static final double ZENITH_10_POINT_2 = GEOMETRIC_ZENITH + 10.2;
     
     	/**
     	 * The zenith of 11° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir11Degrees()
    +	 * @see #getMisheyakir11Degrees()
     	 */
     	protected static final double ZENITH_11_DEGREES = GEOMETRIC_ZENITH + 11;
     
     	/**
     	 * The zenith of 11.5° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir11Point5Degrees()
    +	 * @see #getMisheyakir11Point5Degrees()
     	 */
     	protected static final double ZENITH_11_POINT_5 = GEOMETRIC_ZENITH + 11.5;
     	
     	/**
     	 * The zenith of 12.85° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir12Point85Degrees()
    +	 * @see #getMisheyakir12Point85Degrees()
     	 */
     	protected static final double ZENITH_12_POINT_85 = GEOMETRIC_ZENITH + 12.85;
     
     	/**
     	 * The zenith of 13.24° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getBainHashmashosRT13Point24Degrees
    +	 * @see #getBainHashmashosRT13Point24Degrees
     	 */
     	protected static final double ZENITH_13_POINT_24 = GEOMETRIC_ZENITH + 13.24;
     	
     	/**
     	 * The zenith of 19° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getAlos19Degrees()
    +	 * @see #getAlos19Degrees()
     	 * @see ZENITH_19_POINT_8
     	 */
     	protected static final double ZENITH_19_DEGREES = GEOMETRIC_ZENITH + 19;
     
     	/**
     	 * The zenith of 19.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzais19Point8Degrees()
    -	 * @see getAlos19Point8Degrees()
    +	 * @see #getTzais19Point8Degrees()
    +	 * @see #getAlos19Point8Degrees()
     	 * @see ZENITH_19_DEGREES
     	 */
     	protected static final double ZENITH_19_POINT_8 = GEOMETRIC_ZENITH + 19.8;
     
     	/**
     	 * The zenith of 26° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getAlos26Degrees()
    -	 * @see getTzais26Degrees()
    -	 * @see getAlos120Minutes()
    -	 * @see getTzais120Minutes()
    +	 * @see #getAlos26Degrees()
    +	 * @see #getTzais26Degrees()
    +	 * @see #getAlos120Minutes()
    +	 * @see #getTzais120Minutes()
     	 */
     	protected static final double ZENITH_26_DEGREES = GEOMETRIC_ZENITH + 26.0;
     
     	/**
     	 * The zenith of 4.42° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim4Point42Degrees()
    +	 * @see #getTzaisGeonim4Point42Degrees()
     	 */
     	protected static final double ZENITH_4_POINT_42 = GEOMETRIC_ZENITH + 4.42;
     
     	/**
     	 * The zenith of 4.66° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim4Point66Degrees()
    +	 * @see #getTzaisGeonim4Point66Degrees()
     	 */
     	protected static final double ZENITH_4_POINT_66 = GEOMETRIC_ZENITH + 4.66;
     
     	/**
     	 * The zenith of 4.8° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim4Point8Degrees()
    +	 * @see #getTzaisGeonim4Point8Degrees()
     	 */
     	protected static final double ZENITH_4_POINT_8 = GEOMETRIC_ZENITH + 4.8;
     
     	/**
     	 * The zenith of 16.9° below geometric zenith (90°).
     	 *
    -	 * @see getAlosBaalHatanya()
    +	 * @see #getAlosBaalHatanya()
     	 */
     	protected static final double ZENITH_16_POINT_9 = GEOMETRIC_ZENITH + 16.9;
     
     	/**
     	 * The zenith of 6° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisBaalHatanya()
    +	 * @see #getTzaisBaalHatanya()
     	 */
     	protected static final double ZENITH_6_DEGREES = GEOMETRIC_ZENITH + 6;
     
     	/**
     	 * The zenith of 6.45° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim6Point45Degrees()
    +	 * @see #getTzaisGeonim6Point45Degrees()
     	 */
     	protected static final double ZENITH_6_POINT_45 = GEOMETRIC_ZENITH + 6.45;
     	
     	/**
     	 * The zenith of 7.65° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir7Point65Degrees()
    +	 * @see #getMisheyakir7Point65Degrees()
     	 */
     	protected static final double ZENITH_7_POINT_65 = GEOMETRIC_ZENITH + 7.65;
     	
     	/**
     	 * The zenith of 7.67° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim7Point67Degrees()
    +	 * @see #getTzaisGeonim7Point67Degrees()
     	 */
     	protected static final double ZENITH_7_POINT_67 = GEOMETRIC_ZENITH + 7.67;
     	
     	/**
     	 * The zenith of 9.3° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getTzaisGeonim9Point3Degrees()
    +	 * @see #getTzaisGeonim9Point3Degrees()
     	 */
     	protected static final double ZENITH_9_POINT_3 = GEOMETRIC_ZENITH + 9.3;
     	
     	/**
     	 * The zenith of 9.5° below {@link GEOMETRIC_ZENITH geometric zenith} (90°).
    -	 * @see getMisheyakir9Point5Degrees()
    +	 * @see #getMisheyakir9Point5Degrees()
     	 */
     	protected static final double ZENITH_9_POINT_5 = GEOMETRIC_ZENITH + 9.5;
     	
    @@ -254,7 +254,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     	 * The zenith of 9.75° below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for
     	 * calculating alos (dawn) and tzais (nightfall) according to some opinions.
     	 * 
    -	 * @see getTzaisGeonim9Point75Degrees()
    +	 * @see #getTzaisGeonim9Point75Degrees()
     	 */
     	protected static final double ZENITH_9_POINT_75 = GEOMETRIC_ZENITH + 9.75;
     	
    @@ -264,7 +264,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     	 * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
     	 * and from the center of the sun. It would be 0.833° less without this.
     	 * 
    -	 * @see getBainHashmashosYereim2Point1Degrees()
    +	 * @see #getBainHashmashosYereim2Point1Degrees()
     	 */
     	protected static final double ZENITH_MINUS_2_POINT_1 = GEOMETRIC_ZENITH - 2.1;
     	
    @@ -274,7 +274,7 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     	 * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
     	 * and from the center of the sun. It would be 0.833° less without this.
     	 * 
    -	 * @see getBainHashmashosYereim2Point8Degrees()
    +	 * @see #getBainHashmashosYereim2Point8Degrees()
     	 */
     	protected static final double ZENITH_MINUS_2_POINT_8 = GEOMETRIC_ZENITH - 2.8;
     	
    @@ -284,16 +284,16 @@ public class ComprehensiveZmanimCalendar extends ZmanimCalendar {
     	 * according to the Yereim. As is traditional with degrees below the horizon, this is calculated without refraction
     	 * and from the center of the sun. It would be 0.833° less without this.
     	 * 
    -	 * @see getBainHashmashosYereim3Point05Degrees()
    +	 * @see #getBainHashmashosYereim3Point05Degrees()
     	 */
     	protected static final double ZENITH_MINUS_3_POINT_05 = GEOMETRIC_ZENITH - 3.05;
     
     	/**
     	 * The offset in minutes (defaults to 40) after sunset used for tzeit based on calculations of
     	 * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah.
    -	 * @see getTzaisAteretTorah()
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 */
     	private double ateretTorahSunsetOffset = 40;
     
    @@ -356,8 +356,8 @@ public long getShaahZmanis18Degrees() {
     	 * Method to return a shaah zmanis (temporal hour) calculated using a dip of 26°. This calculation
     	 * divides the day based on the opinion of the Magen
     	 * Avraham (MGA) that the day runs from dawn to dusk. Dawn for this calculation is when the sun is
    -	 * {@link getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when
    -	 * the sun is {@link getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is
    +	 * {@link #getAlos26Degrees() 26°} below the eastern geometric horizon before sunrise. Dusk for this is when
    +	 * the sun is {@link #getTzais26Degrees() 26°} below the western geometric horizon after sunset. This day is
     	 * split into 12 equal parts with each part being a shaah zmanis. Since zmanim that use this
     	 * method are extremely late or early and at a point when the sky is a long time past the 18° point where the
     	 * darkest point is reached, zmanim that use this should only be used lechumra, such as
    @@ -367,7 +367,7 @@ public long getShaahZmanis18Degrees() {
     	 *         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 {@link Long#MIN_VALUE}
     	 *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis120Minutes()
    +	 * @see #getShaahZmanis120Minutes()
     	 */
     	public long getShaahZmanis26Degrees() {
     		return getTemporalHour(getAlos26Degrees(), getTzais26Degrees());
    @@ -385,13 +385,13 @@ public long getShaahZmanis26Degrees() {
     	 *         where the sun may not reach low enough below the horizon for this calculation, a {@link Long#MIN_VALUE}
     	 *         will be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getTzais16Point1Degrees()
    -	 * @see getSofZmanShmaMGA16Point1Degrees()
    -	 * @see getSofZmanTfilaMGA16Point1Degrees()
    -	 * @see getMinchaGedola16Point1Degrees()
    -	 * @see getMinchaKetana16Point1Degrees()
    -	 * @see getPlagHamincha16Point1Degrees()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getTzais16Point1Degrees()
    +	 * @see #getSofZmanShmaMGA16Point1Degrees()
    +	 * @see #getSofZmanTfilaMGA16Point1Degrees()
    +	 * @see #getMinchaGedola16Point1Degrees()
    +	 * @see #getMinchaKetana16Point1Degrees()
    +	 * @see #getPlagHamincha16Point1Degrees()
     	 */
     
     	public long getShaahZmanis16Point1Degrees() {
    @@ -411,9 +411,9 @@ public long getShaahZmanis16Point1Degrees() {
     	 *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getAlos60Minutes()
    -	 * @see getTzais60Minutes()
    -	 * @see getPlagHamincha60Minutes()
    +	 * @see #getAlos60Minutes()
    +	 * @see #getTzais60Minutes()
    +	 * @see #getPlagHamincha60Minutes()
     	 */
     	public long getShaahZmanis60Minutes() {
     		return getTemporalHour(getAlos60Minutes(), getTzais60Minutes());
    @@ -422,18 +422,18 @@ public long getShaahZmanis60Minutes() {
     	/**
     	 * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being
    -	 * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This calculation
    +	 * {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunset() sunrise}. This calculation
     	 * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation
     	 * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day
     	 * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day
    -	 * from {@link getSunset() sunrise} to {@link getSunset() sunset}.
    +	 * from {@link #getSunset() sunrise} to {@link #getSunset() sunset}.
     	 * 
     	 * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzais72Zmanis()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzais72Zmanis()
     	 */
     	public long getShaahZmanis72MinutesZmanis() {
     		return getTemporalHour(getAlos72Zmanis(), getTzais72Zmanis());
    @@ -457,18 +457,18 @@ public long getShaahZmanis90Minutes() {
     	/**
     	 * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
    +	 * #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunset() sunrise}. This calculation divides
     	 * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes
     	 * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal
    -	 * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunset() sunrise}
    -	 * to {@link getSunset() sunset}.
    +	 * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link #getSunset() sunrise}
    +	 * to {@link #getSunset() sunset}.
     	 * 
     	 * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos90Zmanis()
    -	 * @see getTzais90Zmanis()
    +	 * @see #getAlos90Zmanis()
    +	 * @see #getTzais90Zmanis()
     	 */
     	public long getShaahZmanis90MinutesZmanis() {
     		return getTemporalHour(getAlos90Zmanis(), getTzais90Zmanis());
    @@ -477,18 +477,18 @@ public long getShaahZmanis90MinutesZmanis() {
     	/**
     	 * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
    +	 * #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunset() sunrise}. This calculation divides
     	 * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes
     	 * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 equal
     	 * parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from {@link
    -	 * getSunset() sunrise} to {@link getSunset() sunset}.
    +	 * #getSunset() sunrise} to {@link #getSunset() sunset}.
     	 * 
     	 * @return the long millisecond length of a shaah zmanis. 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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos96Zmanis()
    -	 * @see getTzais96Zmanis()
    +	 * @see #getAlos96Zmanis()
    +	 * @see #getTzais96Zmanis()
     	 */
     	public long getShaahZmanis96MinutesZmanis() {
     		return getTemporalHour(getAlos96Zmanis(), getTzais96Zmanis());
    @@ -497,21 +497,21 @@ public long getShaahZmanis96MinutesZmanis() {
     	/**
     	 * Method to return a shaah zmanis (temporal hour) according to the opinion of the
     	 * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th
    -	 * of sunrise to sunset day, or {@link getAlos72Zmanis() 72} minutes zmaniyos of such a day before
    -	 * {@link getSunset() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40
    -	 * minutes} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}) after {@link getSunset()
    +	 * of sunrise to sunset day, or {@link #getAlos72Zmanis() 72} minutes zmaniyos of such a day before
    +	 * {@link #getSunset() 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 (midday) 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
     	 *         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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 */
     	public long getShaahZmanisAteretTorah() {
     		return getTemporalHour(getAlos72Zmanis(), getTzaisAteretTorah());
    @@ -521,10 +521,10 @@ public long getShaahZmanisAteretTorah() {
     	 * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
     	 * Rabbi Yaakov Moshe Hillel as published in the
     	 * 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
    +	 * 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 (midday) will not be the point
    -	 * that the sun is {@link getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
    +	 * 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.
    @@ -534,8 +534,8 @@ public long getShaahZmanisAteretTorah() {
     	 *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getMinchaKetanaAhavatShalom()
    -	 * @see getPlagAhavatShalom()
    +	 * @see #getMinchaKetanaAhavatShalom()
    +	 * @see #getPlagAhavatShalom()
     	 */
     	public long getShaahZmanisAlos16Point1ToTzais3Point8() {
     		return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point8Degrees());
    @@ -545,10 +545,10 @@ public long getShaahZmanisAlos16Point1ToTzais3Point8() {
     	 * Method to return a shaah zmanis (temporal hour) used by some zmanim according to the opinion of
     	 * Rabbi Yaakov Moshe Hillel as published in the
     	 * 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
    +	 * 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 (midday) will not be the point
    -	 * that the sun is {@link getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
    +	 * that the sun is {@link #getSunTransit() halfway across the sky}. These shaos zmaniyos are used for Mincha
     	 * Gedola calculation.
     	 * 
     	 * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed
    @@ -556,7 +556,7 @@ public long getShaahZmanisAlos16Point1ToTzais3Point8() {
     	 *         where it does not set, a {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getMinchaGedolaAhavatShalom()
    +	 * @see #getMinchaGedolaAhavatShalom()
     	 */
     	public long getShaahZmanisAlos16Point1ToTzais3Point7() {
     		return getTemporalHour(getAlos16Point1Degrees(), getTzaisGeonim3Point7Degrees());
    @@ -591,7 +591,7 @@ public long getShaahZmanis96Minutes() {
     	 *         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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis26Degrees()
    +	 * @see #getShaahZmanis26Degrees()
     	 */
     	public long getShaahZmanis120Minutes() {
     		return getTemporalHour(getAlos120Minutes(), getTzais120Minutes());
    @@ -600,11 +600,11 @@ public long getShaahZmanis120Minutes() {
     	/**
     	 * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunset() sunrise}. This calculation divides
    +	 * #getAlos120Zmanis() 120} minutes zmaniyos before {@link #getSunset() sunrise}. This calculation divides
     	 * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes
     	 * zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is split into 12 equal
     	 * parts with each part being a shaah zmanis. This is identical to 1/6th of the day from {@link
    -	 * getSunset() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are
    +	 * #getSunset() sunrise} to {@link #getSunset() sunset}. Since zmanim that use this method are
     	 * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached,
     	 * zmanim that use this should only be used lechumra such as delaying the start of nighttime mitzvos.
     	 * 
    @@ -612,8 +612,8 @@ public long getShaahZmanis120Minutes() {
     	 *         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 {@link Long#MIN_VALUE} will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos120Zmanis()
    -	 * @see getTzais120Zmanis()
    +	 * @see #getAlos120Zmanis()
    +	 * @see #getTzais120Zmanis()
     	 */
     	public long getShaahZmanis120MinutesZmanis() {
     		return getTemporalHour(getAlos120Zmanis(), getTzais120Zmanis());
    @@ -622,8 +622,8 @@ public long getShaahZmanis120MinutesZmanis() {
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on sunrise
     	 * being 120 minutes zmaniyos or 1/6th of the day before sunrise. This is calculated as 10.75 hours after
    -	 * {@link getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link getShaahZmanis120MinutesZmanis()} after
    -	 * {@link getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very
    +	 * {@link #getAlos120Zmanis() dawn}. The formula used is 10.75 * {@link #getShaahZmanis120MinutesZmanis()} after
    +	 * {@link #getAlos120Zmanis() dawn}. Since the zman based on an extremely early alos and a very
     	 * late tzais, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -636,11 +636,11 @@ public long getShaahZmanis120MinutesZmanis() {
     	 *         does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanis120MinutesZmanis()
    -	 * @see getAlos120Minutes()
    -	 * @see getTzais120Minutes()
    -	 * @see getPlagHamincha26Degrees()
    -	 * @see getPlagHamincha120Minutes()
    +	 * @see #getShaahZmanis120MinutesZmanis()
    +	 * @see #getAlos120Minutes()
    +	 * @see #getTzais120Minutes()
    +	 * @see #getPlagHamincha26Degrees()
    +	 * @see #getPlagHamincha120Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha120MinutesZmanis() {
    @@ -650,8 +650,8 @@ public Instant getPlagHamincha120MinutesZmanis() {
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha according to the
     	 * Magen Avraham with the day starting 120 minutes before sunrise and ending 120 minutes after sunset. This is
    -	 * calculated as 10.75 hours after {@link getAlos120Minutes() dawn 120 minutes}. The formula used is 10.75 {@link
    -	 * getShaahZmanis120Minutes()} after {@link getAlos120Minutes()}. Since the zman based on an extremely early
    +	 * calculated as 10.75 hours after {@link #getAlos120Minutes() dawn 120 minutes}. The formula used is 10.75 {@link
    +	 * #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes()}. Since the zman based on an extremely early
     	 * alos and a very late tzais, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -664,8 +664,8 @@ public Instant getPlagHamincha120MinutesZmanis() {
     	 *         does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanis120Minutes()
    -	 * @see getPlagHamincha26Degrees()
    +	 * @see #getShaahZmanis120Minutes()
    +	 * @see #getPlagHamincha26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha120Minutes() {
    @@ -673,8 +673,8 @@ public Instant getPlagHamincha120Minutes() {
     	}
     
     	/**
    -	 * Method to return alos (dawn) calculated as 60 minutes before {@link getSunset() sunrise} or
    -	 * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is the
    +	 * Method to return alos (dawn) calculated as 60 minutes before {@link #getSunset() sunrise} or
    +	 * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is the
     	 * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the Chavas Yair in the Mekor Chaim, Orach Chaim Ch. 90, though  the Mekor Chaim in Ch. 58 and in the Rishonim who stated that the time
     	 * of the neshef (time between dawn and sunrise) does not vary by the time of year or location but purely depends on
    -	 * the time it takes to walk the distance of 4* mil. {@link getTzaisGeonim9Point75Degrees()} is a related zman that
    +	 * the time it takes to walk the distance of 4* mil. {@link #getTzaisGeonim9Point75Degrees()} is a related zman that
     	 * is a degree-based calculation based on 60 minutes.
     	 * 
     	 * @return the Instant representing the time. If the calculation can't be computed such as in the Arctic
    @@ -697,9 +697,9 @@ public Instant getPlagHamincha120Minutes() {
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}.
     	 *         documentation.
     	 *
    -	 * @see getTzais60Minutes()
    -	 * @see getPlagHamincha60Minutes()
    -	 * @see getShaahZmanis60Minutes()
    +	 * @see #getTzais60Minutes()
    +	 * @see #getPlagHamincha60Minutes()
    +	 * @see #getShaahZmanis60Minutes()
     	 */
     	public Instant getAlos60Minutes() {
     		return getTimeOffset(getSunriseBasedOnElevationSetting(), -60 * MINUTE_MILLIS);
    @@ -709,10 +709,10 @@ public Instant getAlos60Minutes() {
     	 * Method to return 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 day being from {@link getSeaLevelSunrise() sea
    -	 * level sunrise} to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
    -	 * getSunset() sunset} (depending on the {@link isUseElevation()} setting). The actual calculation is {@link
    -	 * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars
    +	 * 72 minutes which is 1/10th 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 #getSunset() sunrise} to {@link
    +	 * #getSunset() sunset} (depending on the {@link #isUseElevation()} setting). The actual calculation is {@link
    +	 * #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars
     	 * published by the Hisachdus Harabanim D'Artzos Habris
     	 * Ve'Canada.
     	 * 
    @@ -720,15 +720,15 @@ public Instant getAlos60Minutes() {
     	 *         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 {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getShaahZmanisGRA()
    +	 * @see #getShaahZmanisGRA()
     	 */
     	public Instant getAlos72Zmanis() {
     		return getZmanisBasedOffset(-1.2);
     	}
     
     	/**
    -	 * Method to return alos (dawn) calculated using 96 minutes before {@link getSunset() sunrise} or
    -	 * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) that is based
    +	 * Method to return alos (dawn) calculated using 96 minutes before {@link #getSunset() 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 alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before
    -	 * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
    -	 * isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 mil is 90 minutes
    -	 * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise}
    -	 * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
    -	 * getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is
    -	 * {@link getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.5).
    +	 * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise}
    +	 * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunset() sunrise} to {@link
    +	 * #getSunset() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is
    +	 * {@link #getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.5).
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getShaahZmanisGRA()
    +	 * @see #getShaahZmanisGRA()
     	 */
     	public Instant getAlos90Zmanis() {
     		return getZmanisBasedOffset(-1.5);
    @@ -767,27 +767,27 @@ public Instant getAlos90Zmanis() {
     
     	/**
     	 * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before
    -	 * {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link
    -	 * isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 minutes
    -	 * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link getSeaLevelSunrise() sea level sunrise}
    -	 * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunset() sunrise} to {@link
    -	 *  getSunset() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is {@link
    -	 *  getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.6).
    +	 * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link #getSeaLevelSunrise() sea level sunrise}
    +	 * to {@link #getSeaLevelSunset() sea level sunset} or {@link #getSunset() sunrise} to {@link
    +	 *  getSunset() sunset} (depending on the {@link #isUseElevation()}. The actual calculation used is {@link
    +	 *  getSunriseBasedOnElevationSetting()} - ({@link #getShaahZmanisGRA()} * 1.6).
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getShaahZmanisGRA()
    +	 * @see #getShaahZmanisGRA()
     	 */
     	public Instant getAlos96Zmanis() {
     		return getZmanisBasedOffset(-1.6);
     	}
     
     	/**
    -	 * Method to return alos (dawn) calculated using 90 minutes before {@link getSunset() sunrise} or
    -	 * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) based on the time
    +	 * Method to return alos (dawn) calculated using 90 minutes before {@link #getSunset() sunrise} or
    +	 * {@link #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting) based on the time
     	 * to walk the distance of 4 mil at
     	 * 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the Rishonim who stated that the time of the Neshef (time between
    @@ -805,8 +805,8 @@ public Instant getAlos90Minutes() {
     
     	/**
     	 * This method should be used lechumra only and returns alos (dawn) calculated using 120 minutes
    -	 * before {@link getSunset() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the
    -	 * {@link isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a
     	 * mil. Time based offset calculations for alos are based on the* opinion of the Rishonim who stated that the time of the neshef (time
    @@ -825,8 +825,8 @@ public Instant getAlos90Minutes() {
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
     	 * 
    -	 * @see getTzais120Minutes()
    -	 * @see getAlos26Degrees()
    +	 * @see #getTzais120Minutes()
    +	 * @see #getAlos26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getAlos120Minutes() {
    @@ -835,13 +835,13 @@ public Instant getAlos120Minutes() {
     
     	/**
     	 * This method should be used lechumra only and  method returns alos (dawn) calculated using
    -	 * 120 minutes zmaniyos or 1/6th of the day before {@link getSunset() sunrise} or {@link
    -	 * getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is based
    +	 * 120 minutes zmaniyos or 1/6th of the day before {@link #getSunset() sunrise} or {@link
    +	 * #getSeaLevelSunrise() sea level sunrise} (depending on the {@link #isUseElevation()} setting). This is based
     	 * on a 24-minute 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 getSeaLevelSunset() sea level sunset} or {@link
    -	 * getSunset() sunrise} to {@link getSunset() sunset} (depending on the {@link
    -	 * isUseElevation()}. The actual calculation used is {@link getSunset()} - ({@link getShaahZmanisGRA()}
    +	 * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getSeaLevelSunset() sea level sunset} or {@link
    +	 * #getSunset() sunrise} to {@link #getSunset() sunset} (depending on the {@link
    +	 * #isUseElevation()}. The actual calculation used is {@link #getSunset()} - ({@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 performed during the day.
     	 * 
    @@ -854,8 +854,8 @@ public Instant getAlos120Minutes() {
     	 *         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 {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos120Minutes()
    -	 * @see getAlos26Degrees()
    +	 * @see #getAlos120Minutes()
    +	 * @see #getAlos26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getAlos120Zmanis() {
    @@ -865,7 +865,7 @@ public Instant getAlos120Zmanis() {
     	/**
     	 * This method should be used lechumra only and returns alos (dawn) calculated when the sun is {@link
     	 * ZENITH_26_DEGREES 26°} below the eastern geometric horizon before sunrise. This calculation is based on the same
    -	 * calculation of {@link getAlos120Minutes() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes.
    +	 * calculation of {@link #getAlos120Minutes() 120 minutes} but uses a degree-based calculation instead of 120 exact minutes.
     	 * This calculation is based on the position of the sun 120 minutes before sunrise in Jerusalem around the equinox / equilux, which
     	 * calculates to 26° below {@link GEOMETRIC_ZENITH geometric zenith}. Since this time is extremely early, it should
    @@ -881,9 +881,9 @@ public Instant getAlos120Zmanis() {
     	 *         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.
    -	 * @see getAlos120Minutes()
    -	 * @see getTzais120Minutes()
    -	 * @see getTzais26Degrees()
    +	 * @see #getAlos120Minutes()
    +	 * @see #getTzais120Minutes()
    +	 * @see #getTzais26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getAlos26Degrees() {
    @@ -925,7 +925,7 @@ public Instant getAlos19Degrees() {
     	/**
     	 * Method to return alos (dawn) calculated when the sun is {@link ZENITH_19_POINT_8 19.8°} below the
     	 * eastern geometric horizon before sunrise. This calculation is based on the same calculation of
    -	 * {@link getAlos90Minutes() 90 minutes} before sunrise, but uses a degree-based calculation instead of 90 exact minutes.
    +	 * {@link #getAlos90Minutes() 90 minutes} before sunrise, but uses a degree-based calculation instead of 90 exact minutes.
     	 * This calculation is based on the position of the sun 90 minutes before sunrise in Jerusalem around the equinox / equilux, which
     	 * calculates to 19.8° below {@link GEOMETRIC_ZENITH geometric zenith}.
    @@ -934,8 +934,8 @@ public Instant getAlos19Degrees() {
     	 *         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.
    -	 * @see getAlos90Minutes()
    -	 * @see getTzais19Point8Degrees()
    +	 * @see #getAlos90Minutes()
    +	 * @see #getTzais19Point8Degrees()
     	 */
     	public Instant getAlos19Point8Degrees() {
     		return getSunriseOffsetByDegrees(ZENITH_19_POINT_8);
    @@ -944,7 +944,7 @@ public Instant getAlos19Point8Degrees() {
     	/**
     	 * This method returns misheyakir based on the position of the sun {@link ZENITH_12_POINT_85 12.85°}
     	 * below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly
    -	 * later than 57 minutes before {@link getSunset() sunrise} in Jerusalem around the equinox / equilux. This
     	 * zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES
     	 * 11.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
     	 * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes
    -	 * before {@link getSunset() sunrise} in Jerusalem around the equinox / equilux,
     	 * which calculates to 11.5° below {@link GEOMETRIC_ZENITH geometric zenith}.
     	 * @todo recalculate.
    @@ -1008,7 +1008,7 @@ public Instant getMisheyakir11Point5Degrees() {
     	 * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES
     	 * 11°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
     	 * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes
    -	 * before {@link getSunset() sunrise} in Jerusalem around the equinox / equilux,
     	 * which calculates to 11° below {@link GEOMETRIC_ZENITH geometric zenith}.
     	 * 
    @@ -1026,7 +1026,7 @@ public Instant getMisheyakir11Degrees() {
     	 * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_10_POINT_2
     	 * 10.2°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating
     	 * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes
    -	 * before {@link getSunset() sunrise} in Jerusalem around the equinox which calculates
     	 * to 10.2° below {@link GEOMETRIC_ZENITH geometric zenith}.
     	 * 
    @@ -1067,7 +1067,7 @@ public Instant getMisheyakir10Point2Degrees() {
     	 *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
     	 * @see ZENITH_7_POINT_65
    -	 * @see getMisheyakir9Point5Degrees()
    +	 * @see #getMisheyakir9Point5Degrees()
     	 */
     	public Instant getMisheyakir7Point65Degrees() {
     		return getSunriseOffsetByDegrees(ZENITH_7_POINT_65);
    @@ -1095,7 +1095,7 @@ public Instant getMisheyakir7Point65Degrees() {
     	 *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
     	 * @see ZENITH_9_POINT_5
    -	 * @see getMisheyakir7Point65Degrees()
    +	 * @see #getMisheyakir7Point65Degrees()
     	 */
     	public Instant getMisheyakir9Point5Degrees() {
     		return getSunriseOffsetByDegrees(ZENITH_9_POINT_5);
    @@ -1104,18 +1104,18 @@ public Instant getMisheyakir9Point5Degrees() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This
    -	 * time is 3 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
    -	 * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall
    +	 * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunset() sunrise}. This
    +	 * time is 3 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
    +	 * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall
     	 * with both being 19.8° below sunrise or sunset. This returns the time of 3 *
    -	 * {@link getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees() dawn}.
    +	 * {@link #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getShaahZmanis19Point8Degrees()
    -	 * @see getAlos19Point8Degrees()
    +	 * @see #getShaahZmanis19Point8Degrees()
    +	 * @see #getAlos19Point8Degrees()
     	 */
     	public Instant getSofZmanShmaMGA19Point8Degrees() {
     		return getSofZmanShma(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true);
    @@ -1124,17 +1124,17 @@ public Instant getSofZmanShmaMGA19Point8Degrees() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of
     	 * the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 3 {@link
    -	 * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based on
    +	 * #getAlos16Point1Degrees() 16.1°} before {@link #getSunset() sunrise}. This time is 3 {@link
    +	 * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn} based on
     	 * the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset.
    -	 * This returns the time of 3 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}.
    +	 * This returns the time of 3 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getAlos16Point1Degrees()
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getAlos16Point1Degrees()
     	 */
     	public Instant getSofZmanShmaMGA16Point1Degrees() {
     		return getSofZmanShma(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true);
    @@ -1143,18 +1143,18 @@ public Instant getSofZmanShmaMGA16Point1Degrees() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) based
    -	 * on alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 3
    -	 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn}
    +	 * on alos being {@link #getAlos18Degrees() 18°} before {@link #getSunset() sunrise}. This time is 3
    +	 * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
     	 * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
    -	 * below sunrise or sunset. This returns the time of 3 * {@link getShaahZmanis18Degrees()} after
    -	 * {@link getAlos18Degrees() dawn}.
    +	 * below sunrise or sunset. This returns the time of 3 * {@link #getShaahZmanis18Degrees()} after
    +	 * {@link #getAlos18Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getShaahZmanis18Degrees()
    -	 * @see getAlos18Degrees()
    +	 * @see #getShaahZmanis18Degrees()
    +	 * @see #getAlos18Degrees()
     	 */
     	public Instant getSofZmanShmaMGA18Degrees() {
     		return getSofZmanShma(getAlos18Degrees(), getTzais18Degrees(), true);
    @@ -1163,21 +1163,21 @@ public Instant getSofZmanShmaMGA18Degrees() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according
     	 * to the opinion of the Magen Avraham (MGA) based
    -	 * on alos being {@link getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before
    -	 * {@link getSunset() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos}
    -	 * (solar hours) after {@link getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated
    -	 * from a {@link getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before
    -	 * {@link getSeaLevelSunrise() sea level sunrise} to {@link getTzais72Zmanis() nightfall} of 72 minutes
    -	 * zmaniyos after {@link getSeaLevelSunset() sea level sunset}. This returns the time of 3 *
    -	 * {@link getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}.
    +	 * on alos being {@link #getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before
    +	 * {@link #getSunset() sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos}
    +	 * (solar hours) after {@link #getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated
    +	 * from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before
    +	 * {@link #getSeaLevelSunrise() sea level sunrise} to {@link #getTzais72Zmanis() nightfall} of 72 minutes
    +	 * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 3 *
    +	 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72MinutesZmanis()
    -	 * @see getAlos72Zmanis()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis72MinutesZmanis()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA72MinutesZmanis() {
     		return getSofZmanShma(getAlos72Zmanis(), getTzais72Zmanis(), true);
    @@ -1186,19 +1186,19 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according
     	 * to the opinion of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 3
    -	 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on
    -	 * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to
    -	 * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 *
    -	 * {@link getShaahZmanis90Minutes()} after {@link getAlos90Minutes() dawn}.
    +	 * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunset() sunrise}. This time is 3
    +	 * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on
    +	 * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to
    +	 * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 *
    +	 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis90Minutes()
    -	 * @see getAlos90Minutes()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis90Minutes()
    +	 * @see #getAlos90Minutes()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA90Minutes() {
     		return getSofZmanShma(getAlos90Minutes(), getTzais90Minutes(), true);
    @@ -1207,20 +1207,20 @@ public Instant getSofZmanShmaMGA90Minutes() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) based
    -	 * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset()
    -	 * sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after
    -	 * {@link getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
    -	 * getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall}
    -	 * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link getShaahZmanis90MinutesZmanis()}
    -	 * after {@link getAlos90Zmanis() dawn}.
    +	 * on alos being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunset()
    +	 * sunrise}. This time is 3 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after
    +	 * {@link #getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
    +	 * #getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
    +	 * of 90 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis90MinutesZmanis()}
    +	 * after {@link #getAlos90Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis90MinutesZmanis()
    -	 * @see getAlos90Zmanis()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis90MinutesZmanis()
    +	 * @see #getAlos90Zmanis()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA90MinutesZmanis() {
     		return getSofZmanShma(getAlos90Zmanis(), getTzais90Zmanis(), true);
    @@ -1229,19 +1229,19 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of
     	 * the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 3 {@link
    -	 * getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on the opinion
    -	 * of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link
    -	 * getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis96Minutes()}
    -	 * after {@link getAlos96Minutes() dawn}.
    +	 * #getAlos96Minutes() 96} minutes before {@link #getSunset() sunrise}. This time is 3 {@link
    +	 * #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on the opinion
    +	 * of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link
    +	 * #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link #getShaahZmanis96Minutes()}
    +	 * after {@link #getAlos96Minutes() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis96Minutes()
    -	 * @see getAlos96Minutes()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis96Minutes()
    +	 * @see #getAlos96Minutes()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA96Minutes() {
     		return getSofZmanShma(getAlos96Minutes(), getTzais96Minutes(), true);
    @@ -1250,20 +1250,20 @@ public Instant getSofZmanShmaMGA96Minutes() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) based
    -	 * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunset()
    -	 * sunrise}. This time is 3 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after
    -	 * {@link getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
    -	 * getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall}
    -	 * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link getShaahZmanis96MinutesZmanis()}
    -	 * after {@link getAlos96Zmanis() dawn}.
    +	 * on alos being {@link #getAlos90Zmanis() 96} minutes zmaniyos before {@link #getSunset()
    +	 * sunrise}. This time is 3 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after
    +	 * {@link #getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link
    +	 * #getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall}
    +	 * of 96 minutes zmaniyos after sunset. This returns the time of 3 * {@link #getShaahZmanis96MinutesZmanis()}
    +	 * after {@link #getAlos96Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis96MinutesZmanis()
    -	 * @see getAlos96Zmanis()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis96MinutesZmanis()
    +	 * @see #getAlos96Zmanis()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA96MinutesZmanis() {
     		return getSofZmanShma(getAlos96Zmanis(), getTzais96Zmanis(), true);
    @@ -1271,7 +1271,7 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() {
     
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) calculated
    -	 * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link getChatzosHayom()}.
    +	 * as 3 hours (regular clock hours and not shaos zmaniyos) before {@link #getChatzosHayom()}.
     	 * Generally known as part of the "Komarno" zmanim after Rav Yitzchak Eizik of
     	 * Komarno, a proponent of this calculation, it actually predates him a lot. It is the opinion of the 
    @@ -1290,9 +1290,9 @@ public Instant getSofZmanShmaMGA96MinutesZmanis() {
     	 *         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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getChatzosHayom()
    -	 * @see getSofZmanTfila2HoursBeforeChatzos()
    -	 * @see isUseAstronomicalChatzos()
    +	 * @see #getChatzosHayom()
    +	 * @see #getSofZmanTfila2HoursBeforeChatzos()
    +	 * @see #isUseAstronomicalChatzos()
     	 */
     	public Instant getSofZmanShma3HoursBeforeChatzos() {
     		return getTimeOffset(getChatzosHayom(), -180 * MINUTE_MILLIS);
    @@ -1301,20 +1301,20 @@ public Instant getSofZmanShma3HoursBeforeChatzos() {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) based
    -	 * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunset()
    -	 * sunrise}. This time is 3 {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link
    -	 * getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn}
    -	 * of 120 minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
    -	 * 3 {@link getShaahZmanis120Minutes()} after {@link getAlos120Minutes() dawn}. This is an extremely early zman that
    +	 * on alos being {@link #getAlos120Minutes() 120} minutes or 1/6th of the day before {@link #getSunset()
    +	 * sunrise}. This time is 3 {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link
    +	 * #getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn}
    +	 * of 120 minutes before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
    +	 * 3 {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman that
     	 * is very much a chumra.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis120Minutes()
    -	 * @see getAlos120Minutes()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis120Minutes()
    +	 * @see #getAlos120Minutes()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanShmaMGA120Minutes() {
     		return getSofZmanShma(getAlos120Minutes(), getTzais120Minutes(), true);
    @@ -1322,25 +1322,25 @@ public Instant getSofZmanShmaMGA120Minutes() {
     
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
    -	 * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link
    -	 * getSeaLevelSunset() sea level sunset}. This is the opinion of the alos 16.1°} and ends at {@link
    +	 * #getSeaLevelSunset() sea level sunset}. This is the opinion of the \u05D7\u05D9\u05D3\u05D5\u05E9\u05D9
     	 * \u05D5\u05DB\u05DC\u05DC\u05D5\u05EA \u05D4\u05E8\u05D6\u05F4\u05D4 and the \u05DE\u05E0\u05D5\u05E8\u05D4 \u05D4\u05D8\u05D4\u05D5\u05E8\u05D4 as
     	 * mentioned by Yisrael Vehazmanim vol 1, sec. 7,
     	 * ch. 3 no. 16. Three shaos zmaniyos are calculated based on this day and added to {@link
    -	 * getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)
    -	 * after {@link getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link
    -	 * getAlos16Point1Degrees() alos 16.1°} to {@link getSeaLevelSunset() sea level sunset}.
    +	 * #getAlos16Point1Degrees() alos} to reach this time. This time is 3 shaos zmaniyos (solar hours)
    +	 * after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link
    +	 * #getAlos16Point1Degrees() alos 16.1°} to {@link #getSeaLevelSunset() sea level sunset}.
     	 * Note:  Based on this calculation chatzos will not be at midday and {@link
    -	 * isUseAstronomicalChatzosForOtherZmanim()} will be ignored.
    +	 * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored.
     	 * 
     	 * @return the Instant of the latest zman krias shema based on this day. 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.
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getSeaLevelSunset()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getSeaLevelSunset()
     	 */
     	public Instant getSofZmanShmaAlos16Point1ToSunset() {
     		return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false);
    @@ -1348,22 +1348,22 @@ public Instant getSofZmanShmaAlos16Point1ToSunset() {
     
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
    -	 * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at
    -	 * {@link getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated
    -	 * based on this day and added to {@link getAlos16Point1Degrees() alos} to reach this time. This time is 3
    -	 * shaos zmaniyos (temporal hours) after {@link getAlos16Point1Degrees() alos 16.1°} based on
    -	 * the opinion that the day is calculated from a {@link getAlos16Point1Degrees() alos 16.1°} to
    -	 * {@link getTzaisGeonim7Point083Degrees() tzais 7.083°}.
    +	 * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at
    +	 * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}. 3 shaos zmaniyos are calculated
    +	 * based on this day and added to {@link #getAlos16Point1Degrees() alos} to reach this time. This time is 3
    +	 * shaos zmaniyos (temporal hours) after {@link #getAlos16Point1Degrees() alos 16.1°} based on
    +	 * the opinion that the day is calculated from a {@link #getAlos16Point1Degrees() alos 16.1°} to
    +	 * {@link #getTzaisGeonim7Point083Degrees() tzais 7.083°}.
     	 * Note:  Based on this calculation chatzos will not be at midday and {@link
    -	 * isUseAstronomicalChatzosForOtherZmanim()} will be ignored.
    +	 * #isUseAstronomicalChatzosForOtherZmanim()} will be ignored.
     	 * 
     	 * @return the Instant of the latest zman krias shema based on this calculation. 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.
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getTzaisGeonim7Point083Degrees()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getTzaisGeonim7Point083Degrees()
     	 */
     	public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() {
     		return getSofZmanShma(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false);
    @@ -1372,20 +1372,20 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunset() sunrise}. This time
    -	 * is 4 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
    -	 * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
    +	 * alos being {@link #getAlos19Point8Degrees() 19.8°} before {@link #getSunset() sunrise}. This time
    +	 * is 4 {@link #getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link
    +	 * #getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
     	 * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link
    -	 * getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees() dawn}.
    +	 * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
     	 * 
    -	 * @see getShaahZmanis19Point8Degrees()
    -	 * @see getAlos19Point8Degrees()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanis19Point8Degrees()
    +	 * @see #getAlos19Point8Degrees()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getSofZmanTfilaMGA19Point8Degrees() {
     		return getSofZmanTfila(getAlos19Point8Degrees(), getTzais19Point8Degrees(), true);
    @@ -1394,19 +1394,19 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time
    -	 * is 4 {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link
    -	 * getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
    +	 * alos being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunset() sunrise}. This time
    +	 * is 4 {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link
    +	 * #getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to
     	 * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link
    -	 * getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}.
    +	 * #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
     	 * 
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getAlos16Point1Degrees()
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getAlos16Point1Degrees()
     	 */
     	public Instant getSofZmanTfilaMGA16Point1Degrees() {
     		return getSofZmanTfila(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true);
    @@ -1415,19 +1415,19 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos18Degrees() 18°} before {@link getSunset() sunrise}. This time is 4
    -	 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn}
    +	 * alos being {@link #getAlos18Degrees() 18°} before {@link #getSunset() sunrise}. This time is 4
    +	 * {@link #getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos18Degrees() dawn}
     	 * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18°
    -	 * below sunrise or sunset. This returns the time of 4 * {@link getShaahZmanis18Degrees()} after
    -	 * {@link getAlos18Degrees() dawn}.
    +	 * below sunrise or sunset. This returns the time of 4 * {@link #getShaahZmanis18Degrees()} after
    +	 * {@link #getAlos18Degrees() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
     	 * 
    -	 * @see getShaahZmanis18Degrees()
    -	 * @see getAlos18Degrees()
    +	 * @see #getShaahZmanis18Degrees()
    +	 * @see #getAlos18Degrees()
     	 */
     	public Instant getSofZmanTfilaMGA18Degrees() {
     		return getSofZmanTfila(getAlos18Degrees(), getTzais18Degrees(), true);
    @@ -1436,18 +1436,18 @@ public Instant getSofZmanTfilaMGA18Degrees() {
     	/**
     	 * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
     	 * Magen Avraham (MGA) based on alos
    -	 * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunset() sunrise}. This time is 4
    -	 * {@link getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos72Zmanis() dawn}
    -	 * based on the opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72
    -	 * minutes zmaniyos before sunrise to {@link getTzais72Zmanis() nightfall} of 72 minutes zmaniyos
    -	 * after sunset. This returns the time of 4 * {@link getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}.
    +	 * being {@link #getAlos72Zmanis() 72} minutes zmaniyos before {@link #getSunset() sunrise}. This time is 4
    +	 * {@link #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos72Zmanis() dawn}
    +	 * based on the opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72
    +	 * minutes zmaniyos before sunrise to {@link #getTzais72Zmanis() nightfall} of 72 minutes zmaniyos
    +	 * after sunset. This returns the time of 4 * {@link #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72MinutesZmanis()
    -	 * @see getAlos72Zmanis()
    +	 * @see #getShaahZmanis72MinutesZmanis()
    +	 * @see #getAlos72Zmanis()
     	 */
     	public Instant getSofZmanTfilaMGA72MinutesZmanis() {
     		return getSofZmanTfila(getAlos72Zmanis(), getTzais72Zmanis(), true);
    @@ -1456,18 +1456,18 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunset() sunrise}. This time is 4
    -	 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on
    -	 * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to
    -	 * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 *
    -	 * {@link getShaahZmanis90Minutes()} after {@link getAlos90Minutes() dawn}.
    +	 * alos being {@link #getAlos90Minutes() 90} minutes before {@link #getSunset() sunrise}. This time is 4
    +	 * {@link #getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos90Minutes() dawn} based on
    +	 * the opinion of the MGA that the day is calculated from a {@link #getAlos90Minutes() dawn} of 90 minutes before sunrise to
    +	 * {@link #getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 *
    +	 * {@link #getShaahZmanis90Minutes()} after {@link #getAlos90Minutes() dawn}.
     	 * 
     	 * @return the Instant 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis90Minutes()
    -	 * @see getAlos90Minutes()
    +	 * @see #getShaahZmanis90Minutes()
    +	 * @see #getAlos90Minutes()
     	 */
     	public Instant getSofZmanTfilaMGA90Minutes() {
     		return getSofZmanTfila(getAlos90Minutes(), getTzais90Minutes(), true);
    @@ -1476,19 +1476,19 @@ public Instant getSofZmanTfilaMGA90Minutes() {
     	/**
     	 * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
     	 * Magen Avraham (MGA) based on alos
    -	 * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunset() sunrise}. This time is
    -	 * 4 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos90Zmanis()
    -	 * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos90Zmanis() dawn}
    -	 * of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} of 90 minutes
    -	 * zmaniyos after sunset. This returns the time of 4 * {@link getShaahZmanis90MinutesZmanis()} after
    -	 * {@link getAlos90Zmanis() dawn}.
    +	 * being {@link #getAlos90Zmanis() 90} minutes zmaniyos before {@link #getSunset() sunrise}. This time is
    +	 * 4 {@link #getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos90Zmanis()
    +	 * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos90Zmanis() dawn}
    +	 * of 90 minutes zmaniyos before sunrise to {@link #getTzais90Zmanis() nightfall} of 90 minutes
    +	 * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis90MinutesZmanis()} after
    +	 * {@link #getAlos90Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis90MinutesZmanis()
    -	 * @see getAlos90Zmanis()
    +	 * @see #getShaahZmanis90MinutesZmanis()
    +	 * @see #getAlos90Zmanis()
     	 */
     	public Instant getSofZmanTfilaMGA90MinutesZmanis() {
     		return getSofZmanTfila(getAlos90Zmanis(), getTzais90Zmanis(), true);
    @@ -1497,18 +1497,18 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunset() sunrise}. This time is 4
    -	 * {@link getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on
    -	 * the opinion of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before
    -	 * sunrise to {@link getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 *
    -	 * {@link getShaahZmanis96Minutes()} after {@link getAlos96Minutes() dawn}.
    +	 * alos being {@link #getAlos96Minutes() 96} minutes before {@link #getSunset() sunrise}. This time is 4
    +	 * {@link #getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos96Minutes() dawn} based on
    +	 * the opinion of the MGA that the day is calculated from a {@link #getAlos96Minutes() dawn} of 96 minutes before
    +	 * sunrise to {@link #getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 *
    +	 * {@link #getShaahZmanis96Minutes()} after {@link #getAlos96Minutes() dawn}.
     	 * 
     	 * @return the Instant 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis96Minutes()
    -	 * @see getAlos96Minutes()
    +	 * @see #getShaahZmanis96Minutes()
    +	 * @see #getAlos96Minutes()
     	 */
     	public Instant getSofZmanTfilaMGA96Minutes() {
     		return getSofZmanTfila(getAlos96Minutes(), getTzais96Minutes(), true);
    @@ -1517,19 +1517,19 @@ public Instant getSofZmanTfilaMGA96Minutes() {
     	/**
     	 * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the
     	 * Magen Avraham (MGA) based on alos
    -	 * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunset() sunrise}. This time is
    -	 * 4 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos96Zmanis()
    -	 * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos96Zmanis() dawn}
    -	 * of 96 minutes zmaniyos before sunrise to {@link getTzais96Zmanis() nightfall} of 96 minutes
    -	 * zmaniyos after sunset. This returns the time of 4 * {@link getShaahZmanis96MinutesZmanis()} after
    -	 * {@link getAlos96Zmanis() dawn}.
    +	 * being {@link #getAlos96Zmanis() 96} minutes zmaniyos before {@link #getSunset() sunrise}. This time is
    +	 * 4 {@link #getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link #getAlos96Zmanis()
    +	 * dawn} based on the opinion of the MGA that the day is calculated from a {@link #getAlos96Zmanis() dawn}
    +	 * of 96 minutes zmaniyos before sunrise to {@link #getTzais96Zmanis() nightfall} of 96 minutes
    +	 * zmaniyos after sunset. This returns the time of 4 * {@link #getShaahZmanis96MinutesZmanis()} after
    +	 * {@link #getAlos96Zmanis() dawn}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis90MinutesZmanis()
    -	 * @see getAlos90Zmanis()
    +	 * @see #getShaahZmanis90MinutesZmanis()
    +	 * @see #getAlos90Zmanis()
     	 */
     	public Instant getSofZmanTfilaMGA96MinutesZmanis() {
     		return getSofZmanTfila(getAlos96Zmanis(), getTzais96Zmanis(), true);
    @@ -1538,19 +1538,19 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() {
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion
     	 * of the Magen Avraham (MGA) based on
    -	 * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunset() sunrise} . This time is 4
    -	 * {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link getAlos120Minutes() dawn}
    -	 * based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} of 120
    -	 * minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
    -	 * 4 * {@link getShaahZmanis120Minutes()} after {@link getAlos120Minutes() dawn}. This is an extremely early zman
    +	 * alos being {@link #getAlos120Minutes() 120} minutes before {@link #getSunset() sunrise} . This time is 4
    +	 * {@link #getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link #getAlos120Minutes() dawn}
    +	 * based on the opinion of the MGA that the day is calculated from a {@link #getAlos120Minutes() dawn} of 120
    +	 * minutes before sunrise to {@link #getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of
    +	 * 4 * {@link #getShaahZmanis120Minutes()} after {@link #getAlos120Minutes() dawn}. This is an extremely early zman
     	 * that is very much a chumra.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis120Minutes()
    -	 * @see getAlos120Minutes()
    +	 * @see #getShaahZmanis120Minutes()
    +	 * @see #getAlos120Minutes()
     	 */
     	public Instant getSofZmanTfilaMGA120Minutes() {
     		return getSofZmanTfila(getAlos120Minutes(), getTzais120Minutes(), true);
    @@ -1558,43 +1558,46 @@ public Instant getSofZmanTfilaMGA120Minutes() {
     
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) calculated as 2 hours
    -	 * before {@link getChatzosHayom()}. This is based on the opinions that calculate
    -	 * sof zman krias shema as {@link getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours
    -	 * before {@link getChatzosHayom()}.
    +	 * before {@link #getChatzosHayom()}. This is based on the opinions that calculate
    +	 * sof zman krias shema as {@link #getSofZmanShma3HoursBeforeChatzos()}. This returns the time of 2 hours
    +	 * before {@link #getChatzosHayom()}.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getChatzosHayom()
    -	 * @see getSofZmanShma3HoursBeforeChatzos()
    +	 * @see #getChatzosHayom()
    +	 * @see #getSofZmanShma3HoursBeforeChatzos()
     	 */
     	public Instant getSofZmanTfila2HoursBeforeChatzos() {
     		return getTimeOffset(getChatzosHayom(), -120 * MINUTE_MILLIS);
     	}
     
     	/**
    -	 * This method returns mincha gedola calculated as 30 minutes after {@link getChatzosHayom() chatzos}
    -	 * and not 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} after {@link getChatzosHayom() chatzos} as
    -	 * calculated by {@link getMinchaGedola}. Some use this time to delay the start of mincha in the winter when
    -	 * 1/2 of a {@link getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See
    -	 * {@link getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One
    -	 * should not use this time to start mincha before the standard {@link getMinchaGedolaGRA() mincha gedola}.
    +	 * This method returns mincha gedola calculated as 30 minutes after {@link #getChatzosHayom() chatzos}
    +	 * and not 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} after {@link #getChatzosHayom() chatzos} as
    +	 * calculated by {@link #getMinchaGedola}. Some use this time to delay the start of mincha in the winter when
    +	 * 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} is less than 30 minutes. See
    +	 * {@link #getMinchaGedolaGreaterThan30(Instant)} for a convenience method that returns the later of the 2 calculations. One
    +	 * should not use this time to start mincha before the standard {@link #getMinchaGedolaGRA() mincha gedola}.
     	 * See Shulchan Aruch Orach Chayim 234:1 and
     	 * the Shaar Hatziyon seif katan ches. Since this calculation is a fixed 30 minutes of regular clock time after
    -	 * chatzos, even if {@link isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha
    -	 * gedola time will be affected by {@link isUseAstronomicalChatzos()} and not by
    -	 * {@link isUseAstronomicalChatzosForOtherZmanim()}.
    +	 * chatzos, even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha
    +	 * gedola time will be affected by {@link #isUseAstronomicalChatzos()} and not by
    +	 * {@link #isUseAstronomicalChatzosForOtherZmanim()}.
     	 * 
     	 * @return the Instant of 30 minutes after chatzos. 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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaGedolaGreaterThan30(Instant)
    -	 * @see getChatzosHayom()
    -	 * @see isUseAstronomicalChatzos()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @todo Consider adjusting this to calculate the time as half an hour after {@link #getChatzosHayom()} that uses
    +	 *         {@link #isUseAstronomicalChatzos()} to determine the type of chatzos to utilize. that support it,
    +	 *         based on {@link #isUseAstronomicalChatzos()}.
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaGedolaGreaterThan30(Instant)
    +	 * @see #getChatzosHayom()
    +	 * @see #isUseAstronomicalChatzos()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 */
     	public Instant getMinchaGedola30Minutes() {
     		return getTimeOffset(getChatzosHayom(), MINUTE_MILLIS * 30);
    @@ -1603,19 +1606,19 @@ public Instant getMinchaGedola30Minutes() {
     	/**
     	 * This method returns the time of mincha gedola according to the Magen Avraham with the day starting 72
     	 * minutes before sunrise and ending 72 minutes after sunset. This is the earliest time to pray mincha. For
    -	 * more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is
    -	 * calculated as 6.5 {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
    -	 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos}. If {@link
    -	 * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5
    -	 * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between
    -	 * {@link getChatzosHayom()} and {@link getTzais72Minutes()} after {@link getChatzosHayom()}.
    -	 * 
    -	 * @see getAlos72Minutes()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaGRA()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getChatzosHayom()
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is
    +	 * calculated as 6.5 {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
    +	 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}. If {@link
    +	 * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5
    +	 * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between
    +	 * {@link #getChatzosHayom()} and {@link #getTzais72Minutes()} after {@link #getChatzosHayom()}.
    +	 * 
    +	 * @see #getAlos72Minutes()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaGRA()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getChatzosHayom()
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 * @return the Instant of the time of mincha gedola. 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
    @@ -1632,15 +1635,15 @@ public Instant getMinchaGedola72Minutes() {
     	/**
     	 * This method returns the time of mincha gedola according to the Magen Avraham with the day starting and
     	 * ending 16.1° below the horizon. This is the earliest time to pray mincha. For more information on
    -	 * this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is calculated as 6.5
    -	 * {@link getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
    -	 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() alos}. If {@link
    -	 * isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5
    -	 * {@link getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link getChatzosHayom()}
    -	 * and {@link getAlos16Point1Degrees()} after {@link getChatzosHayom()}.
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaGRA()
    +	 * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 6.5
    +	 * {@link #getTemporalHour() solar hours} after alos. The calculation used is 6.5 *
    +	 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}. If {@link
    +	 * #isUseAstronomicalChatzosForOtherZmanim()} is set to true, the calculation will be based on 0.5
    +	 * {@link #getHalfDayBasedShaahZmanis(Instant, Instant) half-day based sha'ah zmanis} between {@link #getChatzosHayom()}
    +	 * and {@link #getAlos16Point1Degrees()} after {@link #getChatzosHayom()}.
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaGRA()
     	 * @return the Instant of the time of mincha gedola. 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.
    @@ -1660,22 +1663,22 @@ public Instant getMinchaGedola16Point1Degrees() {
     	 * "https://en.wikipedia.org/wiki/Yaakov_Moshe_Hillel">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 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.
    +	 * {@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(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola.
    -	 * For more information about mincha gedola see the documentation on {@link getMinchaGedolaGRA() mincha gedola}.
    +	 * #getMinchaGedolaGreaterThan30(Instant)} for a way to claculate the later of 30 minutes or this mincha gedola.
    +	 * For more information about mincha gedola see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}.
     	 * Since calculation of this zman involves chatzos that is offset from the center of the astronomical day,
    -	 * {@link isUseAstronomicalChatzosForOtherZmanim()} is N/A here.
    +	 * {@link #isUseAstronomicalChatzosForOtherZmanim()} is N/A here.
     	 * @return the Instant of the mincha gedola. 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.
     	 * 
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getTzaisGeonim3Point7Degrees()
    -	 * @see getShaahZmanisAlos16Point1ToTzais3Point7()
    -	 * @see getMinchaGedolaGreaterThan30(Instant)
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getTzaisGeonim3Point7Degrees()
    +	 * @see #getShaahZmanisAlos16Point1ToTzais3Point7()
    +	 * @see #getMinchaGedolaGreaterThan30(Instant)
     	 */
     	public Instant getMinchaGedolaAhavatShalom() {
     		if (getChatzosHayom() == null || getMinchaGedola30Minutes() == null || getShaahZmanisAlos16Point1ToTzais3Point7() == Long.MIN_VALUE) {
    @@ -1688,21 +1691,21 @@ public Instant getMinchaGedolaAhavatShalom() {
     
     	/**
     	 * This is a convenience method that returns the later of the minchaGedola passed in 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 the minchaGedola passed in will be
    +	 * #getMinchaGedola30Minutes()}. In the winter when 1/2 of a {@link #getShaahZmanisGRA() shaah zmanis} is less
    +	 * than 30 minutes {@link #getMinchaGedola30Minutes()} will be returned, otherwise the minchaGedola passed in will be
     	 * returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah
    -	 * zmanis), even if {@link isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha
    -	 * time may be affected by {@link isUseAstronomicalChatzos()}.
    +	 * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha
    +	 * time may be affected by {@link #isUseAstronomicalChatzos()}.
     	 * 
     	 * @param minchaGedola
    -	 *            the mincha gedola to be compared to {@link getMinchaGedola30Minutes()}.
    -	 * @return the Instant of the later of {@link getMinchaGedolaGRA()} and {@link getMinchaGedola30Minutes()}.
    +	 *            the mincha gedola to be compared to {@link #getMinchaGedola30Minutes()}.
    +	 * @return the Instant of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}.
     	 *         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 {@link AstronomicalCalendar} documentation.
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaGedola30Minutes()
    -	 * @see isUseAstronomicalChatzos()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaGedola30Minutes()
    +	 * @see #isUseAstronomicalChatzos()
     	 * 
     	 */
     	public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) {
    @@ -1713,18 +1716,48 @@ public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) {
     					: minchaGedola;
     		}
     	}
    +	
    +	/**
    +	 * This is a convenience method that returns the later of {@link #getMinchaGedolaGRA()} 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 #getMinchaGedolaGRA()}
    +	 * will be returned. Since this calculation can be an offset of chatzos (if 30 clock minutes > 1/2 of a shaah
    +	 * zmanis), even if {@link #isUseAstronomicalChatzosForOtherZmanim()} is false, this mincha time
    +	 * may be affected by {@link #isUseAstronomicalChatzos()}.
    +	 * 
    +	 * @return the Date of the later of {@link #getMinchaGedolaGRA()} and {@link #getMinchaGedola30Minutes()}.
    +	 *         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 {@link AstronomicalCalendar} documentation.
    +	 * @todo Consider adjusting this to calculate the time as 30 minutes after {@link #getChatzosHayom()} that uses {@link
    +	 *         isUseAstronomicalChatzos()} to determine the type of chatzos to utilize (if the {@link
    +	 *         com.kosherjava.zmanim.util.AstronomicalCalculator calculator} support astronomical chatzos),
    +	 *         based on the {@link #isUseAstronomicalChatzos()} setting.
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaGedola30Minutes()
    +	 * @see #getMinchaGedolaGreaterThan30(Instant)
    +	 * @see #isUseAstronomicalChatzos()
    +	 */
    +	public Instant getMinchaGedolaGRAGreaterThan30() {
    +		if (getMinchaGedola30Minutes() == null || getMinchaGedolaGRA() == null) {
    +			return null;
    +		} else {
    +			return getMinchaGedola30Minutes().compareTo(getMinchaGedolaGRA()) > 0 ? getMinchaGedola30Minutes()
    +					: getMinchaGedolaGRA();
    +		}
    +	}
     
     	/**
     	 * This method returns the time of mincha ketana according to the Magen Avraham with the day starting and
     	 * ending 16.1° below the horizon. This is the preferred earliest time to pray mincha according to the
     	 * opinion of the Rambam and others. For more information on
    -	 * this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is calculated as 9.5
    -	 * {@link getTemporalHour() solar hours} after alos. The calculation used is 9.5 *
    -	 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() alos}.
    +	 * this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is calculated as 9.5
    +	 * {@link #getTemporalHour() solar hours} after alos. The calculation used is 9.5 *
    +	 * {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() alos}.
     	 * 
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaGRA()
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaGRA()
     	 * @return the Instant 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
    @@ -1738,20 +1771,20 @@ public Instant getMinchaKetana16Point1Degrees() {
     	 * This method returns the time of mincha ketana 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 ketana is calculated as 2.5 shaos
    -	 * zmaniyos before {@link getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos
    -	 * calculated based on a day starting at {@link getAlos16Point1Degrees() alos 16.1°} and ending at
    +	 * zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos zmaniyos
    +	 * calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and ending at
     	 * tzais 3.8°. Mincha ketana is the preferred earliest time to pray mincha according to
     	 * the opinion of the Rambam and others. For more information
    -	 * on this see the documentation on {@link getMinchaKetanaGRA() mincha ketana}.
    +	 * on this see the documentation on {@link #getMinchaKetanaGRA() mincha ketana}.
     	 * 
     	 * @return the Instant 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.
     	 * 
    -	 * @see getShaahZmanisAlos16Point1ToTzais3Point8()
    -	 * @see getMinchaGedolaAhavatShalom()
    -	 * @see getPlagAhavatShalom()
    +	 * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
    +	 * @see #getMinchaGedolaAhavatShalom()
    +	 * @see #getPlagAhavatShalom()
     	 */
     	public Instant getMinchaKetanaAhavatShalom() {
     		return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 2.5);
    @@ -1761,13 +1794,13 @@ public Instant getMinchaKetanaAhavatShalom() {
     	 * This method returns the time of mincha ketana according to the Magen Avraham with the day
     	 * starting 72 minutes before sunrise and ending 72 minutes after sunset. This is the preferred earliest time to pray
     	 * mincha according to the opinion of the Rambam
    -	 * and others. For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}.
    -	 * This is calculated as 9.5 {@link getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *
    -	 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos}.
    +	 * and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}.
    +	 * This is calculated as 9.5 {@link #getShaahZmanis72Minutes()} after alos. The calculation used is 9.5 *
    +	 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos}.
     	 * 
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaGRA()
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaGRA()
     	 * @return the Instant of the time of mincha ketana. 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
    @@ -1780,16 +1813,16 @@ public Instant getMinchaKetana72Minutes() {
     	/**
     	 * This method returns the time of plag hamincha according to the Magen Avraham with the day starting 60
     	 * minutes before sunrise and ending 60 minutes after sunset. This is calculated as 10.75 hours after
    -	 * {@link getAlos60Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis60Minutes()} after {@link getAlos60Minutes()}.
    +	 * {@link #getAlos60Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis60Minutes()} after {@link #getAlos60Minutes()}.
     	 * 
     	 * @return the Instant of the time of plag hamincha. 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
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanis60Minutes()
    -	 * @see getAlos60Minutes()
    -	 * @see getTzais60Minutes()
    +	 * @see #getShaahZmanis60Minutes()
    +	 * @see #getAlos60Minutes()
    +	 * @see #getTzais60Minutes()
     	 */
     	public Instant getPlagHamincha60Minutes() {
     		return getPlagHamincha(getAlos60Minutes(), getTzais60Minutes(), true);
    @@ -1798,8 +1831,8 @@ public Instant getPlagHamincha60Minutes() {
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha according to the
     	 * Magen Avraham with the day starting 72 minutes before sunrise and ending 72 minutes after sunset. This is calculated
    -	 * as 10.75 hours after {@link getAlos72Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis72Minutes()} after
    -	 * {@link getAlos72Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
    +	 * as 10.75 hours after {@link #getAlos72Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis72Minutes()} after
    +	 * {@link #getAlos72Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
     	 * lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1812,7 +1845,7 @@ public Instant getPlagHamincha60Minutes() {
     	 *         does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanis72Minutes()
    +	 * @see #getShaahZmanis72Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha72Minutes() {
    @@ -1822,8 +1855,8 @@ public Instant getPlagHamincha72Minutes() {
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha according to the
     	 * Magen Avraham with the day starting 90 minutes before sunrise and ending 90 minutes after sunset. This is calculated
    -	 * as 10.75 hours after {@link getAlos90Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis90Minutes()} after
    -	 * {@link getAlos90Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
    +	 * as 10.75 hours after {@link #getAlos90Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis90Minutes()} after
    +	 * {@link #getAlos90Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
     	 * lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1836,7 +1869,7 @@ public Instant getPlagHamincha72Minutes() {
     	 *         does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanis90Minutes()
    +	 * @see #getShaahZmanis90Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha90Minutes() {
    @@ -1846,8 +1879,8 @@ public Instant getPlagHamincha90Minutes() {
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha according to the Magen
     	 * Avraham with the day starting 96 minutes before sunrise and ending 96 minutes after sunset. This is calculated as 10.75
    -	 * hours after {@link getAlos96Minutes() dawn}. The formula used is 10.75 {@link getShaahZmanis96Minutes()} after
    -	 * {@link getAlos96Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
    +	 * hours after {@link #getAlos96Minutes() dawn}. The formula used is 10.75 {@link #getShaahZmanis96Minutes()} after
    +	 * {@link #getAlos96Minutes()}. Since plag by this calculation can occur after sunset, it should only be used
     	 * lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1859,7 +1892,7 @@ public Instant getPlagHamincha90Minutes() {
     	 *         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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis96Minutes()
    +	 * @see #getShaahZmanis96Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha96Minutes() {
    @@ -1868,8 +1901,8 @@ public Instant getPlagHamincha96Minutes() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
    -	 * as 10.75 hours after {@link getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link
    -	 * getShaahZmanis96MinutesZmanis()} after {@link getAlos96Zmanis() dawn}. Since plag by this calculation can
    +	 * as 10.75 hours after {@link #getAlos96Zmanis() dawn}. The formula used is 10.75 * {@link
    +	 * #getShaahZmanis96MinutesZmanis()} after {@link #getAlos96Zmanis() dawn}. Since plag by this calculation can
     	 * occur after sunset, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1889,8 +1922,8 @@ public Instant getPlagHamincha96MinutesZmanis() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha. This is calculated
    -	 * as 10.75 hours after {@link getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link
    -	 * getShaahZmanis90MinutesZmanis()} after {@link getAlos90Zmanis() dawn}. Since plag by this calculation can
    +	 * as 10.75 hours after {@link #getAlos90Zmanis() dawn}. The formula used is 10.75 * {@link
    +	 * #getShaahZmanis90MinutesZmanis()} after {@link #getAlos90Zmanis() dawn}. Since plag by this calculation can
     	 * occur after sunset, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1910,8 +1943,8 @@ public Instant getPlagHamincha90MinutesZmanis() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha. This is calculated as
    -	 * 10.75 hours after {@link getAlos72Zmanis()}. The formula used is 10.75 * {@link getShaahZmanis72MinutesZmanis()} after
    -	 * {@link getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used
    +	 * 10.75 hours after {@link #getAlos72Zmanis()}. The formula used is 10.75 * {@link #getShaahZmanis72MinutesZmanis()} after
    +	 * {@link #getAlos72Zmanis() dawn}. Since plag by this calculation can occur after sunset, it should only be used
     	 * lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1931,10 +1964,10 @@ public Instant getPlagHamincha72MinutesZmanis() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on the
    -	 * opinion that the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link
    -	 * getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos
    -	 * after {@link getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis16Point1Degrees()}
    -	 * after {@link getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it
    +	 * opinion that the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link
    +	 * #getTzais16Point1Degrees() tzais 16.1°}. This is calculated as 10.75 hours zmaniyos
    +	 * after {@link #getAlos16Point1Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis16Point1Degrees()}
    +	 * after {@link #getAlos16Point1Degrees()}. Since plag by this calculation can occur after sunset, it
     	 * should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1947,7 +1980,7 @@ public Instant getPlagHamincha72MinutesZmanis() {
     	 *         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.
     	 * 
    -	 * @see getShaahZmanis16Point1Degrees()
    +	 * @see #getShaahZmanis16Point1Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha16Point1Degrees() {
    @@ -1956,10 +1989,10 @@ public Instant getPlagHamincha16Point1Degrees() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on the
    -	 * opinion that the day starts at {@link getAlos19Point8Degrees() alos 19.8°} and ends at {@link
    -	 * getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos
    -	 * after {@link getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link
    -	 * getShaahZmanis19Point8Degrees()} after {@link getAlos19Point8Degrees()}. Since plag by this
    +	 * opinion that the day starts at {@link #getAlos19Point8Degrees() alos 19.8°} and ends at {@link
    +	 * #getTzais19Point8Degrees() tzais 19.8°}. This is calculated as 10.75 hours zmaniyos
    +	 * after {@link #getAlos19Point8Degrees() dawn}. The formula used is 10.75 * {@link
    +	 * #getShaahZmanis19Point8Degrees()} after {@link #getAlos19Point8Degrees()}. Since plag by this
     	 * calculation can occur after sunset, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1972,7 +2005,7 @@ public Instant getPlagHamincha16Point1Degrees() {
     	 *         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.
     	 * 
    -	 * @see getShaahZmanis19Point8Degrees()
    +	 * @see #getShaahZmanis19Point8Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha19Point8Degrees() {
    @@ -1981,10 +2014,10 @@ public Instant getPlagHamincha19Point8Degrees() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on the
    -	 * opinion that the day starts at {@link getAlos26Degrees() alos 26°} and ends at {@link
    -	 * getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link
    -	 * getAlos26Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis26Degrees()} after {@link
    -	 * getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late
    +	 * opinion that the day starts at {@link #getAlos26Degrees() alos 26°} and ends at {@link
    +	 * #getTzais26Degrees() tzais 26°}. This is calculated as 10.75 hours zmaniyos after {@link
    +	 * #getAlos26Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis26Degrees()} after {@link
    +	 * #getAlos26Degrees()}. Since the zman based on an extremely early alos and a very late
     	 * tzais, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -1997,8 +2030,8 @@ public Instant getPlagHamincha19Point8Degrees() {
     	 *         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.
     	 * 
    -	 * @see getShaahZmanis26Degrees()
    -	 * @see getPlagHamincha120Minutes()
    +	 * @see #getShaahZmanis26Degrees()
    +	 * @see #getPlagHamincha120Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha26Degrees() {
    @@ -2007,10 +2040,10 @@ public Instant getPlagHamincha26Degrees() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on the
    -	 * opinion that the day starts at {@link getAlos18Degrees() alos 18°} and ends at {@link
    -	 * getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link
    -	 * getAlos18Degrees() dawn}. The formula used is 10.75 * {@link getShaahZmanis18Degrees()} after {@link
    -	 * getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used
    +	 * opinion that the day starts at {@link #getAlos18Degrees() alos 18°} and ends at {@link
    +	 * #getTzais18Degrees() tzais 18°}. This is calculated as 10.75 hours zmaniyos after {@link
    +	 * #getAlos18Degrees() dawn}. The formula used is 10.75 * {@link #getShaahZmanis18Degrees()} after {@link
    +	 * #getAlos18Degrees()}. Since plag by this calculation can occur after sunset, it should only be used
     	 * lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -2023,7 +2056,7 @@ public Instant getPlagHamincha26Degrees() {
     	 *         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.
     	 * 
    -	 * @see getShaahZmanis18Degrees()
    +	 * @see #getShaahZmanis18Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagHamincha18Degrees() {
    @@ -2032,12 +2065,12 @@ public Instant getPlagHamincha18Degrees() {
     
     	/**
     	 * This method should be used lechumra only and returns the time of plag hamincha based on the opinion that
    -	 * the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getSunset()
    -	 * sunset}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link getAlos16Point1Degrees()
    +	 * the day starts at {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getSunset()
    +	 * sunset}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link #getAlos16Point1Degrees()
     	 * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link
    -	 * getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link getAlos16Point1Degrees()
    -	 * dawn} of 16.1 degrees before sunrise to {@link getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *
    -	 * the calculated shaah zmanis after {@link getAlos16Point1Degrees() dawn}. Since plag by this
    +	 * #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link #getAlos16Point1Degrees()
    +	 * dawn} of 16.1 degrees before sunrise to {@link #getSeaLevelSunset() sea level sunset}. This returns the time of 10.75 *
    +	 * the calculated shaah zmanis after {@link #getAlos16Point1Degrees() dawn}. Since plag by this
     	 * calculation can occur after sunset, it should only be used lechumra.
     	 * 
     	 * @deprecated This method should be used lechumra only since it returns a very late time (often after
    @@ -2050,8 +2083,8 @@ public Instant getPlagHamincha18Degrees() {
     	 *         low enough below the horizon for this calculation, a null will be returned. See detailed
     	 *         explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getSeaLevelSunset()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getSeaLevelSunset()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getPlagAlosToSunset() {
    @@ -2060,21 +2093,21 @@ public Instant getPlagAlosToSunset() {
     
     	/**
     	 * This method returns the time of plag hamincha based on the opinion that the day starts at
    -	 * {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getTzaisGeonim7Point083Degrees()
    +	 * {@link #getAlos16Point1Degrees() alos 16.1°} and ends at {@link #getTzaisGeonim7Point083Degrees()
     	 * tzais}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link
    -	 * getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal
    -	 * hours) after {@link getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
    -	 * {@link getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to
    -	 * {@link getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated
    -	 * shaah zmanis after {@link getAlos16Point1Degrees() dawn}.
    +	 * #getAlos16Point1Degrees() alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal
    +	 * hours) after {@link #getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a
    +	 * {@link #getAlos16Point1Degrees() dawn} of 16.1 degrees before sunrise to
    +	 * {@link #getTzaisGeonim7Point083Degrees() tzais} . This returns the time of 10.75 * the calculated
    +	 * shaah zmanis after {@link #getAlos16Point1Degrees() dawn}.
     	 * 
     	 * @return the Instant of the plag. 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.
     	 * 
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getTzaisGeonim7Point083Degrees()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getTzaisGeonim7Point083Degrees()
     	 */
     	public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() {
     		return getPlagHamincha(getAlos16Point1Degrees(), getTzaisGeonim7Point083Degrees(), false);
    @@ -2084,8 +2117,8 @@ public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() {
     	 * This method returns the time of plag hamincha (the earliest time that Shabbos can be started) based on the
     	 * opinion of Rabbi Yaakov Moshe Hillel as published in
     	 * the luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that that plag hamincha is calculated
    -	 * as 1.25 shaos zmaniyos before {@link getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos
    -	 * zmaniyos calculated based on a day starting at {@link getAlos16Point1Degrees() alos 16.1°} and
    +	 * as 1.25 shaos zmaniyos before {@link #getTzaisGeonim3Point8Degrees() tzais 3.8°} with shaos
    +	 * zmaniyos calculated based on a day starting at {@link #getAlos16Point1Degrees() alos 16.1°} and
     	 * ending at tzais 3.8°.
     	 * 
     	 * @return the Instant of the plag. If the calculation can't be computed such as northern and
    @@ -2093,9 +2126,9 @@ public Instant getPlagAlos16Point1ToTzaisGeonim7Point083Degrees() {
     	 *         reach low enough below the horizon for this calculation, a null will be returned. See detailed
     	 *         explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getShaahZmanisAlos16Point1ToTzais3Point8()
    -	 * @see getMinchaGedolaAhavatShalom()
    -	 * @see getMinchaKetanaAhavatShalom()
    +	 * @see #getShaahZmanisAlos16Point1ToTzais3Point8()
    +	 * @see #getMinchaGedolaAhavatShalom()
    +	 * @see #getMinchaKetanaAhavatShalom()
     	 */
     	public Instant getPlagAhavatShalom() {
     		return getTimeOffset(getTzaisGeonim3Point8Degrees(), -getShaahZmanisAlos16Point1ToTzais3Point8() * 1.25);
    @@ -2104,7 +2137,7 @@ public Instant getPlagAhavatShalom() {
     	/**
     	 * Method to return the beginning of bain hashmashos of Rabbeinu Tam calculated when the sun is
     	 * {@link ZENITH_13_POINT_24 13.24°} below the western {@link GEOMETRIC_ZENITH geometric horizon} (90°)
    -	 * after sunset. This calculation is based on the same calculation of {@link getBainHashmashosRT58Point5Minutes()
    +	 * after sunset. This calculation is based on the same calculation of {@link #getBainHashmashosRT58Point5Minutes()
     	 * bain hashmashos Rabbeinu Tam 58.5 minutes} but uses a degree-based calculation instead of 58.5 exact
     	 * minutes. This calculation is based on the position of the sun 58.5 minutes after sunset in Jerusalem around the equinox / equilux,
    @@ -2122,7 +2155,7 @@ public Instant getPlagAhavatShalom() {
     	 *         for this calculation, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getBainHashmashosRT58Point5Minutes()
    +	 * @see #getBainHashmashosRT58Point5Minutes()
     	 */
     	public Instant getBainHashmashosRT13Point24Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_13_POINT_24);
    @@ -2147,14 +2180,14 @@ public Instant getBainHashmashosRT58Point5Minutes() {
     	/**
     	 * This method returns the beginning of bain hashmashos based on the calculation of 13.5 minutes (3/4 of an
     	 * 18-minute mil) before
    -	 * shkiah calculated as {@link getTzaisGeonim7Point083Degrees() 7.083°}.
    +	 * shkiah calculated as {@link #getTzaisGeonim7Point083Degrees() 7.083°}.
     	 * 
     	 * @return the Instant of the bain hashmashos of Rabbeinu Tam in this calculation. 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.
    -	 * @see getTzaisGeonim7Point083Degrees()
    +	 * @see #getTzaisGeonim7Point083Degrees()
     	 */
     	public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() {
     		return getTimeOffset(getSunsetOffsetByDegrees(ZENITH_7_POINT_083), -13.5 * MINUTE_MILLIS);
    @@ -2192,7 +2225,7 @@ public Instant getBainHashmashosRT2Stars() {
     	 *         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
     	 *         {@link AstronomicalCalendar} documentation.
    -	 * @see getBainHashmashosYereim3Point05Degrees()
    +	 * @see #getBainHashmashosYereim3Point05Degrees()
     	 */
     	public Instant getBainHashmashosYereim18Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS);
    @@ -2224,9 +2257,9 @@ public Instant getBainHashmashosYereim18Minutes() {
     	 *         top of the {@link AstronomicalCalendar} documentation.
     	 * 
     	 * @see ZENITH_MINUS_3_POINT_05
    -	 * @see getBainHashmashosYereim18Minutes()
    -	 * @see getBainHashmashosYereim2Point8Degrees()
    -	 * @see getBainHashmashosYereim2Point1Degrees()
    +	 * @see #getBainHashmashosYereim18Minutes()
    +	 * @see #getBainHashmashosYereim2Point8Degrees()
    +	 * @see #getBainHashmashosYereim2Point1Degrees()
     	 */
     	public Instant getBainHashmashosYereim3Point05Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_MINUS_3_POINT_05);
    @@ -2245,7 +2278,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() {
     	 *         not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getBainHashmashosYereim2Point8Degrees()
    +	 * @see #getBainHashmashosYereim2Point8Degrees()
     	 */
     	public Instant getBainHashmashosYereim16Point875Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS);
    @@ -2260,7 +2293,7 @@ public Instant getBainHashmashosYereim16Point875Minutes() {
     	 * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil before sunset. According to
     	 * the Yereim, bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall
     	 * starts at sunset. Details, including how the degrees were calculated can be seen in the documentation of
    -	 * {@link getBainHashmashosYereim3Point05Degrees()}.
    +	 * {@link #getBainHashmashosYereim3Point05Degrees()}.
     	 * 
     	 * @return the Instant of the sun's position 2.8° minutes before 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
    @@ -2268,9 +2301,9 @@ public Instant getBainHashmashosYereim16Point875Minutes() {
     	 *         top of the {@link AstronomicalCalendar} documentation.
     	 * 
     	 * @see ZENITH_MINUS_2_POINT_8
    -	 * @see getBainHashmashosYereim16Point875Minutes()
    -	 * @see getBainHashmashosYereim3Point05Degrees()
    -	 * @see getBainHashmashosYereim2Point1Degrees()
    +	 * @see #getBainHashmashosYereim16Point875Minutes()
    +	 * @see #getBainHashmashosYereim3Point05Degrees()
    +	 * @see #getBainHashmashosYereim2Point1Degrees()
     	 */
     	public Instant getBainHashmashosYereim2Point8Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_8);
    @@ -2288,7 +2321,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() {
     	 *         not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getBainHashmashosYereim2Point1Degrees()
    +	 * @see #getBainHashmashosYereim2Point1Degrees()
     	 */
     	public Instant getBainHashmashosYereim13Point5Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS);
    @@ -2303,7 +2336,7 @@ public Instant getBainHashmashosYereim13Point5Minutes() {
     	 * "https://en.wikipedia.org/wiki/Biblical_and_Talmudic_units_of_measurement">mil before sunset. According to the
     	 * Yereim, bain hashmashos starts 3/4 of a mil before sunset and tzais or nightfall starts
     	 * at sunset. Details, including how the degrees were calculated can be seen in the documentation of
    -	 * {@link getBainHashmashosYereim3Point05Degrees()}.
    +	 * {@link #getBainHashmashosYereim3Point05Degrees()}.
     	 * 
     	 * @return the Instant of the sun's position 2.1° minutes before 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, and
    @@ -2311,9 +2344,9 @@ public Instant getBainHashmashosYereim13Point5Minutes() {
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
     	 * @see ZENITH_MINUS_2_POINT_1
    -	 * @see getBainHashmashosYereim13Point5Minutes()
    -	 * @see getBainHashmashosYereim2Point8Degrees()
    -	 * @see getBainHashmashosYereim3Point05Degrees()
    +	 * @see #getBainHashmashosYereim13Point5Minutes()
    +	 * @see #getBainHashmashosYereim2Point8Degrees()
    +	 * @see #getBainHashmashosYereim3Point05Degrees()
     	 */
     	public Instant getBainHashmashosYereim2Point1Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_MINUS_2_POINT_1);
    @@ -2368,7 +2401,7 @@ public Instant getTzaisGeonim3Point8Degrees() {
     	 * >Vol III, ch. 13, no. 53, p. 1026. Among sources he mentions for this zman is Rabbi Yehuda (Leo) Levi's calculations in Jewish Chrononomy
     	 * and other sources. Calculations show that the time is closer to 5.93° and was seemingly rounded to 5.95°.
    -	 * Chabad calendars usually use the 6°-based {@link getTzaisBaalHatanya()} that is built on this same calculation.
    +	 * Chabad calendars usually use the 6°-based {@link #getTzaisBaalHatanya()} that is built on this same calculation.
     	 * It should be noted that Rabbi Yedidya Manet in his Zmanei HaHalacha Lema'aseh (4th edition part 2, pages and 22 and 24) lists 5.88° that appears to be a drop
     	 * too early.
    @@ -2378,7 +2411,7 @@ public Instant getTzaisGeonim3Point8Degrees() {
     	 *         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.
    -	 * @see getTzaisBaalHatanya()
    +	 * @see #getTzaisBaalHatanya()
     	 */
     	public Instant getTzaisGeonim5Point95Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_5_POINT_95);
    @@ -2390,7 +2423,7 @@ public Instant getTzaisGeonim5Point95Degrees() {
     	 * 24-minute mil, or 18 minutes. It is the sun's position at {@link ZENITH_4_POINT_66 4.66°} below the
     	 * western horizon. This is a very early zman and should not be relied on without Rabbinical guidance.
     	 * This does not cover the 35.28 seconds it takes to walk 49 amos (the heref ayin of bain hashmashos
    -	 * of Rav Yosi) at the pace of a 24-minute mil. See {@link getTzaisGeonim4Point8Degrees()} for a time that covers the
    +	 * of Rav Yosi) at the pace of a 24-minute mil. See {@link #getTzaisGeonim4Point8Degrees()} for a time that covers the
     	 * heref ayin.
     	 * 
     	 * @return the Instant representing the time when the sun is 4.66° below sea level. If the calculation
    @@ -2399,7 +2432,7 @@ public Instant getTzaisGeonim5Point95Degrees() {
     	 *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
     	 * @see ZENITH_4_POINT_66
    -	 * @see getTzaisGeonim4Point8Degrees()
    +	 * @see #getTzaisGeonim4Point8Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getTzaisGeonim4Point66Degrees() {
    @@ -2443,7 +2476,7 @@ public Instant getTzaisGeonim4Point42Degrees() {
     	 * look can see the 3 medium stars as early as 15 minutes after sunset. This is explained in detail in Hazmanim Bahalacha vol
     	 * II, ch. 41, no. 6 (p. 372-373, ch. 47, no. 11-12 (p. 491-493) where it is clear that medium sized stars would be visible as
     	 * early as 14 minutes after sunset (13.5 minutes for 3/4 of an 18 minute Mil, plus 0.5 minutes for bain Hashmashos
    -	 * of Rav Yosi) to an expert. See more details on this earier zman at {@link getTzaisGeonim3Point8Degrees()}.
    +	 * of Rav Yosi) to an expert. See more details on this earier zman at {@link #getTzaisGeonim3Point8Degrees()}.
     	 * This is an early zman for tzaisand should not be relied on without Rabbinical guidance.
     	 * 
     	 * @return the Instant representing the time when the sun is 4.8° below sea level. If the calculation
    @@ -2571,7 +2604,7 @@ public Instant getTzaisGeonim9Point3Degrees() {
     	 *         null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
     	 *
    -	 * @see getTzais60Minutes()
    +	 * @see #getTzais60Minutes()
     	 */
     	public Instant getTzaisGeonim9Point75Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_9_POINT_75);
    @@ -2583,17 +2616,17 @@ public Instant 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 getSunset() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the
    -	 * {@link isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link getAlos60Minutes()}.
    +	 * for 4 mil after {@link #getSunset() sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the
    +	 * {@link #isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link #getAlos60Minutes()}.
     	 * 
     	 * @return the Instant 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,
     	 *         and one where it does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getAlos60Minutes()
    -	 * @see getPlagHamincha60Minutes()
    -	 * @see getShaahZmanis60Minutes()
    +	 * @see #getAlos60Minutes()
    +	 * @see #getPlagHamincha60Minutes()
    +	 * @see #getShaahZmanis60Minutes()
     	 */
     	public Instant getTzais60Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS);
    @@ -2601,19 +2634,19 @@ public Instant getTzais60Minutes() {
     
     	/**
     	 * 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
    +	 * {@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 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 changed
    -	 *  by calling {@link setAteretTorahSunsetOffset(double)}.
    +	 *  by calling {@link #setAteretTorahSunsetOffset(double)}.
     	 * 
    -	 * @return the Instant representing 40 minutes (configurable via {@link setAteretTorahSunsetOffset})
    +	 * @return the Instant representing 40 minutes (configurable via {@link #setAteretTorahSunsetOffset})
     	 *         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, and one where it does not set, a null will
     	 *         be returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 */
     	public Instant getTzaisAteretTorah() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS);
    @@ -2625,7 +2658,7 @@ public Instant getTzaisAteretTorah() {
     	 * This affects most zmanim, since almost all zmanim use subset as part of their calculation.
     	 * 
     	 * @return the number of minutes after sunset for Tzait.
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 */
     	public double getAteretTorahSunsetOffset() {
     		return ateretTorahSunsetOffset;
    @@ -2639,7 +2672,7 @@ public double getAteretTorahSunsetOffset() {
     	 * 
     	 * @param ateretTorahSunsetOffset
     	 *            the number of minutes after sunset to use as an offset for the Ateret Torah tzais
    -	 * @see getAteretTorahSunsetOffset()
    +	 * @see #getAteretTorahSunsetOffset()
     	 */
     	public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) {
     		this.ateretTorahSunsetOffset = ateretTorahSunsetOffset;
    @@ -2648,23 +2681,23 @@ public void setAteretTorahSunsetOffset(double ateretTorahSunsetOffset) {
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning) based on the
     	 * calculation of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
    -	 * {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
    -	 * {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
    -	 * {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added
    -	 * to {@link getAlos72Zmanis() alos} to reach this time. This time is 3
    -	 * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
    -	 * {@link getAlos72Zmanis() alos 72 zmaniyos}. Note:  Based on this calculation chatzos
    +	 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
    +	 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
    +	 * {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and added
    +	 * to {@link #getAlos72Zmanis() alos} to reach this time. This time is 3
    +	 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
    +	 * {@link #getAlos72Zmanis() alos 72 zmaniyos}. Note:  Based on this calculation chatzos
     	 * will not be at midday.
     	 * 
     	 * @return the Instant 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
     	 *         explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    -	 * @see getShaahZmanisAteretTorah()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
    +	 * @see #getShaahZmanisAteretTorah()
     	 */
     	public Instant getSofZmanShmaAteretTorah() {
     		return getSofZmanShma(getAlos72Zmanis(), getTzaisAteretTorah(), false);
    @@ -2672,22 +2705,22 @@ public Instant getSofZmanShmaAteretTorah() {
     
     	/**
     	 * This method returns the latest zman tfila (time to recite the morning prayers) based on the calculation
    -	 * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis()
    -	 * 1/10th of the day} before sunrise and is usually calculated as ending {@link getTzaisAteretTorah() 40 minutes
    -	 * after sunset} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos
    -	 * are calculated based on this day and added to {@link getAlos72Zmanis() alos} to reach this time. This time
    -	 * is 4 * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
    -	 * {@link getAlos72Zmanis() alos 72 zmaniyos}.
    +	 * of Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis()
    +	 * 1/10th of the day} before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes
    +	 * after sunset} (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos
    +	 * are calculated based on this day and added to {@link #getAlos72Zmanis() alos} to reach this time. This time
    +	 * is 4 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after
    +	 * {@link #getAlos72Zmanis() alos 72 zmaniyos}.
     	 * Note:  Based on this calculation chatzos will not be at midday.
     	 * 
     	 * @return the Instant 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
     	 *         explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getShaahZmanisAteretTorah()
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getShaahZmanisAteretTorah()
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 */
     	public Instant getSofZmanTfilaAteretTorah() {
     		return getSofZmanTfila(getAlos72Zmanis(), getTzaisAteretTorah(), false);
    @@ -2695,22 +2728,22 @@ public Instant getSofZmanTfilaAteretTorah() {
     
     	/**
     	 * This method returns the time of mincha gedola based on the calculation of Chacham Yosef
    -	 * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis() 1/10th of the day}
    -	 * before sunrise and is usually calculated as ending {@link getTzaisAteretTorah() 40 minutes after sunset}
    -	 * (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}). This is the preferred earliest
    +	 * Harari-Raful of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day}
    +	 * before sunrise and is usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset}
    +	 * (configurable to any offset via {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest
     	 * time to pray mincha according to the opinion of the Rambam and others. For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha
    -	 * gedola}. This is calculated as 6.5 {@link getShaahZmanisAteretTorah()  solar hours} after alos. The
    -	 * calculation used is 6.5 * {@link getShaahZmanisAteretTorah()} after {@link getAlos72Zmanis() alos}.
    -	 * 
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getShaahZmanisAteretTorah()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaAteretTorah()
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    +	 * >Rambam and others. For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha
    +	 * gedola}. This is calculated as 6.5 {@link #getShaahZmanisAteretTorah()  solar hours} after alos. The
    +	 * calculation used is 6.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
    +	 * 
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getShaahZmanisAteretTorah()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaAteretTorah()
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
     	 * 
     	 * @return the Instant of the time of mincha gedola. 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
    @@ -2724,21 +2757,21 @@ public Instant getMinchaGedolaAteretTorah() {
     	/**
     	 * This method returns the time of mincha ketana based on the calculation of
     	 * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah, that the day starts
    -	 * {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
    -	 * {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
    -	 * {@link setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha
    +	 * {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is usually calculated as ending
    +	 * {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset via
    +	 * {@link #setAteretTorahSunsetOffset(double)}). This is the preferred earliest time to pray mincha
     	 * according to the opinion of the Rambam and others.
    -	 * For more information on this see the documentation on {@link getMinchaGedolaGRA() mincha gedola}. This is
    -	 * calculated as 9.5 {@link getShaahZmanisAteretTorah() solar hours} after {@link getAlos72Zmanis() alos}.
    -	 * The calculation used is 9.5 * {@link getShaahZmanisAteretTorah()} after {@link getAlos72Zmanis() alos}.
    -	 * 
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getShaahZmanisAteretTorah()
    -	 * @see getAteretTorahSunsetOffset()
    -	 * @see setAteretTorahSunsetOffset(double)
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getMinchaKetanaGRA()
    +	 * For more information on this see the documentation on {@link #getMinchaGedolaGRA() mincha gedola}. This is
    +	 * calculated as 9.5 {@link #getShaahZmanisAteretTorah() solar hours} after {@link #getAlos72Zmanis() alos}.
    +	 * The calculation used is 9.5 * {@link #getShaahZmanisAteretTorah()} after {@link #getAlos72Zmanis() alos}.
    +	 * 
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getShaahZmanisAteretTorah()
    +	 * @see #getAteretTorahSunsetOffset()
    +	 * @see #setAteretTorahSunsetOffset(double)
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getMinchaKetanaGRA()
     	 * @return the Instant of the time of mincha ketana. 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
    @@ -2750,21 +2783,21 @@ public Instant getMinchaKetanaAteretTorah() {
     
     	/**
     	 * This method returns the time of plag hamincha based on the calculation of Chacham Yosef Harari-Raful
    -	 * of Yeshivat Ateret Torah, that the day starts {@link getAlos72Zmanis() 1/10th of the day} before sunrise and is
    -	 * usually calculated as ending {@link getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset
    -	 * via {@link setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and
    -	 * added to {@link getAlos72Zmanis() alos} to reach this time. This time is 10.75
    -	 * {@link getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis()
    +	 * of Yeshivat Ateret Torah, that the day starts {@link #getAlos72Zmanis() 1/10th of the day} before sunrise and is
    +	 * usually calculated as ending {@link #getTzaisAteretTorah() 40 minutes after sunset} (configurable to any offset
    +	 * via {@link #setAteretTorahSunsetOffset(double)}). shaos zmaniyos are calculated based on this day and
    +	 * added to {@link #getAlos72Zmanis() alos} to reach this time. This time is 10.75
    +	 * {@link #getShaahZmanisAteretTorah() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis()
     	 * dawn}.
     	 * 
     	 * @return the Instant of the plag. 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 {@link AstronomicalCalendar} documentation.
    -	 * @see getAlos72Zmanis()
    -	 * @see getTzaisAteretTorah()
    -	 * @see getShaahZmanisAteretTorah()
    -	 * @see setAteretTorahSunsetOffset(double)
    -	 * @see getAteretTorahSunsetOffset()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getTzaisAteretTorah()
    +	 * @see #getShaahZmanisAteretTorah()
    +	 * @see #setAteretTorahSunsetOffset(double)
    +	 * @see #getAteretTorahSunsetOffset()
     	 */
     	public Instant getPlagHaminchaAteretTorah() {
     		return getPlagHamincha(getAlos72Zmanis(), getTzaisAteretTorah(), false);
    @@ -2772,7 +2805,7 @@ public Instant getPlagHaminchaAteretTorah() {
     
     	/**
     	 * Method to return tzais (dusk) calculated as 72 minutes zmaniyos, or 1/10th of the day after {@link
    -	 * getSeaLevelSunset() sea level sunset}. This is the way that the Minchas Cohen in Ma'amar 2:4 calculates Rebbeinu Tam's
     	 * 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
    @@ -2784,7 +2817,7 @@ public Instant getPlagHaminchaAteretTorah() {
     	 *         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 {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos72Zmanis()
    +	 * @see #getAlos72Zmanis()
     	 */
     	public Instant getTzais72Zmanis() {
     		return getZmanisBasedOffset(1.2);
    @@ -2792,14 +2825,14 @@ public Instant getTzais72Zmanis() {
     
     	/**
     	 * Method to return tzais (dusk) calculated using 90 minutes zmaniyos or 1/8th of the day after {@link
    -	 * getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)
    +	 * #getSeaLevelSunset() sea level sunset}. This time is known in Yiddish as the achtel (an eighth)
     	 * zman used in various kehilos.
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos90Zmanis()
    +	 * @see #getAlos90Zmanis()
     	 */
     	public Instant getTzais90Zmanis() {
     		return getZmanisBasedOffset(1.5);
    @@ -2807,33 +2840,33 @@ public Instant getTzais90Zmanis() {
     
     	/**
     	 * Method to return tzais (dusk) calculated using 96 minutes zmaniyos or 1/7.5 of the day after
    -	 * {@link getSeaLevelSunset() sea level sunset}.
    +	 * {@link #getSeaLevelSunset() sea level sunset}.
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos96Zmanis()
    +	 * @see #getAlos96Zmanis()
     	 */
     	public Instant getTzais96Zmanis() {
     		return getZmanisBasedOffset(1.6);
     	}
     
     	/**
    -	 * Method to return tzais (dusk) calculated as 90 minutes after {@link getSunset() sunset} or {@link
    -	 * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). This method returns
    +	 * Method to return tzais (dusk) calculated as 90 minutes after {@link #getSunset() sunset} or {@link
    +	 * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). This method returns
     	 * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a mil according to the Rambam's opinion is 18 minutes, for a total of 90 minutes based on the
     	 * opinion of Ula who calculated tzais as 5 mil after elevation adjusted shkiah (sunset). A similar
    -	 * calculation {@link getTzais19Point8Degrees()} uses solar position* calculations based on this time.
    +	 * calculation {@link #getTzais19Point8Degrees()} uses solar position* calculations based on this time.
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getTzais19Point8Degrees()
    -	 * @see getAlos90Minutes()
    +	 * @see #getTzais19Point8Degrees()
    +	 * @see #getAlos90Minutes()
     	 */
     	public Instant getTzais90Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), 90 * MINUTE_MILLIS);
    @@ -2844,9 +2877,9 @@ public Instant getTzais90Minutes() {
     	 * of Rav Chaim Naeh that the time to walk the distance
     	 * of a mil according to the Rambam's opinion is 2/5 of an hour (24 minutes) for a total of 120
    -	 * minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link getSunset()
    -	 * sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting).
    -	 * A similar calculation {@link getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation.
    +	 * minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link #getSunset()
    +	 * sunset} or {@link #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting).
    +	 * A similar calculation {@link #getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation.
     	 * Since the zman is extremely late and at a point that 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.
     	 * 
    @@ -2858,8 +2891,8 @@ public Instant getTzais90Minutes() {
     	 *         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 {@link AstronomicalCalendar}.
     	 *         documentation.
    -	 * @see getTzais26Degrees()
    -	 * @see getAlos120Minutes()
    +	 * @see #getTzais26Degrees()
    +	 * @see #getAlos120Minutes()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getTzais120Minutes() {
    @@ -2868,7 +2901,7 @@ public Instant getTzais120Minutes() {
     
     	/**
     	 * 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
    +	 * zmaniyos after {@link #getSeaLevelSunset() sea level sunset}. Since the zman
     	 * is extremely late and at a time when the sun is well below the 18° point (scientifically the darkest point) in
     	 * most places on the globe, it should only be used lechumra, such as delaying the start of nighttime
     	 * mitzvos.
    @@ -2881,9 +2914,9 @@ public Instant getTzais120Minutes() {
     	 *         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 {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos120Zmanis()
    -	 * @see getTzais120Minutes()
    -	 * @see getTzais26Degrees()
    +	 * @see #getAlos120Zmanis()
    +	 * @see #getTzais120Minutes()
    +	 * @see #getTzais26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getTzais120Zmanis() {
    @@ -2901,14 +2934,14 @@ public Instant getTzais120Zmanis() {
     	 * "https://www.nli.org.il/en/books/NNL_ALEPH002542826/NLI">Zmanei HaHalacha Lema'aseh (4th edition part 2, pages
     	 * and 22 and 24) and Rabbi Yonah Mertzbuch (in a letter published by Rabbi Manet) are of the opinion that the
     	 * astronomical equinox should be used. The difference adds up to about 9 seconds, too trivial to make much of a
    -	 * difference. For information on how this is calculated see the comments on {@link getAlos16Point1Degrees()}.
    +	 * difference. For information on how this is calculated see the comments on {@link #getAlos16Point1Degrees()}.
     	 * 
     	 * @return the Instant representing the time. 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.
    -	 * @see getTzais72Minutes()
    -	 * @see getAlos16Point1Degrees() for more information on this calculation.
    +	 * @see #getTzais72Minutes()
    +	 * @see #getAlos16Point1Degrees() for more information on this calculation.
     	 */
     	public Instant getTzais16Point1Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_16_POINT_1);
    @@ -2916,7 +2949,7 @@ public Instant getTzais16Point1Degrees() {
     
     	/**
     	 * This method should be used lechumra only and returns tzais based on when the sun is 26°
    -	 * below the horizon. For information on how this is calculated see the comments on {@link getAlos26Degrees()}.
    +	 * below the horizon. For information on how this is calculated see the comments on {@link #getAlos26Degrees()}.
     	 * Since the zman 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.
    @@ -2929,8 +2962,8 @@ public Instant getTzais16Point1Degrees() {
     	 *         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.
    -	 * @see getTzais120Minutes()
    -	 * @see getAlos26Degrees()
    +	 * @see #getTzais120Minutes()
    +	 * @see #getAlos26Degrees()
     	 */
     	@Deprecated (forRemoval=false)
     	public Instant getTzais26Degrees() {
    @@ -2938,42 +2971,42 @@ public Instant getTzais26Degrees() {
     	}
     
     	/**
    -	 * For information on how this is calculated see the comments on {@link getAlos18Degrees()}
    +	 * For information on how this is calculated see the comments on {@link #getAlos18Degrees()}
     	 * 
     	 * @return the Instant representing the time. 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.
    -	 * @see getAlos18Degrees()
    +	 * @see #getAlos18Degrees()
     	 */
     	public Instant getTzais18Degrees() {
     		return getSunsetOffsetByDegrees(ASTRONOMICAL_ZENITH);
     	}
     
     	/**
    -	 * For information on how this is calculated see the comments on {@link getAlos19Point8Degrees()}.
    +	 * For information on how this is calculated see the comments on {@link #getAlos19Point8Degrees()}.
     	 * 
     	 * @return the Instant representing the time. 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.
    -	 * @see getTzais90Minutes()
    -	 * @see getAlos19Point8Degrees()
    +	 * @see #getTzais90Minutes()
    +	 * @see #getAlos19Point8Degrees()
     	 */
     	public Instant getTzais19Point8Degrees() {
     		return getSunsetOffsetByDegrees(ZENITH_19_POINT_8);
     	}
     
     	/**
    -	 * A method to return tzais (dusk) calculated as 96 minutes after {@link getSunset() sunset} or {@link
    -	 * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). For information on how
    -	 * this is calculated see the comments on {@link getAlos96Minutes()}.
    +	 * A method to return tzais (dusk) calculated as 96 minutes after {@link #getSunset() sunset} or {@link
    +	 * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). For information on how
    +	 * this is calculated see the comments on {@link #getAlos96Minutes()}.
     	 * 
     	 * @return the Instant 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,
     	 *         a null will be returned. See detailed explanation on top of the {@link AstronomicalCalendar}
     	 *         documentation.
    -	 * @see getAlos96Minutes()
    +	 * @see #getAlos96Minutes()
     	 */
     	public Instant getTzais96Minutes() {
     		return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS);
    @@ -2996,7 +3029,7 @@ public Instant getTzais96Minutes() {
     	 * 
     	 * @return the Instant representing the local chatzos
     	 * @see GeoLocation#getLocalMeanTimeOffset(Instant)
    -	 * @see getLocalMeanTime(LocalTime)
    +	 * @see #getLocalMeanTime(LocalTime)
     	 */
     	public Instant getFixedLocalChatzosHayom() {
     		return getLocalMeanTime(LocalTime.NOON);
    @@ -3022,8 +3055,8 @@ public Instant getFixedLocalChatzosHayom() {
     	 * @return the Instant representing the moment halfway between molad and molad. If the time occurs between
     	 *         alos and tzais, alos will be returned. If the zman will not occur on this day, a
     	 *         null will be returned.
    -	 * @see getSofZmanKidushLevanaBetweenMoldos()
    -	 * @see getSofZmanKidushLevana15Days(Instant, Instant)
    +	 * @see #getSofZmanKidushLevanaBetweenMoldos()
    +	 * @see #getSofZmanKidushLevana15Days(Instant, Instant)
     	 * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
     	 */
     	public Instant getSofZmanKidushLevanaBetweenMoldos(Instant alos, Instant tzais) {
    @@ -3085,13 +3118,13 @@ private Instant getMoladBasedTime(Instant moladBasedTime, Instant alos, Instant
     	 * halfway between molad and molad. This adds half the 29 days, 12 hours and 793 chalakim time between
     	 * molad and molad (14 days, 18 hours, 22 minutes and 666 milliseconds) to the month's molad.
     	 * The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to between
    -	 * tzais and alos, see {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}.
    +	 * tzais and alos, see {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)}.
     	 * 
     	 * @return the Instant representing the moment halfway between molad and molad. If the time occurs between
     	 *         alos and tzais, alos will be returned. If the zman will not occur on this
     	 *         day, a null will be returned.
    -	 * @see getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)
    -	 * @see getSofZmanKidushLevana15Days()
    +	 * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)
    +	 * @see #getSofZmanKidushLevana15Days()
     	 * @see JewishCalendar#getSofZmanKidushLevanaBetweenMoldos()
     	 */
     	public Instant getSofZmanKidushLevanaBetweenMoldos() {
    @@ -3103,7 +3136,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() {
     	 * opinion brought down in the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
     	 * Rema who brings down the opinion of the Maharil's of calculating
    -	 * {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of
    +	 * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of
     	 * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,
     	 * see Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei Zmanim. If the time of sof zman Kiddush Levana occurs during
    @@ -3123,7 +3156,7 @@ public Instant getSofZmanKidushLevanaBetweenMoldos() {
     	 *         tzais, alos will be returned. If the zman will not occur on this day, a
     	 *         null will be returned.
     	 * 
    -	 * @see getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)
    +	 * @see #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant)
     	 * @see JewishCalendar#getSofZmanKidushLevana15Days()
     	 */
     	public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) {
    @@ -3144,18 +3177,18 @@ public Instant getSofZmanKidushLevana15Days(Instant alos, Instant tzais) {
     	 * the Shulchan Aruch (Orach Chaim 426). It should be noted that some opinions hold that the
     	 * Rema who brings down the opinion of the Maharil's of calculating
    -	 * {@link getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of
    +	 * {@link #getSofZmanKidushLevanaBetweenMoldos(Instant, Instant) half way between molad and molad} is of
     	 * the opinion that the Mechaber agrees to his opinion. Also see the Aruch Hashulchan. For additional details on the subject,
     	 * See Rabbi Dovid Heber's very detailed write-up in Siman Daled (chapter 4) of Shaarei
     	 * Zmanim. The sof zman Kiddush Levana will be returned even if it occurs during the day. To limit the time to
    -	 * between tzais and alos, see {@link getSofZmanKidushLevana15Days(Instant, Instant)}.
    +	 * between tzais and alos, see {@link #getSofZmanKidushLevana15Days(Instant, Instant)}.
     	 * 
     	 * @return the Instant representing the moment 15 days after the molad. If the time occurs between
     	 *         alos and tzais, alos will be returned. If the zman will not occur on this day, a
     	 *         null will be returned.
     	 * 
    -	 * @see getSofZmanKidushLevana15Days(Instant, Instant)
    -	 * @see getSofZmanKidushLevanaBetweenMoldos()
    +	 * @see #getSofZmanKidushLevana15Days(Instant, Instant)
    +	 * @see #getSofZmanKidushLevanaBetweenMoldos()
     	 * @see JewishCalendar#getSofZmanKidushLevana15Days()
     	 * 
     	 */
    @@ -3167,12 +3200,12 @@ public Instant getSofZmanKidushLevana15Days() {
     	 * Returns the earliest time of Kiddush Levana according to Rabbeinu Yonah's opinion that it can be said 3 days after the
     	 * molad. The time will be returned even if it occurs during the day when Kiddush Levana can't be said.
    -	 * Use {@link getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours.
    +	 * Use {@link #getTchilasZmanKidushLevana3Days(Instant, Instant)} if you want to limit the time to night hours.
     	 * 
     	 * @return the Instant representing the moment 3 days after the molad. If the zman will not occur on this day, a
     	 *         null will be returned.
    -	 * @see getTchilasZmanKidushLevana3Days(Instant, Instant)
    -	 * @see getTchilasZmanKidushLevana7Days()
    +	 * @see #getTchilasZmanKidushLevana3Days(Instant, Instant)
    +	 * @see #getTchilasZmanKidushLevana7Days()
     	 * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
     	 */
     	public Instant getTchilasZmanKidushLevana3Days() {
    @@ -3198,8 +3231,8 @@ public Instant getTchilasZmanKidushLevana3Days() {
     	 * @return the Instant representing the moment 3 days after the molad. If the time occurs between alos and
     	 *         tzais, tzais will be returned. If the zman will not occur on this day, a
     	 *         null will be returned.
    -	 * @see getTchilasZmanKidushLevana3Days()
    -	 * @see getTchilasZmanKidushLevana7Days(Instant, Instant)
    +	 * @see #getTchilasZmanKidushLevana3Days()
    +	 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant)
     	 * @see JewishCalendar#getTchilasZmanKidushLevana3Days()
     	 */
     	public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) {
    @@ -3234,8 +3267,8 @@ public Instant getTchilasZmanKidushLevana3Days(Instant alos, Instant tzais) {
     	 * @return the Instant representing the moment of the molad. If the molad does not occur on this day, a
     	 *         null will be returned.
     	 * 
    -	 * @see getTchilasZmanKidushLevana3Days()
    -	 * @see getTchilasZmanKidushLevana7Days(Instant, Instant)
    +	 * @see #getTchilasZmanKidushLevana3Days()
    +	 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant)
     	 * @see JewishCalendar#getMoladAsInstant()
     	 */
     	public Instant getZmanMolad() {
    @@ -3260,7 +3293,7 @@ public Instant getZmanMolad() {
     	/**
     	 * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7
     	 * days after the molad. If the time of tchilas zman Kiddush Levana occurs during the day (between
    -	 * {@link getAlos72Minutes() alos} and {@link getTzais72Minutes() tzais}) it
    +	 * {@link #getAlos72Minutes() alos} and {@link #getTzais72Minutes() tzais}) it
     	 * return the next tzais.
     	 * 
     	 * @param alos
    @@ -3275,8 +3308,8 @@ public Instant getZmanMolad() {
     	 * @return the Instant representing the moment 7 days after the molad. If the time occurs between alos and
     	 *         tzais, tzais will be returned. If the zman will not occur on this day, a
     	 *         null will be returned.
    -	 * @see getTchilasZmanKidushLevana3Days(Instant, Instant)
    -	 * @see getTchilasZmanKidushLevana7Days()
    +	 * @see #getTchilasZmanKidushLevana3Days(Instant, Instant)
    +	 * @see #getTchilasZmanKidushLevana7Days()
     	 * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
     	 */
     	public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) {
    @@ -3297,13 +3330,13 @@ public Instant getTchilasZmanKidushLevana7Days(Instant alos, Instant tzais) {
     	/**
     	 * Returns the earliest time of Kiddush Levana according to the opinions that it should not be said until 7
     	 * days after the molad. The time will be returned even if it occurs during the day when Kiddush Levana
    -	 * can't be recited. Use {@link getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours.
    +	 * can't be recited. Use {@link #getTchilasZmanKidushLevana7Days(Instant, Instant)} if you want to limit the time to night hours.
     	 * 
     	 * @return the Instant representing the moment 7 days after the molad regardless of it is day or night. If the zman
     	 *         will not occur on this day, a null will be returned.
    -	 * @see getTchilasZmanKidushLevana7Days(Instant, Instant)
    +	 * @see #getTchilasZmanKidushLevana7Days(Instant, Instant)
     	 * @see JewishCalendar#getTchilasZmanKidushLevana7Days()
    -	 * @see getTchilasZmanKidushLevana3Days()
    +	 * @see #getTchilasZmanKidushLevana3Days()
     	 */
     	public Instant getTchilasZmanKidushLevana7Days() {
     		return getTchilasZmanKidushLevana7Days(null, null);
    @@ -3312,18 +3345,18 @@ public Instant getTchilasZmanKidushLevana7Days() {
     	/**
     	 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to
     	 * the opinion of the GRA. This time is identical to the {@link
    -	 * getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are
    +	 * #getSofZmanTfilaGRA() Sof zman tfilah GRA} and is provided as a convenience method for those who are
     	 * unaware how this zman is calculated. This time is 4 hours into the day based on the opinion of the
     	 * GRA that the day is calculated from sunrise to sunset.
    -	 * This returns the time 4 * {@link getShaahZmanisGRA()} after {@link getSeaLevelSunrise() sea level sunrise}. If it
    +	 * This returns the time 4 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea level sunrise}. If it
     	 * is not erev Pesach, a null will be returned.
     	 * @return the Instant one is allowed eating 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 returned.
     	 *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanisGRA()
    -	 * @see getSofZmanTfilaGRA()
    -	 * @see getSofZmanAchilasChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanisGRA()
    +	 * @see #getSofZmanTfilaGRA()
    +	 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanAchilasChametzGRA() {
     		return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
    @@ -3332,21 +3365,21 @@ public Instant getSofZmanAchilasChametzGRA() {
     	/**
     	 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
     	 * opinion of the Magen Avraham (MGA) based on alos
    -	 * being {@link getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is identical to the
    -	 * {@link getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link
    -	 * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
    -	 * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
    -	 * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link getShaahZmanis72Minutes()}
    -	 * after {@link getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned.
    +	 * being {@link #getAlos72Minutes() 72} minutes before {@link #getSunset() sunrise}. This time is identical to the
    +	 * {@link #getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link
    +	 * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the
    +	 * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
    +	 * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 4 * {@link #getShaahZmanis72Minutes()}
    +	 * after {@link #getAlos72Minutes() dawn}. If it is not erev Pesach, a null will be returned.
     	 * 
     	 * @return the Instant 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
     	 *         the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72Minutes()
    -	 * @see getAlos72Minutes()
    -	 * @see getSofZmanTfilaMGA72Minutes()
    -	 * @see getSofZmanAchilasChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis72Minutes()
    +	 * @see #getAlos72Minutes()
    +	 * @see #getSofZmanTfilaMGA72Minutes()
    +	 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanAchilasChametzMGA72Minutes() {
     		return getSofZmanAchilasChametz(getAlos72Minutes(), getTzais72Minutes(), true);
    @@ -3355,22 +3388,22 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() {
     	/**
     	 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion
     	 * of the Magen Avraham (MGA) based on alos being {@link
    -	 * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunset() sunrise}. This time is identical to the
    -	 * {@link getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link
    -	 * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
    -	 * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
    -	 * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 4 * {@link
    -	 * getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be
    +	 * #getAlos72Zmanis() 72 zmaniyos} minutes before {@link #getSunset() sunrise}. This time is identical to the
    +	 * {@link #getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link
    +	 * #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the
    +	 * opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
    +	 * {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 4 * {@link
    +	 * #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not erev Pesach, a null will be
     	 * returned.
     	 *
     	 * @return the Instant 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
     	 *         the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72MinutesZmanis()
    -	 * @see getAlos72Zmanis()
    -	 * @see getSofZmanTfilaMGA72MinutesZmanis()
    -	 * @see getSofZmanAchilasChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis72MinutesZmanis()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getSofZmanTfilaMGA72MinutesZmanis()
    +	 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() {
     		return getSofZmanAchilasChametz(getAlos72Zmanis(), getTzais72Zmanis(), true);
    @@ -3379,20 +3412,20 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() {
     	/**
     	 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
     	 * opinion of the Magen Avraham (MGA) based on alos
    -	 * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunset() sunrise}. This time is 4 {@link
    -	 * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based
    +	 * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunset() sunrise}. This time is 4 {@link
    +	 * #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees() dawn} based
     	 * on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or
    -	 * sunset. This returns the time of 4 {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}.
    +	 * sunset. This returns the time of 4 {@link #getShaahZmanis16Point1Degrees()} after {@link #getAlos16Point1Degrees() dawn}.
     	 * If it is not erev Pesach, a null will be returned.
     	 * 
     	 * @return the Instant of the latest time of eating chametz. If it is not erev Pesach or 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.
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getSofZmanTfilaMGA16Point1Degrees()
    -	 * @see getSofZmanAchilasChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getSofZmanTfilaMGA16Point1Degrees()
    +	 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanAchilasChametzMGA16Point1Degrees() {
     		return getSofZmanAchilasChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true);
    @@ -3402,14 +3435,14 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() {
     	 * 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
    -	 * sunrise to sunset. This returns the time 5 * {@link getShaahZmanisGRA()} after {@link getSeaLevelSunrise() sea
    +	 * sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisGRA()} after {@link #getSeaLevelSunrise() sea
     	 * level sunrise}. If it is not  erev Pesach, a null will be returned.
     	 * @return the Instant 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
     	 *         returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanisGRA()
    -	 * @see getSofZmanBiurChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanisGRA()
    +	 * @see #getSofZmanBiurChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanBiurChametzGRA() {
     		return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true);
    @@ -3418,18 +3451,18 @@ public Instant getSofZmanBiurChametzGRA() {
     	/**
     	 * 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
    -	 * getAlos72Minutes() 72} minutes before {@link getSunset() sunrise}. This time is 5 {@link
    -	 * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the
    -	 * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
    -	 * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link getShaahZmanis72Minutes()}
    -	 * after {@link getAlos72Minutes() dawn}. If it is not  erev Pesach, a null will be returned.
    +	 * #getAlos72Minutes() 72} minutes before {@link #getSunset() sunrise}. This time is 5 {@link
    +	 * #getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link #getAlos72Minutes() dawn} based on the
    +	 * opinion of the MGA that the day is calculated from a {@link #getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link
    +	 * #getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link #getShaahZmanis72Minutes()}
    +	 * after {@link #getAlos72Minutes() dawn}. If it is not  erev Pesach, a null will be returned.
     	 * @return the Instant 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
     	 *         returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72Minutes()
    -	 * @see getAlos72Minutes()
    -	 * @see getSofZmanBiurChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis72Minutes()
    +	 * @see #getAlos72Minutes()
    +	 * @see #getSofZmanBiurChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanBiurChametzMGA72Minutes() {
     		return getSofZmanBiurChametz(getAlos72Minutes(), getTzais72Minutes(), true);
    @@ -3438,19 +3471,19 @@ public Instant getSofZmanBiurChametzMGA72Minutes() {
     	/**
     	 * 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
    -	 * getAlos72Zmanis() 72} minutes zmanis before {@link getSunset() sunrise}. This time is 5 {@link
    -	 * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() dawn} based on the
    -	 * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
    -	 * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link
    -	 * getShaahZmanis72MinutesZmanis()} after {@link getAlos72Zmanis() dawn}. If it is not  erev Pesach, a null will be
    +	 * #getAlos72Zmanis() 72} minutes zmanis before {@link #getSunset() sunrise}. This time is 5 {@link
    +	 * #getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link #getAlos72Zmanis() dawn} based on the
    +	 * opinion of the MGA that the day is calculated from a {@link #getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to
    +	 * {@link #getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link
    +	 * #getShaahZmanis72MinutesZmanis()} after {@link #getAlos72Zmanis() dawn}. If it is not  erev Pesach, a null will be
     	 * returned.
     	 * @return the Instant 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
     	 *         returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanis72MinutesZmanis()
    -	 * @see getAlos72Zmanis()
    -	 * @see getSofZmanBiurChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis72MinutesZmanis()
    +	 * @see #getAlos72Zmanis()
    +	 * @see #getSofZmanBiurChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanBiurChametzMGA72MinutesZmanis() {
     		return getSofZmanBiurChametz(getAlos72Zmanis(), getTzais72Zmanis(), true);
    @@ -3459,20 +3492,20 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() {
     	/**
     	 * 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 getSunset() sunrise}. This time is 5
    -	 * {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees()
    +	 * being {@link #getAlos16Point1Degrees() 16.1°} before {@link #getSunset() sunrise}. This time is 5
    +	 * {@link #getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link #getAlos16Point1Degrees()
     	 * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1°
    -	 * below sunrise or sunset. This returns the time of 5 {@link getShaahZmanis16Point1Degrees()} after
    -	 * {@link getAlos16Point1Degrees() dawn}. If it is not  erev Pesach, a null will be returned.
    +	 * below sunrise or sunset. This returns the time of 5 {@link #getShaahZmanis16Point1Degrees()} after
    +	 * {@link #getAlos16Point1Degrees() dawn}. If it is not  erev Pesach, a null will be returned.
     	 * @return the Instant 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 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.
     	 * 
    -	 * @see getShaahZmanis16Point1Degrees()
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getSofZmanBiurChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis16Point1Degrees()
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getSofZmanBiurChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanBiurChametzMGA16Point1Degrees() {
     		return getSofZmanBiurChametz(getAlos16Point1Degrees(), getTzais16Point1Degrees(), true);
    @@ -3480,28 +3513,28 @@ public Instant getSofZmanBiurChametzMGA16Point1Degrees() {
     
     	/**
     	 * A method that returns the Baal Hatanya's
    -	 * a shaah zmanis ({@link getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the
    +	 * a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}). This forms the base for the
     	 * Baal Hatanya's  day  based calculations that are calculated as a 1.583° 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.
    -	 * A method that returns a shaah zmanis ({@link getTemporalHour(Instant, Instant) temporal hour}) calculated 
    +	 * A method that returns a shaah zmanis ({@link #getTemporalHour(Instant, Instant) temporal hour}) calculated 
     	 * based on the Baal Hatanya's netz
     	 * amiti and shkiah amiti using a dip of 1.583° below the sea level horizon. This calculation divides
    -	 * the day based on the opinion of the Baal Hatanya that the day runs from {@link getSunriseBaalHatanya() netz amiti}
    -	 * to {@link getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link
    -	 * getSunriseBaalHatanya() sea level netz amiti} to {@link getSunsetBaalHatanya() sea level shkiah amiti}.
    +	 * the day based on the opinion of the Baal Hatanya that the day runs from {@link #getSunriseBaalHatanya() netz amiti}
    +	 * to {@link #getSunsetBaalHatanya() shkiah amiti}. The calculations are based on a day from {@link
    +	 * #getSunriseBaalHatanya() sea level netz amiti} to {@link #getSunsetBaalHatanya() sea level shkiah amiti}.
     	 * The day is split into 12 equal parts with each one being a shaah zmanis. This method is similar to {@link
    -	 * getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.
    +	 * #getTemporalHour}, but all calculations are based on a sea level sunrise and sunset.
     	 * @return the long millisecond length of a shaah zmanis calculated from
    -	 *         {@link getSunriseBaalHatanya() netz amiti (sunrise)} to {@link getSunsetBaalHatanya() shkiah amiti
    +	 *         {@link #getSunriseBaalHatanya() netz amiti (sunrise)} to {@link #getSunsetBaalHatanya() shkiah amiti
     	 *         ("real" 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, and one where it does not set, {@link Long#MIN_VALUE} will be returned. See
     	 *         detailed explanation on top of the {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getTemporalHour(Instant, Instant)
    -	 * @see getSunriseBaalHatanya()
    -	 * @see getSunsetBaalHatanya()
    +	 * @see #getTemporalHour(Instant, Instant)
    +	 * @see #getSunriseBaalHatanya()
    +	 * @see #getSunsetBaalHatanya()
     	 * @see ZENITH_1_POINT_583
     	 */
     	public long getShaahZmanisBaalHatanya() {
    @@ -3511,10 +3544,10 @@ public long getShaahZmanisBaalHatanya() {
     	/**
     	 * Returns the Baal Hatanya's alos
     	 * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link GEOMETRIC_ZENITH geometric horizon}
    -	 * before {@link getSunset() sunrise}. It is based on the calculation that the time between dawn and
    +	 * before {@link #getSunset() sunrise}. It is based on the calculation that the time between dawn and
     	 * netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes
     	 * a mil (Rambam and others). The sun's position at 72
    -	 * minutes before {@link getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem netz amiti (sunrise)} in Jerusalem around the equinox / equilux is
     	 * 16.9° below {@link GEOMETRIC_ZENITH geometric zenith}.
     	 * 
    @@ -3529,13 +3562,13 @@ public Instant getAlosBaalHatanya() {
     
     	/**
     	 * This method returns the latest zman krias shema (time to recite Shema in the morning). This time is 3
    -	 * {@link getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link getSunriseBaalHatanya() 
    +	 * {@link #getShaahZmanisBaalHatanya() shaos zmaniyos} (solar hours) after {@link #getSunriseBaalHatanya() 
     	 * netz amiti (sunrise)} based on the opinion of the Baal Hatanya that the day is calculated from
    -	 * sunrise to sunset. This returns the time 3 * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() 
    +	 * sunrise to sunset. This returns the time 3 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() 
     	 * netz amiti (sunrise)}.
     	 * 
    -	 * @see getSofZmanShma(Instant, Instant)
    -	 * @see getShaahZmanisBaalHatanya()
    +	 * @see #getSofZmanShma(Instant, Instant)
    +	 * @see #getShaahZmanisBaalHatanya()
     	 * @return the Instant of the latest zman shema according to the Baal Hatanya. 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
    @@ -3548,11 +3581,11 @@ public Instant getSofZmanShmaBaalHatanya() {
     	/**
     	 * This method returns the latest zman tfilah (time to recite the morning prayers). This time is 4
     	 * hours into the day based on the opinion of the Baal Hatanya that the day is
    -	 * calculated from sunrise to sunset. This returns the time 4 * {@link getShaahZmanisBaalHatanya()} after
    -	 * {@link getSunriseBaalHatanya() netz amiti (sunrise)}.
    +	 * calculated from sunrise to sunset. This returns the time 4 * {@link #getShaahZmanisBaalHatanya()} after
    +	 * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}.
     	 * 
    -	 * @see getSofZmanTfila(Instant, Instant)
    -	 * @see getShaahZmanisBaalHatanya()
    +	 * @see #getSofZmanTfila(Instant, Instant)
    +	 * @see #getShaahZmanisBaalHatanya()
     	 * @return the Instant of the latest zman tfilah. 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
    @@ -3564,18 +3597,18 @@ public Instant getSofZmanTfilaBaalHatanya() {
     
     	/**
     	 * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the
    -	 * opinion of the Baal Hatanya. This time is identical to the {@link getSofZmanTfilaBaalHatanya() Sof zman
    +	 * opinion of the Baal Hatanya. This time is identical to the {@link #getSofZmanTfilaBaalHatanya() Sof zman
     	 * tfilah Baal Hatanya}. This time is 4 hours into the day based on the opinion of the Baal Hatanya that the day
    -	 * is calculated from sunrise to sunset. This returns the time 4 {@link getShaahZmanisBaalHatanya()} after
    -	 * {@link getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not  erev Pesach, a null will be
    +	 * is calculated from sunrise to sunset. This returns the time 4 {@link #getShaahZmanisBaalHatanya()} after
    +	 * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not  erev Pesach, a null will be
     	 * returned.
     	 * @return the Instant one is allowed eating 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 returned.
     	 *         See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanisBaalHatanya()
    -	 * @see getSofZmanTfilaBaalHatanya()
    -	 * @see getSofZmanAchilasChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanisBaalHatanya()
    +	 * @see #getSofZmanTfilaBaalHatanya()
    +	 * @see #getSofZmanAchilasChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanAchilasChametzBaalHatanya() {
     		return getSofZmanAchilasChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true);
    @@ -3584,14 +3617,14 @@ public Instant getSofZmanAchilasChametzBaalHatanya() {
     	/**
     	 * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of
     	 * the Baal Hatanya. This time is 5 hours into the day based on the opinion of the Baal Hatanya that the day is calculated
    -	 * from sunrise to sunset. This returns the time 5 * {@link getShaahZmanisBaalHatanya()} after
    -	 * {@link getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not  erev Pesach, a null will be returned.
    +	 * from sunrise to sunset. This returns the time 5 * {@link #getShaahZmanisBaalHatanya()} after
    +	 * {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. If it is not  erev Pesach, a null will be returned.
     	 * @return the Instant 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
     	 *         returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation.
    -	 * @see getShaahZmanisBaalHatanya()
    -	 * @see getSofZmanBiurChametz(Instant, Instant, boolean)
    +	 * @see #getShaahZmanisBaalHatanya()
    +	 * @see #getSofZmanBiurChametz(Instant, Instant, boolean)
     	 */
     	public Instant getSofZmanBiurChametzBaalHatanya() {
     		return getSofZmanBiurChametz(getSunriseBaalHatanya(), getSunsetBaalHatanya(), true);
    @@ -3600,20 +3633,20 @@ public Instant getSofZmanBiurChametzBaalHatanya() {
     	/**
     	 * This method returns the time of mincha gedola. Mincha gedola is the earliest time one can pray
     	 * mincha. The Rambam is of the opinion that it is
    -	 * better to delay mincha until {@link getMinchaKetanaBaalHatanya() mincha ketana} while the
    +	 * better to delay mincha until {@link #getMinchaKetanaBaalHatanya() mincha ketana} while the
     	 * Ra"sh,
     	 * Tur, GRA and others are of the opinion that mincha can be prayed
    -	 * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link getShaahZmanisBaalHatanya()
    -	 * sea level solar hours} after {@link getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based
    +	 * lechatchila starting at mincha gedola. This is calculated as 6.5 {@link #getShaahZmanisBaalHatanya()
    +	 * sea level solar hours} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. This calculation is based
     	 * on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time 6.5
    -	 * * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() netz amiti ("real" sunrise)}.
    +	 * * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti ("real" sunrise)}.
     	 * @todo Consider adjusting this to calculate the time as 30 clock or zmaniyos  minutes after either {@link
    -	 *         getSunTransit() astronomical chatzos} or {@link getChatzosHayomAsHalfDay() chatzos as half a
    -	 *          day} for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}.
    -	 * @see getMinchaGedola(Instant, Instant)
    -	 * @see getShaahZmanisBaalHatanya()
    -	 * @see getMinchaKetanaBaalHatanya()
    +	 *         getSunTransit() astronomical chatzos} or {@link #getChatzosHayomAsHalfDay() chatzos as half a
    +	 *          day} for {@link AstronomicalCalculator calculators} that support it, based on {@link #isUseAstronomicalChatzos()}.
    +	 * @see #getMinchaGedola(Instant, Instant)
    +	 * @see #getShaahZmanisBaalHatanya()
    +	 * @see #getMinchaKetanaBaalHatanya()
     	 * @return the Instant of the time of mincha gedola according to the Baal Hatanya. 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
    @@ -3626,15 +3659,15 @@ public Instant getMinchaGedolaBaalHatanya() {
     	/**
     	 * This method returns the time of mincha ketana. This is the preferred earliest time to pray
     	 * mincha in the opinion of the Rambam and others.
    -	 * For more information on this see the documentation on {@link getMinchaGedolaBaalHatanya() mincha gedola}.
    -	 * This is calculated as 9.5 {@link getShaahZmanisBaalHatanya()  sea level solar hours} after {@link getSunriseBaalHatanya()
    +	 * For more information on this see the documentation on {@link #getMinchaGedolaBaalHatanya() mincha gedola}.
    +	 * This is calculated as 9.5 {@link #getShaahZmanisBaalHatanya()  sea level solar hours} after {@link #getSunriseBaalHatanya()
     	 * netz amiti (sunrise)}. This calculation is calculated based on the opinion of the Baal Hatanya that the
    -	 * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link getShaahZmanisBaalHatanya()} after {@link
    -	 * getSunriseBaalHatanya() netz amiti (sunrise)}.
    +	 * day is calculated from sunrise to sunset. This returns the time 9.5 * {@link #getShaahZmanisBaalHatanya()} after {@link
    +	 * #getSunriseBaalHatanya() netz amiti (sunrise)}.
     	 * 
    -	 * @see getMinchaKetana(Instant, Instant)
    -	 * @see getShaahZmanisBaalHatanya()
    -	 * @see getMinchaGedolaBaalHatanya()
    +	 * @see #getMinchaKetana(Instant, Instant)
    +	 * @see #getShaahZmanisBaalHatanya()
    +	 * @see #getMinchaGedolaBaalHatanya()
     	 * @return the Instant of the time of mincha ketana. 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
    @@ -3647,11 +3680,11 @@ public Instant getMinchaKetanaBaalHatanya() {
     	/**
     	 * This method returns the time of plag hamincha. This is calculated as 10.75 hours after sunrise. This calculation
     	 * is based on the opinion of the Baal Hatanya that the day is calculated from sunrise to sunset. This returns the time
    -	 * 10.75 * {@link getShaahZmanisBaalHatanya()} after {@link getSunriseBaalHatanya() netz amiti (sunrise)}. See
    +	 * 10.75 * {@link #getShaahZmanisBaalHatanya()} after {@link #getSunriseBaalHatanya() netz amiti (sunrise)}. See
     	 * About Our
     	 * Zmanim Calculations @ Chabad.org for more details on this calculation.
     	 * 
    -	 * @see getPlagHamincha(Instant, Instant)
    +	 * @see #getPlagHamincha(Instant, Instant)
     	 * @return the Instant of the time of plag hamincha. 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
    @@ -3663,25 +3696,25 @@ public Instant getPlagHaminchaBaalHatanya() {
     
     	/**
     	 * A method that returns tzais (nightfall) when the sun is 6° below the western geometric horizon (90°)
    -	 * after {@link getSunset() sunset}.  This tzais / nightfall based on the opinion of the  tzais / nightfall based on the opinion of the  Baal Hatanya. This calculation is based on the position of the
    -	 * sun about 24 minutes after {@link getSeaLevelSunset() sunset} in Jerusalem around the equinox / equilux, which
     	 * is 6° below {@link GEOMETRIC_ZENITH geometric zenith}. See About Our Zmanim
    -	 * Calculations @ Chabad.org that is based on {@link getSunsetBaalHatanya() shkiah amitis as
    +	 * Calculations @ Chabad.org that is based on {@link #getSunsetBaalHatanya() shkiah amitis as
     	 * 1.583° below the horizon} calculated around the equinox / equilux that computes 3.516 minutes after sunset. To this, 18 minutes of 3/4 of a 24-minute mil and
     	 * two minutes for bain hashmashos of Rav Yosi is added. This calculation computes the the sun being 5.83° below
    -	 * the horizon (very close to the slightly later {@link getTzaisGeonim5Point95Degrees()} that was calculated based on 4 fixed
    +	 * the horizon (very close to the slightly later {@link #getTzaisGeonim5Point95Degrees()} that was calculated based on 4 fixed
     	 * minutes) and it is rounded up to 6°.
     	 * 
     	 * @return The Instant of nightfall. 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.
    -	 * @see getTzaisGeonim5Point95Degrees()
    -	 * @see getSunsetBaalHatanya()
    +	 * @see #getTzaisGeonim5Point95Degrees()
    +	 * @see #getSunsetBaalHatanya()
     	 */
     	public Instant getTzaisBaalHatanya() {
     		return getSunsetOffsetByDegrees(ZENITH_6_DEGREES);
    @@ -3692,16 +3725,16 @@ public Instant getTzaisBaalHatanya() {
     	 * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) that the
     	 * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
    -	 * at alos defined as {@link getAlos18Degrees() 18°} and ends at {@link getFixedLocalChatzosHayom() fixed local
    +	 * at alos defined as {@link #getAlos18Degrees() 18°} and ends at {@link #getFixedLocalChatzosHayom() fixed local
     	 * chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after alos or half of this half-day.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getAlos18Degrees()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getAlos18Degrees()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getAlos18Degrees(), getFixedLocalChatzosHayom(), 3);
    @@ -3712,16 +3745,16 @@ public Instant getSofZmanShmaMGA18DegreesToFixedLocalChatzos() {
     	 * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) that the day is calculated
     	 * from dawn to nightfall, but calculated using the first half of the day only. The half a day starts at alos defined
    -	 * as {@link getAlos16Point1Degrees() 16.1°} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof Zman
    +	 * as {@link #getAlos16Point1Degrees() 16.1°} and ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. Sof Zman
     	 * Shema is 3 shaos zmaniyos (solar hours) after this alos or half of this half-day.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getAlos16Point1Degrees()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getAlos16Point1Degrees()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getAlos16Point1Degrees(), getFixedLocalChatzosHayom(), 3);
    @@ -3732,7 +3765,7 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() {
     	 * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) that the
     	 * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
    -	 * at alos defined as {@link getAlos90Minutes() 90 minutes before sunrise} and ends at {@link getFixedLocalChatzosHayom()
    +	 * at alos defined as {@link #getAlos90Minutes() 90 minutes before sunrise} and ends at {@link #getFixedLocalChatzosHayom()
     	 * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
     	 * half of this half-day.
     	 * 
    @@ -3740,9 +3773,9 @@ public Instant getSofZmanShmaMGA16Point1DegreesToFixedLocalChatzos() {
     	 *         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.
    -	 * @see getAlos90Minutes()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getAlos90Minutes()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getAlos90Minutes(), getFixedLocalChatzosHayom(), 3);
    @@ -3753,7 +3786,7 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() {
     	 * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the
     	 * opinion of the Magen Avraham (MGA) that the
     	 * day is calculated from dawn to nightfall, but calculated using the first half of the day only. The half a day starts
    -	 * at alos defined as {@link getAlos72Minutes() 72 minutes before sunrise} and ends at {@link getFixedLocalChatzosHayom()
    +	 * at alos defined as {@link #getAlos72Minutes() 72 minutes before sunrise} and ends at {@link #getFixedLocalChatzosHayom()
     	 * fixed local chatzos}. Sof Zman Shema is 3 shaos zmaniyos (solar hours) after this alos or
     	 * half of this half-day.
     	 * 
    @@ -3761,9 +3794,9 @@ public Instant getSofZmanShmaMGA90MinutesToFixedLocalChatzos() {
     	 *         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.
    -	 * @see getAlos72Minutes()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getAlos72Minutes()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getAlos72Minutes(), getFixedLocalChatzosHayom(), 3);
    @@ -3773,17 +3806,17 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() {
     	 * This method returns Rav Moshe Feinstein's opinion of the
     	 * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion
     	 * of the GRA that the day is calculated from sunrise to sunset, but
    -	 * calculated using the first half of the day only. The half a day starts at {@link getSunset() sunrise} and
    -	 * ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar
    +	 * calculated using the first half of the day only. The half a day starts at {@link #getSunset() sunrise} and
    +	 * ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar
     	 * hours) after sunrise or half of this half-day.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getSunset()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getSunset()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3);
    @@ -3794,16 +3827,16 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() {
     	 * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers))
     	 * according to the opinion of the GRA that the day is
     	 * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at
    -	 * {@link getSunset() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman
    +	 * {@link #getSunset() sunrise} and ends at {@link #getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman
     	 * tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day.
     	 * 
     	 * @return the Instant of the latest zman krias shema. 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.
    -	 * @see getSunset()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getSunset()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() {
     		return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4);
    @@ -3812,7 +3845,7 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() {
     	/**
     	 * This method returns Rav Moshe Feinstein's opinion of
     	 * the calculation of mincha gedola, the earliest time one can pray mincha according to theGRA calculated as 30 minutes after {@link getFixedLocalChatzosHayom() fixed
    +	 * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA calculated as 30 minutes after {@link #getFixedLocalChatzosHayom() fixed
     	 * local chatzos}.
     	 * 
     	 * @return the Instant of the time of mincha gedola. If the calculation can't be computed such as
    @@ -3820,9 +3853,9 @@ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() {
     	 *         does not set, a null will be returned. See detailed explanation on top of the
     	 *         {@link AstronomicalCalendar} documentation.
     	 * 
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getMinchaKetanaGRAFixedLocalChatzosToSunset
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
     	 */
     	public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() {
     		return getTimeOffset(getFixedLocalChatzosHayom(), MINUTE_MILLIS * 30);
    @@ -3833,17 +3866,17 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() {
     	 * of the calculation of mincha ketana (the preferred time to recite the mincha prayers according to
     	 * the opinion of the Rambam and others) calculated according
     	 * to the GRA that is 3.5 shaos zmaniyos (solar
    -	 * hours) after {@link getFixedLocalChatzosHayom() fixed local chatzos}.
    +	 * hours) after {@link #getFixedLocalChatzosHayom() fixed local chatzos}.
     	 * 
     	 * @return the Instant of the time of mincha gedola. 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
     	 *         {@link AstronomicalCalendar} documentation.
     	 *         
    -	 * @see getMinchaGedolaGRA()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getMinchaGedolaGRA()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() {
     		return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5);
    @@ -3853,26 +3886,26 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() {
     	 * This method returns Rav Moshe Feinstein's opinion
     	 * of the calculation of plag hamincha. This method returns plag hamincha calculated according to the
     	 * GRA that the day ends at sunset and is 4.75 shaos
    -	 * zmaniyos (solar hours) after {@link getFixedLocalChatzosHayom() fixed local chatzos}.
    +	 * zmaniyos (solar hours) after {@link #getFixedLocalChatzosHayom() fixed local chatzos}.
     	 * 
     	 * @return the Instant of the time of mincha gedola. 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
     	 *         {@link AstronomicalCalendar} documentation.
     	 *         
    -	 * @see getPlagHaminchaGRA()
    -	 * @see getFixedLocalChatzosHayom()
    -	 * @see getMinchaKetanaGRAFixedLocalChatzosToSunset
    -	 * @see getMinchaGedolaGRAFixedLocalChatzos30Minutes
    -	 * @see getHalfDayBasedZman(Instant, Instant, double)
    +	 * @see #getPlagHaminchaGRA()
    +	 * @see #getFixedLocalChatzosHayom()
    +	 * @see #getMinchaKetanaGRAFixedLocalChatzosToSunset
    +	 * @see #getMinchaGedolaGRAFixedLocalChatzos30Minutes
    +	 * @see #getHalfDayBasedZman(Instant, Instant, double)
     	 */
     	public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() {
     		return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75);
     	}
     	
     	/**
    -	 * Method to return tzais (dusk) calculated as 50 minutes after {@link getSunset() sunset} or {@link
    -	 * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). This method returns
    +	 * Method to return tzais (dusk) calculated as 50 minutes after {@link #getSunset() sunset} or {@link
    +	 * #getSeaLevelSunset() sea level sunset} (depending on the {@link #isUseElevation()} setting). 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 other than ones similar to the latitude of the NY area.
     	 * 
    @@ -3887,17 +3920,17 @@ public Instant getTzais50Minutes() {
     	
     	/**
     	 * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
    -	 * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of
    +	 * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of
     	 * the day, calculated according to the GRA using a day starting at
     	 * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha.
    -	 * The calculation used is 9 * {@link getShaahZmanisGRA()} after {@link getSunset() sunrise} or {@link
    -	 * getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link isUseElevation()} setting). See the
    +	 * The calculation used is 9 * {@link #getShaahZmanisGRA()} after {@link #getSunset() sunrise} or {@link
    +	 * #getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link #isUseElevation()} setting). See the
     	 * Mechaber and Mishna Berurah 232 and 249:2.
     	 * 
    -	 * @see getShaahZmanisGRA()
    -	 * @see getSamuchLeMinchaKetana(Instant, Instant, boolean)
    -	 * @see isUseAstronomicalChatzosForOtherZmanim()
    +	 * @see #getShaahZmanisGRA()
    +	 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean)
    +	 * @see #isUseAstronomicalChatzosForOtherZmanim()
     	 * @return the Instant of the time of samuch lemincha 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
    @@ -3910,16 +3943,16 @@ public Instant getSamuchLeMinchaKetanaGRA() {
     	/**
     	 * 
     	 * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
    -	 * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based
    -	 * on a day from   and ending  a day starting at {@link getMinchaGedola16Point1Degrees() alos 16.1°} and ending
    -	 * at {@link getTzais72Minutes() tzais 16.1°}. This is the time that eating or other activity can't begin prior to
    -	 * praying mincha.  The calculation used is 9 * {@link getShaahZmanis16Point1Degrees()} after {@link
    -	 * getAlos16Point1Degrees() alos 16.1°}. See the shaos zmaniyos (solar hours) after the start of the day, calculated based
    +	 * on a day from   and ending  a day starting at {@link #getMinchaGedola16Point1Degrees() alos 16.1°} and ending
    +	 * at {@link #getTzais72Minutes() tzais 16.1°}. This is the time that eating or other activity can't begin prior to
    +	 * praying mincha.  The calculation used is 9 * {@link #getShaahZmanis16Point1Degrees()} after {@link
    +	 * #getAlos16Point1Degrees() alos 16.1°}. See the Mechaber and Mishna Berurah 232 and 249:2.
     	 * 
    -	 * @see getSamuchLeMinchaKetana(Instant, Instant, boolean)
    -	 * @see getShaahZmanis16Point1Degrees()
    +	 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis16Point1Degrees()
     	 * @return the Instant of the time of samuch lemincha 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.
    @@ -3932,15 +3965,15 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() {
     	/**
     	 * 
     	 * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before
    -	 * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based
    -	 * on a day from   and ending  a day starting at {@link getAlos72Minutes() alos 72 minutes} and ending at {@link
    -	 * getTzais72Minutes() tzais 72 minutes}. This is the time that eating or other activity can't begin prior to praying
    -	 * mincha. The calculation used is 9 * {@link getShaahZmanis72Minutes()} after {@link getAlos72Minutes() alos
    +	 * {@link #getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of the day, calculated based
    +	 * on a day from   and ending  a day starting at {@link #getAlos72Minutes() alos 72 minutes} and ending at {@link
    +	 * #getTzais72Minutes() tzais 72 minutes}. This is the time that eating or other activity can't begin prior to praying
    +	 * mincha. The calculation used is 9 * {@link #getShaahZmanis72Minutes()} after {@link #getAlos72Minutes() alos
     	 * 72 minutes}. See the Mechaber and Mishna Berurah
     	 * 232 and 249:2.
     	 * 
    -	 * @see getSamuchLeMinchaKetana(Instant, Instant, boolean)
    -	 * @see getShaahZmanis72Minutes()
    +	 * @see #getSamuchLeMinchaKetana(Instant, Instant, boolean)
    +	 * @see #getShaahZmanis72Minutes()
     	 * @return the Instant of the time of samuch lemincha 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.
    @@ -3949,7 +3982,7 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() {
     	public Instant getSamuchLeMinchaKetana72Minutes() {
     		return getSamuchLeMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true);
     	}
    -	
    +
     	/**
     	 * @see java.lang.Object#equals(Object)
     	 */
    
    From 197ae00b4e5b27c79b0389e56ae48d827fe90119 Mon Sep 17 00:00:00 2001
    From: KosherJava 
    Date: Thu, 14 May 2026 17:22:13 -0400
    Subject: [PATCH 112/121] Refactor getMinchaGedolaGRAGreaterThan30()
    
    Remove logic that exists in the getMinchaGedolaGreaterThan30(Instant) method.
    ---
     .../com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java | 7 +------
     1 file changed, 1 insertion(+), 6 deletions(-)
    
    diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
    index c64e5f8b..a2032fe3 100644
    --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
    +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java
    @@ -1739,12 +1739,7 @@ public Instant getMinchaGedolaGreaterThan30(Instant minchaGedola) {
     	 * @see #isUseAstronomicalChatzos()
     	 */
     	public Instant getMinchaGedolaGRAGreaterThan30() {
    -		if (getMinchaGedola30Minutes() == null || getMinchaGedolaGRA() == null) {
    -			return null;
    -		} else {
    -			return getMinchaGedola30Minutes().compareTo(getMinchaGedolaGRA()) > 0 ? getMinchaGedola30Minutes()
    -					: getMinchaGedolaGRA();
    -		}
    +		return getMinchaGedolaGreaterThan30(getMinchaGedolaGRA());
     	}
     
     	/**
    
    From fee2d22e6e63dff03727278c1ea859f1a7ea2483 Mon Sep 17 00:00:00 2001
    From: KosherJava 
    Date: Thu, 14 May 2026 17:26:32 -0400
    Subject: [PATCH 113/121] Clarify CHANGELOG regarding MinchaGedola
    
    ---
     CHANGELOG.md | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/CHANGELOG.md b/CHANGELOG.md
    index 8fcf1729..462d6b24 100644
    --- a/CHANGELOG.md
    +++ b/CHANGELOG.md
    @@ -69,7 +69,8 @@
     * Tweaked logic in `AstronomicalCalendar.getInstantFromTime()` to address issues near the dateline.
     * Improve null handling in `ComprehensiveZmanimCalendar.getMoladBasedTime()`
     * Add `ComprehensiveZmanimCalendar.getMisheyakir12Point85Degrees()`
    -* `ComprehensiveZmanimcalendar.getMinchaGedolaGreaterThan30()` was moved to the parent `ZmanimCalendar.getMinchaGedolaGreaterThan30(Instant)` that allows it to work with any mincha gedola claculation.
    +* Add  `getMinchaGedolaGreaterThan30(Instant)` that allows it to work with any mincha gedola claculation.
    +* `ComprehensiveZmanimcalendar.getMinchaGedolaGreaterThan30()` was renamed `getMinchaGedolaGRAGreaterThan30()` for clarity.
     * Change / remove `ComprehensiveZmanimcalendar` zmanim that were too early.
       * `getTzaisGeonim4Point37Degrees()` -> `getTzaisGeonim4Point42Degrees()`.
       * `getTzaisGeonim4Point61Degrees()` -> `getTzaisGeonim4Point66Degrees()`
    
    From 46909dac476f4bc86bbc40011c73328bea42f015 Mon Sep 17 00:00:00 2001
    From: KosherJava 
    Date: Thu, 14 May 2026 21:43:58 -0400
    Subject: [PATCH 114/121] Add getTimeAtAzimuth() to the AstronomicalCalculator
    
    Will be used for calculating zmanim in the Arctic according to some opinions.
    ---
     .../zmanim/util/AstronomicalCalculator.java        | 14 ++++++++++++++
     1 file changed, 14 insertions(+)
    
    diff --git a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java
    index 245b1fba..055403ed 100644
    --- a/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java
    +++ b/src/main/java/com/kosherjava/zmanim/util/AstronomicalCalculator.java
    @@ -192,6 +192,20 @@ public abstract double getUTCSunset(LocalDate localDate, GeoLocation geoLocation
     	 */
     	public abstract double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation);
     	
    +	/**
    +	 * Returns the time that the azimuth will occur for the date and location passed to this method. As an example, to know
    +	 * when the sun will be directly west, pass in an azimuth of 270°, and for directly east, pass in an azimith of 90°.
    +	 * 
    +	 * @param localDate The LocalDate representing the date to calculate the time of the azimuth for.
    +	 * @param geoLocation The location information used for astronomical calculation of solar times.
    +	 * @param azimuth the azimuth to run the calculation for
    +	 * 
    +	 * @return The UTC time that the azimuth will be reached in a 24-hour double format. 5:45:00 PM will return 17.75.
    +	 *            If an error was encountered in the calculation (expected behavior for some locations such as near the poles, a
    +	 *            {@link Double#NaN} will be returned.
    +	 */
    +	public abstract double getTimeAtAzimuth(LocalDate localDate, GeoLocation geoLocation, double azimuth);
    +	
     	/**
     	 * Return the Solar Elevation for the
     	 * horizontal coordinate system at the given location at the given time. Can be negative if the sun is below the
    
    From 85782f3cd85476a22ad5d5509d297142fa4568f2 Mon Sep 17 00:00:00 2001
    From: KosherJava 
    Date: Thu, 14 May 2026 21:45:39 -0400
    Subject: [PATCH 115/121] SunTimesCalculator bogus getTimeAtAzimuth()
     Implementation
    
    ---
     .../kosherjava/zmanim/util/SunTimesCalculator.java  | 13 +++++++++++++
     1 file changed, 13 insertions(+)
    
    diff --git a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java
    index cc723ecf..a19e5366 100644
    --- a/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java
    +++ b/src/main/java/com/kosherjava/zmanim/util/SunTimesCalculator.java
    @@ -293,4 +293,17 @@ public double getSolarElevation(ZonedDateTime zdt, GeoLocation geoLocation) {
     		throw new UnsupportedOperationException(
     				"The SunTimesCalculator class does not implement the getSolarElevation method. Use the NOAACalculator instead.");
     	}
    +	
    +	/**
    +	 * This calculator class does not implement the getTimeAtAzimuth method, and throws a {@link UnsupportedOperationException}.
    +	 * Use the {@link NOAACalculator}if this method is required.
    +	 * 
    {@inheritDoc} + * @throws UnsupportedOperationException This calculator class does not implement the getTimeAtAzimuth method. Use the + * {@link NOAACalculator} instead. + */ + @Override + public double getTimeAtAzimuth(LocalDate localDate, GeoLocation geoLocation, double azimuth) { + throw new UnsupportedOperationException( + "The SunTimesCalculator class does not implement the getTimeAtAzimuth method. Use the {@link NOAACalculator} instead."); + } } From 4d35842b8c3b8be118d09dcfeb68f49f2d055320 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 21:49:11 -0400 Subject: [PATCH 116/121] NOAACalculator Initial getTimeAtAzimuth() Implementation This implementation is very initial and does not work for all locations. It is especially problematic in areas between the tropics. The need for this method in the library is for the Arctic/Antarctic areas, and while not perfect or efficient, it for the most part works there. Future enhancements are expected over the next few weeks. --- .../zmanim/util/NOAACalculator.java | 76 ++++++++++++++++--- 1 file changed, 66 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java index 0176bc6b..15f5e475 100644 --- a/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java +++ b/src/main/java/com/kosherjava/zmanim/util/NOAACalculator.java @@ -242,8 +242,7 @@ private static double getMeanObliquityOfEcliptic(double julianCenturies) { } /** - * Returns the corrected obliquity of the ecliptic (Axial - * tilt). + * Returns the corrected obliquity of the ecliptic (Axial tilt). * * @param julianCenturies * the number of Julian centuries since 0.001) { double az = (Math.sin(lat) * Math.cos(zenith) - Math.sin(decl)) / azDenom; - - azimuth = 180 - Math.toDegrees(Math.acos(Math.max(-1, Math.min(1, az)))) - * (hourAngle > 0 ? -1 : 1); + azimuth = 180 - Math.toDegrees(Math.acos(Math.max(-1, Math.min(1, az)))) * (hourAngle > 0 ? -1 : 1); } else { azimuth = geoLocation.getLatitude() > 0 ? 180 : 0; } @@ -409,6 +406,7 @@ private double adjustElevationForRefraction(double elevation) { * {@inheritDoc} * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) */ + @Override public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { double noon = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.NOON); noon = noon / 60; @@ -419,6 +417,7 @@ public double getUTCNoon(LocalDate localDate, GeoLocation geoLocation) { * {@inheritDoc} * @see #getSolarNoonMidnightUTC(double, double, SolarEvent) */ + @Override public double getUTCMidnight(LocalDate localDate, GeoLocation geoLocation) { double midnight = getSolarNoonMidnightUTC(getJulianDay(localDate), -geoLocation.getLongitude(), SolarEvent.MIDNIGHT); midnight = midnight / 60; @@ -486,10 +485,8 @@ private static double getSunRiseSetUTC(LocalDate localDate, double latitude, dou // efficient but would likely cause a very minor discrepancy in the calculated times (likely not reducing // accuracy, just slightly different, thus potentially breaking test cases). Regardless, it would be within // milliseconds. - double noonmin = getSolarNoonMidnightUTC(julianDay, longitude, SolarEvent.NOON); - + double noonmin = getSolarNoonMidnightUTC(julianDay, longitude, SolarEvent.NOON); double tnoon = getJulianCenturiesFromJulianDay(julianDay + noonmin / 1440.0); - // First calculates sunrise and approximate length of day double equationOfTime = getEquationOfTime(tnoon); double solarDeclination = getSunDeclination(tnoon); @@ -497,11 +494,9 @@ private static double getSunRiseSetUTC(LocalDate localDate, double latitude, dou double delta = longitude - Math.toDegrees(hourAngle); double timeDiff = 4 * delta; double timeUTC = 720 + timeDiff - equationOfTime; - // Second pass includes fractional Julian Day in gamma calc double newt = getJulianCenturiesFromJulianDay(julianDay + timeUTC / 1440.0); equationOfTime = getEquationOfTime(newt); - solarDeclination = getSunDeclination(newt); hourAngle = getSunHourAngle(latitude, solarDeclination, zenith, solarEvent); delta = longitude - Math.toDegrees(hourAngle); @@ -509,4 +504,65 @@ private static double getSunRiseSetUTC(LocalDate localDate, double latitude, dou timeUTC = 720 + timeDiff - equationOfTime; return timeUTC; } + + /** + * {@inheritDoc} + * @todo This is very much a work in progress. It works in some but not all cases. + * There will be edge cases where the azimuth will occur more than once a day when based on the equation of time, + * the day is shorter than 24 hours. In that case, the time for the first one will be returned. + *
    FIXME: + *
    1. Deal with the rerunning the method for a different date when near the boundaries and it rolls over the date.
    2. + *
    3. Deal with when the event does not occur (it happened right before and after the date)
    4. + *
    5. Deal with when the event does not occur because the sun never reaches that azimuth (too close to the equator)
    6. + *
    7. May or may not be an issue - when it reaches 270 but not in every iteration (also an edge case).
    8. + *
    9. Deal with issues when the solar declination matches the latitude (also an edge case).
    10. + *
    11. etc
    + */ + public double getTimeAtAzimuth(LocalDate date, GeoLocation geo, double targetAzimuth) { + targetAzimuth %= 360.0; + if (targetAzimuth < 0) targetAzimuth += 360.0; + final double step = 15.0 / 60.0; + double bestHour = Double.NaN; + double bestError = Double.POSITIVE_INFINITY; + for (double hour = 0.0; hour <= 24.0; hour += step) { + ZonedDateTime t = date.atStartOfDay(ZoneOffset.UTC).plusSeconds((long)(hour * 3600.0)); + double az = getSolarAzimuth(t, geo); + if (Double.isNaN(az)) continue; + double diff = Math.abs((az - targetAzimuth) % 360.0); + diff = Math.min(diff, 360.0 - diff); + if (diff < bestError) { + bestError = diff; + bestHour = hour; + } + } + + if (Double.isNaN(bestHour) || bestError > 5.0) { + return Double.NaN; + } + + double low = Math.max(0.0, bestHour - step); + double high = Math.min(24.0, bestHour + step); + + for (int i = 0; i < 30; i++) { + double m1 = low + (high - low) / 3.0; + double m2 = high - (high - low) / 3.0; + ZonedDateTime t1 = date.atStartOfDay(ZoneOffset.UTC).plusSeconds((long)(m1 * 3600.0)); + ZonedDateTime t2 = date.atStartOfDay(ZoneOffset.UTC).plusSeconds((long)(m2 * 3600.0)); + double a1 = getSolarAzimuth(t1, geo); + double a2 = getSolarAzimuth(t2, geo); + double e1 = Math.abs((a1 - targetAzimuth) % 360.0); + double e2 = Math.abs((a2 - targetAzimuth) % 360.0); + e1 = Math.min(e1, 360.0 - e1); + e2 = Math.min(e2, 360.0 - e2); + if (e1 < e2) high = m2; + else low = m1; + } + + double result = (low + high) / 2.0; + ZonedDateTime t = date.atStartOfDay(ZoneOffset.UTC).plusSeconds((long)(result * 3600.0)); + double az = getSolarAzimuth(t, geo); + double diff = Math.abs((az - targetAzimuth) % 360.0); + diff = Math.min(diff, 360.0 - diff); + return diff < 0.01 ? result : Double.NaN; + } } From 05a3bc3cdb2dbc88ffca89be0828f50abf62969f Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 21:50:42 -0400 Subject: [PATCH 117/121] Add AstronomicalCalendar getTimeAtAzimuth(double azimuth) --- .../zmanim/AstronomicalCalendar.java | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index bb303d36..33cbee37 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -362,7 +362,7 @@ public AstronomicalCalendar() { */ public AstronomicalCalendar(GeoLocation geoLocation) { setLocalDate(LocalDate.now(geoLocation.getZoneId())); - setGeoLocation(geoLocation);// duplicate call + setGeoLocation(geoLocation); setAstronomicalCalculator(AstronomicalCalculator.getDefault()); } @@ -556,7 +556,20 @@ public Instant getSunTransit(Instant startOfDay, Instant endOfDay) { */ protected enum SolarEvent { /**SUNRISE A solar event related to sunrise*/SUNRISE, /**SUNSET A solar event related to sunset*/SUNSET, - /**NOON A solar event related to noon*/NOON, /**MIDNIGHT A solar event related to midnight*/MIDNIGHT + /**NOON A solar event related to noon*/NOON, /**MIDNIGHT A solar event related to midnight*/MIDNIGHT, + /**NONE solar event representing azimuth or elevation calculations that that can be any time of the day*/ NONE; + } + + /** + * Return the time at a given azimuth. This often will not occur and a null will be returned. + * @param azimuth the azimuth that you want to get the time of day for. + * @return the time that the azimuth will be reached. There are cases where this azimuth will never be reached for the date + * and location, and a null will be returned in that case. + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getTimeAtAzimuth(LocalDate, GeoLocation, double) + */ + public Instant getTimeAtAzimuth(double azimuth) { + double rawAzimuth = getAstronomicalCalculator().getTimeAtAzimuth(getAdjustedLocalDate(), getGeoLocation(), azimuth); + return getInstantFromTime(rawAzimuth, SolarEvent.NONE); } /** @@ -568,7 +581,6 @@ protected enum SolarEvent { * @param solarEvent the type of {@link SolarEvent} * @return The Instant object representation of the time double */ - protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { if (Double.isNaN(time)) { return null; @@ -592,8 +604,7 @@ protected Instant getInstantFromTime(double time, SolarEvent solarEvent) { } } - // Math.round(time * HOUR_MILLIS) * 1_000_000L could be used below, but this exactly matches the pre-3.0 Date-based code. - LocalDateTime dateTime = date.atStartOfDay().plusNanos((long)(time * HOUR_MILLIS) * 1_000_000L); + LocalDateTime dateTime = date.atStartOfDay().plusNanos(Math.round(time * HOUR_MILLIS * 1_000_000L)); // tiny change from 3.0 code // The computed time is in UTC fractional hours; anchor in UTC before converting. return ZonedDateTime.of(dateTime, ZoneOffset.UTC).toInstant(); @@ -702,7 +713,7 @@ public Instant getLocalMeanTime(LocalTime localTime) { * @see GeoLocation#getAntimeridianAdjustment(Instant) * @return the adjusted Calendar */ - private LocalDate getAdjustedLocalDate(){ + protected LocalDate getAdjustedLocalDate(){ int offset = getGeoLocation().getAntimeridianAdjustment(getMidnightLastNight().toInstant()); return offset == 0 ? getLocalDate() : getLocalDate().plusDays(offset); } From a05ec976d69dae3e2d47cc54c5ca8d7c7a8ddb42 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 21:52:48 -0400 Subject: [PATCH 118/121] ZmanimCalendar Rename isAssurBemlacha() isAssurBemelacha() - Add defensive code in getShaahZmanisBasedZman() --- .../com/kosherjava/zmanim/ZmanimCalendar.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java index a78d5f2a..3a0c4b58 100644 --- a/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java @@ -833,7 +833,7 @@ public Instant getSofZmanTfilaGRA() { * 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 * {@link AstronomicalCalendar} documentation. - * @see getSofZmanTfila(Instant, Instan, boolean) + * @see getSofZmanTfila(Instant, Instant, boolean) * @see getShaahZmanis72Minutes() * @see getAlos72Minutes() */ @@ -922,9 +922,10 @@ public Instant getMinchaGedola(Instant startOfDay, Instant endOfDay) { * 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 - * getSunTransit() astronomical chatzos} or {@link getChatzosHayomAsHalfDay() chatzos as half a day} - * for {@link AstronomicalCalculator calculators} that support it, based on {@link isUseAstronomicalChatzos()}. + * @todo Consider adjusting this to calculate the time as half an hour zmaniyos after {@link getChatzosHayom()} + * that uses {@link isUseAstronomicalChatzos()} to determine the type of chatzos to utilize (if the + * {@link com.kosherjava.zmanim.util.AstronomicalCalculator calculator} support astronomical chatzos), + * based on the {@link isUseAstronomicalChatzos()} setting. * * @see getMinchaGedola(Instant, Instant) * @see getShaahZmanisGRA() @@ -1298,7 +1299,7 @@ public void setCandleLightingOffset(double candleLightingOffset) { * @see JewishCalendar#hasCandleLighting() * @see JewishCalendar#setInIsrael(boolean) */ - public boolean isAssurBemlacha(Instant currentTime, Instant tzais, boolean inIsrael) { + public boolean isAssurBemelacha(Instant currentTime, Instant tzais, boolean inIsrael) { JewishCalendar jewishCalendar = new JewishCalendar(); jewishCalendar.setGregorianDate(getLocalDate()); @@ -1406,7 +1407,10 @@ protected Instant getSunsetBaalHatanya() { */ public Instant getShaahZmanisBasedZman(Instant startOfDay, Instant endOfDay, double hours) { long shaahZmanis = getTemporalHour(startOfDay, endOfDay); - return getTimeOffset(startOfDay, shaahZmanis * hours); + if (shaahZmanis == Long.MIN_VALUE) { //defensive, should not be needed + return null; + } + return getTimeOffset(startOfDay, Math.round(shaahZmanis * hours)); } /** From ab9a903e94c33d31f1ce006a6102cdfa259786ad Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 21:54:19 -0400 Subject: [PATCH 119/121] Add getSunsetOrWesternmostSolarAzimuth() and getSunriseOrEasternmostSolarAzimuth() --- .../zmanim/ComprehensiveZmanimCalendar.java | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index a2032fe3..9add93b3 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -3977,7 +3977,49 @@ public Instant getSamuchLeMinchaKetana16Point1Degrees() { public Instant getSamuchLeMinchaKetana72Minutes() { return getSamuchLeMinchaKetana(getAlos72Minutes(), getTzais72Minutes(), true); } - + + /** + * A method that returns sunset if it occurs, or the time that the sun is at its westernmost position (azimuth of 270°), if + * sunset will not occur on that day, such as in the Arctic or Antarctic circles. There are some opinions that in Polar regions + * where there are days of no sunrise or sunset, that the definition of a day during this period is a 24-hour day, and the + * day-night boundary is when the sun is at its westernmost position. sunrise in this opinion is when the sun is at its + * easternmost position. + * FIXME link opinions of the Ben Ish chai etc. + * @return sunset if it occurs, or the time that the sun will reach its westernmost position (azimuth 270°), if sunset will + * not occur that day. If there is no sunset this day, and the azimuth 270 will not occur, a null will be returned. + * @see #getSunriseOrEasternmostSolarAzimuth() + * @see #getTimeAtAzimuth(double) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getTimeAtAzimuth(LocalDate, GeoLocation, double) + */ + public Instant getSunsetOrWesternmostSolarAzimuth() { + Instant sunset = getSunsetBasedOnElevationSetting(); + if(sunset != null) { + return sunset; + } + return getTimeAtAzimuth(270); + } + + /** + * A method that returns sunrise if it occurs, or the time that the sun is at its easternmost position (azimuth of 900°), if + * sunset will not occur on that day, such as in the Arctic or Antarctic circles. There are some opinions that in Polar regions + * where there are days of no sunrise or sunset, that the definition of a day during this period is a 24-hour day, and the + * day-night boundary is when the sun is at its easternmost position. Sunset in this opinion is when the sun is at its + * westernmost position. + * FIXME link opinions of the Ben Ish chai etc. + * @return sunrise if it occurs, or the time that the sun will reach its easternmost position (azimuth 90°), if sunrise will + * not occur that day. If there is no sunrise this day, and the azimuth 90 will not occur, a null will be returned. + * @see #getSunsetOrWesternmostSolarAzimuth() + * @see #getTimeAtAzimuth(double) + * @see com.kosherjava.zmanim.util.AstronomicalCalculator#getTimeAtAzimuth(LocalDate, GeoLocation, double) + */ + public Instant getSunriseOrEasternmostSolarAzimuth() { + Instant sunrise = getSunriseBasedOnElevationSetting(); + if(sunrise != null) { + return sunrise; + } + return getTimeAtAzimuth(90); + } + /** * @see java.lang.Object#equals(Object) */ From 47a05c08051dd0083d81171ffa8a81429191167f Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 22:03:22 -0400 Subject: [PATCH 120/121] Update CHANGELOG with latest changes --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 462d6b24..243c7e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ * `getTzais120()` -> `getTzais120Minutes()` * `getChatzos()` -> `getChatzosHayom()` * `getChatzosAsHalfDay()` -> `getChatzosHayomAsHalfDay()` + * `isAssurBemlacha()` -> `isAssurBemelacha()` * Rename some classes the confusingly named `ComplexZmanimCalendar` to `ComrehensiveZmanimCalendar`. * Move "legacy" classes to `java.time` equivelants * All zmanim now return `Instant`s insead of `Date` objects. @@ -100,6 +101,7 @@ * [Add null checks in `getMinchaGedolaAhavatShalom()`](https://github.com/KosherJava/zmanim/commit/93f441f1ff87d4669c91b596eed157c9cf448bca) * [Fix `getAlos60()` to use `getElevationAdjustedSunrise()`](https://github.com/KosherJava/zmanim/commit/f5a5b2c68e1f0e2f9f4fbdd2cc585085f2914b74) * Update Tefila method to Use [Consistent Spelling](https://github.com/KosherJava/zmanim/commit/bca6ddb85542683f229d905636a06fbfc66fbe03). + * Add `getSunsetOrWesternmostSolarAzimuth()` and `getSunriseOrEasternmostSolarAzimuth()` methods. * `HebrewdateFormatter` * add method [`formatParsha(JewishCalendar.Parsha parsha)`](https://github.com/KosherJava/zmanim/commit/ee3347b04bf0f4221bc8aa71af59437cd7533f72) to allow formatting of a parsha retrieved from `JewishCalendar.getUpcomingParshah()`. * Add `getHebrewMonthList()` and `setHebrewMonthList(String[])`. This allows overriding the default month of Chesvan to Marcheshvan etc. @@ -114,7 +116,10 @@ * [add missing brace to `isYomTov()` and simplify logic](https://github.com/KosherJava/zmanim/commit/e34fc879313b045f35e70b5947e2c2e20a4364c5) * `GeoLocation` - [add NaN validation to `setLatitude` and `setLongitude`](https://github.com/KosherJava/zmanim/commit/d064715ebeaead29a01ec673f3885ee9bd9c78b4) * `NOAACalculator` - [fix Solar Azimuth and Elevation](https://github.com/KosherJava/zmanim/commit/860f1939c25b38dd4d23adb1772b12ccbc71fc76) -* `AstronomicalCalculator` - [add `getSolarAzimuth()` and `getSolarElevation()`](https://github.com/KosherJava/zmanim/commit/feecf7ad2d9ce527cfe0314ae01710d68c6c3c2e) +* `AstronomicalCalculator` Add some methods + * `getSolarAzimuth()` + * `getSolarElevation()` + * `getTimeAtAzimuth()` * `AstronomicalCalendar` * [Fix null handling in `getSunTransit(Date,Date)`](https://github.com/KosherJava/zmanim/commit/8221e2895cbab62b037c16de1711f9faacd78a7b) * [Deprecate `getSunriseSolarDipFromOffset` and `getSunsetSolarDipFromOffset`](https://github.com/KosherJava/zmanim/commit/0ce858258bff15c11235b1f1063d2eb0ef22b994) From b7425c3197bc3d046507755d6fd378190511284a Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 14 May 2026 22:13:25 -0400 Subject: [PATCH 121/121] Add links in CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 243c7e46..ca38b6ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,7 +101,7 @@ * [Add null checks in `getMinchaGedolaAhavatShalom()`](https://github.com/KosherJava/zmanim/commit/93f441f1ff87d4669c91b596eed157c9cf448bca) * [Fix `getAlos60()` to use `getElevationAdjustedSunrise()`](https://github.com/KosherJava/zmanim/commit/f5a5b2c68e1f0e2f9f4fbdd2cc585085f2914b74) * Update Tefila method to Use [Consistent Spelling](https://github.com/KosherJava/zmanim/commit/bca6ddb85542683f229d905636a06fbfc66fbe03). - * Add `getSunsetOrWesternmostSolarAzimuth()` and `getSunriseOrEasternmostSolarAzimuth()` methods. + * Add [`getSunsetOrWesternmostSolarAzimuth()` and `getSunriseOrEasternmostSolarAzimuth()`](https://github.com/KosherJava/zmanim/commit/ab9a903e94c33d31f1ce006a6102cdfa259786ad) methods. * `HebrewdateFormatter` * add method [`formatParsha(JewishCalendar.Parsha parsha)`](https://github.com/KosherJava/zmanim/commit/ee3347b04bf0f4221bc8aa71af59437cd7533f72) to allow formatting of a parsha retrieved from `JewishCalendar.getUpcomingParshah()`. * Add `getHebrewMonthList()` and `setHebrewMonthList(String[])`. This allows overriding the default month of Chesvan to Marcheshvan etc. @@ -127,6 +127,7 @@ * [Add `getLocalMeanTime()`](https://github.com/KosherJava/zmanim/commit/14bcdc085011ccce327f69d6a001772c0581fcc2). * [Move `getSolarMidnight()`](https://github.com/KosherJava/zmanim/commit/a4535717353eb77da10b6951e4a627b10258ac9e) to the parent class where it belongs. * [Correct USNO noon calculation](https://github.com/KosherJava/zmanim/commit/3735c92289a66039b24d7e2b470955b5297f0ca5) in some locations where it was sometimes 12 hours off. + * [Add `getTimeAtAzimuth(double azimuth)`](https://github.com/KosherJava/zmanim/commit/05a3bc3cdb2dbc88ffca89be0828f50abf62969f) ## [2.5.0](https://github.com/KosherJava/zmanim/compare/2.4.0...2.5.0) (2023-06-09)

First create the Calendar for the location you would like to calculate: * @@ -422,11 +422,11 @@ public long getShaahZmanis60Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being - * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation + * {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation * divides the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation * is 72 minutes zmaniyos before sunrise and dusk is 72 minutes zmaniyos after sunset. This day * is split into 12 equal parts with each part being a shaah zmanis. This is identical to 1/10th of the day - * from {@link getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. + * from {@link getSunrise() sunrise} to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -457,11 +457,11 @@ public long getShaahZmanis90Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides + * getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 90 minutes * zmaniyos before sunrise and dusk is 90 minutes zmaniyos after sunset. This day is split into 12 equal - * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunriseWithElevation() sunrise} - * to {@link getSunsetWithElevation() sunset}. + * parts with each part being a shaah zmanis. This is 1/8th of the day from {@link getSunrise() sunrise} + * to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -477,11 +477,11 @@ public long getShaahZmanis90MinutesZmanis() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides + * getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 96 minutes * zmaniyos before sunrise and dusk is 96 minutes zmaniyos after sunset. This day is split into 12 equal * parts with each part being a shaah zmanis. This is identical to 1/7.5th of the day from {@link - * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. + * getSunrise() sunrise} to {@link getSunset() sunset}. * * @return the long millisecond length of a shaah zmanis. 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 @@ -498,8 +498,8 @@ public long getShaahZmanis96MinutesZmanis() { * Method to return a shaah zmanis (temporal hour) according to the opinion of the * Chacham Yosef Harari-Raful of Yeshivat Ateret Torah calculated with alos being 1/10th * of sunrise to sunset day, or {@link getAlos72Zmanis() 72} minutes zmaniyos of such a day before - * {@link getSunriseWithElevation() sunrise}, and tzais is usually calculated as {@link getTzaisAteretTorah() 40 - * minutes} (configurable to any offset via {@link setAteretTorahSunsetOffset(double)}) after {@link getSunsetWithElevation() + * {@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 (midday) will not be the point that the sun is {@link getSunTransit() halfway across * the sky}. @@ -600,11 +600,11 @@ public long getShaahZmanis120Minutes() { /** * Method to return a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on alos being {@link - * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This calculation divides + * getAlos120Zmanis() 120} minutes zmaniyos before {@link getSunrise() sunrise}. This calculation divides * the day based on the opinion of the MGA that the day runs from dawn to dusk. Dawn for this calculation is 120 minutes * zmaniyos before sunrise and dusk is 120 minutes zmaniyos after sunset. This day is split into 12 equal * parts with each part being a shaah zmanis. This is identical to 1/6th of the day from {@link - * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset}. Since zmanim that use this method are + * getSunrise() sunrise} to {@link getSunset() sunset}. Since zmanim that use this method are * extremely late or early and at a point when the sky is a long time past the 18° point where the darkest point is reached, * zmanim that use this should only be used lechumra such as delaying the start of nighttime mitzvos. * @@ -673,7 +673,7 @@ public Instant getPlagHamincha120Minutes() { } /** - * Method to return alos (dawn) calculated as 60 minutes before {@link getSunriseWithElevation() sunrise} or + * Method to return alos (dawn) calculated as 60 minutes before {@link getSunrise() sunrise} or * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is the * time to walk the distance of 4 mil at 15 minutes a mil. This seems to be the opinion of the mil so the time for 4 mil is * 72 minutes which is 1/10th 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 getSunriseWithElevation() sunrise} to {@link - * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()} setting). The actual calculation is {@link - * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars + * 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 + * getSunrise()} - ({@link getShaahZmanisGRA()} * 1.2). This calculation is used in the calendars * published by the Hisachdus Harabanim D'Artzos Habris * Ve'Canada. * @@ -727,7 +727,7 @@ public Instant getAlos72Zmanis() { } /** - * Method to return alos (dawn) calculated using 96 minutes before {@link getSunriseWithElevation() 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. @@ -742,18 +742,18 @@ public Instant getAlos72Zmanis() { * documentation. */ public Instant getAlos96Minutes() { - return getTimeOffset(getSunriseBasedOnElevationSetting(), -96 * MINUTE_MILLIS); + return getTimeOffset(getSunrise(), -96 * MINUTE_MILLIS); } /** * Method to return alos (dawn) calculated using 90 minutes zmaniyos or 1/8th of the day before - * {@link getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link * isUseElevation()} setting). This is based on a 22.5-minute mil so the time for 4 mil is 90 minutes * which is 1/8th of a day (12 * 60) / 8 = 90. The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} - * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link - * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is - * {@link getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.5). + * to {@link 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()} * 1.5). * * @return the Instant 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, @@ -767,13 +767,13 @@ public Instant getAlos90Zmanis() { /** * This method returns alos (dawn) calculated using 96 minutes zmaniyos or 1/7.5th of the day before - * {@link getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link + * {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link * isUseElevation()} setting). This is based on a 24-minute mil so the time for 4 mil is 96 minutes * which is 1/7.5th of a day (12 * 60 / 7.5 = 96). The day is calculated from {@link getSeaLevelSunrise() sea level sunrise} - * to {@link getSeaLevelSunset() sea level sunset} or {@link getSunriseWithElevation() sunrise} to {@link - * getSunsetWithElevation() sunset} (depending on the {@link isUseElevation()}. The actual calculation used is {@link - * getSunriseBasedOnElevationSetting()} - ({@link getShaahZmanisGRA()} * 1.6). + * to {@link 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()} * 1.6). * * @return the Instant 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, @@ -786,7 +786,7 @@ public Instant getAlos96Zmanis() { } /** - * Method to return alos (dawn) calculated using 90 minutes before {@link getSunriseWithElevation() sunrise} or + * Method to return alos (dawn) calculated using 90 minutes before {@link getSunrise() sunrise} or * {@link getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting) based on the time * to walk the distance of 4 mil at * 22.5 minutes a mil. Time-based offset calculations for alos are based on the opinion of the lechumra only and returns alos (dawn) calculated using 120 minutes - * before {@link getSunriseWithElevation() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the + * before {@link getSunrise() sunrise} or {@link getSeaLevelSunrise() sea level sunrise} (depending on the * {@link isUseElevation()} setting) based on the time to walk the distance of 5 mil (Ula) at 24 minutes a * mil. Time based offset calculations for alos are based on the* opinion of the lechumra only and method returns alos (dawn) calculated using - * 120 minutes zmaniyos or 1/6th of the day before {@link getSunriseWithElevation() sunrise} or {@link + * 120 minutes zmaniyos or 1/6th of the day before {@link getSunrise() sunrise} or {@link * getSeaLevelSunrise() sea level sunrise} (depending on the {@link isUseElevation()} setting). This is based * on a 24-minute 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 getSeaLevelSunset() sea level sunset} or {@link - * getSunriseWithElevation() sunrise} to {@link getSunsetWithElevation() sunset} (depending on the {@link - * isUseElevation()}. The actual calculation used is {@link getSunriseWithElevation()} - ({@link getShaahZmanisGRA()} + * 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 performed during the day. * @@ -944,7 +944,7 @@ public Instant getAlos19Point8Degrees() { /** * This method returns misheyakir based on the position of the sun {@link ZENITH_12_POINT_85 12.85°} * below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This is based on the position of the sun slightly - * later than 57 minutes before {@link getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux. This * zman is mentioned for use bish'as hadchak in the Birur Halacha Tinyana and misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES * 11.5°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 52 minutes - * before {@link getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11.5° below {@link GEOMETRIC_ZENITH geometric zenith}. * @todo recalculate. @@ -1008,7 +1008,7 @@ public Instant getMisheyakir11Point5Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_11_DEGREES * 11°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 48 minutes - * before {@link getSunriseWithElevation() sunrise} in Jerusalem around the equinox / equilux, * which calculates to 11° below {@link GEOMETRIC_ZENITH geometric zenith}. * @@ -1026,7 +1026,7 @@ public Instant getMisheyakir11Degrees() { * This method returns misheyakir based on the position of the sun when it is {@link ZENITH_10_POINT_2 * 10.2°} below {@link GEOMETRIC_ZENITH geometric zenith} (90°). This calculation is used for calculating * misheyakir according to some opinions. This calculation is based on the position of the sun 45 minutes - * before {@link getSunriseWithElevation() sunrise} in Jerusalem around the equinox which calculates * to 10.2° below {@link GEOMETRIC_ZENITH geometric zenith}. * @@ -1104,7 +1104,7 @@ public Instant getMisheyakir9Point5Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based on - * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunriseWithElevation() sunrise}. This + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This * time is 3 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall * with both being 19.8° below sunrise or sunset. This returns the time of 3 * @@ -1124,7 +1124,7 @@ public Instant getSofZmanShmaMGA19Point8Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link + * getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 3 {@link * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based on * the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or sunset. * This returns the time of 3 * {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. @@ -1143,7 +1143,7 @@ public Instant getSofZmanShmaMGA16Point1Degrees() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos18Degrees() 18°} before {@link getSunriseWithElevation() sunrise}. This time is 3 + * on alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 3 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 3 * {@link getShaahZmanis18Degrees()} after @@ -1164,7 +1164,7 @@ public Instant getSofZmanShmaMGA18Degrees() { * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based * on alos being {@link getAlos72Zmanis() 72} minutes zmaniyos, or 1/10th of the day before - * {@link getSunriseWithElevation() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} + * {@link getSunrise() sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} * (solar hours) after {@link getAlos72Zmanis() dawn} based on the opinion of the MGA that the day is calculated * from a {@link getAlos72Zmanis() dawn} of 72 minutes zmaniyos, or 1/10th of the day before * {@link getSeaLevelSunrise() sea level sunrise} to {@link getTzais72Zmanis() nightfall} of 72 minutes @@ -1186,7 +1186,7 @@ public Instant getSofZmanShmaMGA72MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according * to the opinion of the Magen Avraham (MGA) based on - * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 3 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 3 * @@ -1207,7 +1207,7 @@ public Instant getSofZmanShmaMGA90Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() + * on alos being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() * sunrise}. This time is 3 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link getAlos90Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * getAlos90Zmanis() dawn} of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} @@ -1229,7 +1229,7 @@ public Instant getSofZmanShmaMGA90MinutesZmanis() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the opinion of * the Magen Avraham (MGA) based on alos being {@link - * getAlos96Minutes() 96} minutes before {@link getSunriseWithElevation() sunrise}. This time is 3 {@link + * getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 3 {@link * getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on the opinion * of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before sunrise to {@link * getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 3 * {@link getShaahZmanis96Minutes()} @@ -1250,7 +1250,7 @@ public Instant getSofZmanShmaMGA96Minutes() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() + * on alos being {@link getAlos90Zmanis() 96} minutes zmaniyos before {@link getSunrise() * sunrise}. This time is 3 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after * {@link getAlos96Zmanis() dawn} based on the opinion of the MGA that the day is calculated from a {@link * getAlos96Zmanis() dawn} of 96 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} @@ -1301,7 +1301,7 @@ public Instant getSofZmanShma3HoursBeforeChatzos() { /** * This method returns the latest zman krias shema (time to recite Shema in the morning) according to the * opinion of the Magen Avraham (MGA) based - * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunriseWithElevation() + * on alos being {@link getAlos120Minutes() 120} minutes or 1/6th of the day before {@link getSunrise() * sunrise}. This time is 3 {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link * getAlos120Minutes() dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} * of 120 minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of @@ -1343,7 +1343,7 @@ public Instant getSofZmanShmaMGA120Minutes() { * @see getSeaLevelSunset() */ public Instant getSofZmanShmaAlos16Point1ToSunset() { - return getSofZmanShma(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); + return getSofZmanShma(getAlos16Point1Degrees(), getSunset(), false); } /** @@ -1372,7 +1372,7 @@ public Instant getSofZmanShmaAlos16Point1ToTzaisGeonim7Point083Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunriseWithElevation() sunrise}. This time + * alos being {@link getAlos19Point8Degrees() 19.8°} before {@link getSunrise() sunrise}. This time * is 4 {@link getShaahZmanis19Point8Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos19Point8Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 19.8° below sunrise or sunset. This returns the time of 4 * {@link @@ -1394,7 +1394,7 @@ public Instant getSofZmanTfilaMGA19Point8Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time + * alos being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time * is 4 {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link * getAlos16Point1Degrees() dawn} based on the opinion of the MGA that the day is calculated from dawn to * nightfall with both being 16.1° below sunrise or sunset. This returns the time of 4 * {@link @@ -1415,7 +1415,7 @@ public Instant getSofZmanTfilaMGA16Point1Degrees() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos18Degrees() 18°} before {@link getSunriseWithElevation() sunrise}. This time is 4 + * alos being {@link getAlos18Degrees() 18°} before {@link getSunrise() sunrise}. This time is 4 * {@link getShaahZmanis18Degrees() shaos zmaniyos} (solar hours) after {@link getAlos18Degrees() dawn} * based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 18° * below sunrise or sunset. This returns the time of 4 * {@link getShaahZmanis18Degrees()} after @@ -1436,7 +1436,7 @@ public Instant getSofZmanTfilaMGA18Degrees() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is 4 + * being {@link getAlos72Zmanis() 72} minutes zmaniyos before {@link getSunrise() sunrise}. This time is 4 * {@link getShaahZmanis72MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos72Zmanis() dawn} * based on the opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 * minutes zmaniyos before sunrise to {@link getTzais72Zmanis() nightfall} of 72 minutes zmaniyos @@ -1456,7 +1456,7 @@ public Instant getSofZmanTfilaMGA72MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunriseWithElevation() sunrise}. This time is 4 + * alos being {@link getAlos90Minutes() 90} minutes before {@link getSunrise() sunrise}. This time is 4 * {@link getShaahZmanis90Minutes() shaos zmaniyos} (solar hours) after {@link getAlos90Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos90Minutes() dawn} of 90 minutes before sunrise to * {@link getTzais90Minutes() nightfall} of 90 minutes after sunset. This returns the time of 4 * @@ -1476,7 +1476,7 @@ public Instant getSofZmanTfilaMGA90Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is + * being {@link getAlos90Zmanis() 90} minutes zmaniyos before {@link getSunrise() sunrise}. This time is * 4 {@link getShaahZmanis90MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos90Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos90Zmanis() dawn} * of 90 minutes zmaniyos before sunrise to {@link getTzais90Zmanis() nightfall} of 90 minutes @@ -1497,7 +1497,7 @@ public Instant getSofZmanTfilaMGA90MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunriseWithElevation() sunrise}. This time is 4 + * alos being {@link getAlos96Minutes() 96} minutes before {@link getSunrise() sunrise}. This time is 4 * {@link getShaahZmanis96Minutes() shaos zmaniyos} (solar hours) after {@link getAlos96Minutes() dawn} based on * the opinion of the MGA that the day is calculated from a {@link getAlos96Minutes() dawn} of 96 minutes before * sunrise to {@link getTzais96Minutes() nightfall} of 96 minutes after sunset. This returns the time of 4 * @@ -1517,7 +1517,7 @@ public Instant getSofZmanTfilaMGA96Minutes() { /** * This method returns the latest zman tfila (time to the morning prayers) according to the opinion of the * Magen Avraham (MGA) based on alos - * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunriseWithElevation() sunrise}. This time is + * being {@link getAlos96Zmanis() 96} minutes zmaniyos before {@link getSunrise() sunrise}. This time is * 4 {@link getShaahZmanis96MinutesZmanis() shaos zmaniyos} (solar hours) after {@link getAlos96Zmanis() * dawn} based on the opinion of the MGA that the day is calculated from a {@link getAlos96Zmanis() dawn} * of 96 minutes zmaniyos before sunrise to {@link getTzais96Zmanis() nightfall} of 96 minutes @@ -1538,7 +1538,7 @@ public Instant getSofZmanTfilaMGA96MinutesZmanis() { /** * This method returns the latest zman tfila (time to recite the morning prayers) according to the opinion * of the Magen Avraham (MGA) based on - * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunriseWithElevation() sunrise} . This time is 4 + * alos being {@link getAlos120Minutes() 120} minutes before {@link getSunrise() sunrise} . This time is 4 * {@link getShaahZmanis120Minutes() shaos zmaniyos} (solar hours) after {@link getAlos120Minutes() dawn} * based on the opinion of the MGA that the day is calculated from a {@link getAlos120Minutes() dawn} of 120 * minutes before sunrise to {@link getTzais120Minutes() nightfall} of 120 minutes after sunset. This returns the time of @@ -2032,7 +2032,7 @@ public Instant getPlagHamincha18Degrees() { /** * This method should be used lechumra only and returns the time of plag hamincha based on the opinion that - * the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getSunsetWithElevation() + * the day starts at {@link getAlos16Point1Degrees() alos 16.1°} and ends at {@link getSunset() * sunset}. 10.75 shaos zmaniyos are calculated based on this day and added to {@link getAlos16Point1Degrees() * alos} to reach this time. This time is 10.75 shaos zmaniyos (temporal hours) after {@link * getAlos16Point1Degrees() dawn} based on the opinion that the day is calculated from a {@link getAlos16Point1Degrees() @@ -2055,7 +2055,7 @@ public Instant getPlagHamincha18Degrees() { */ @Deprecated (forRemoval=false) public Instant getPlagAlosToSunset() { - return getPlagHamincha(getAlos16Point1Degrees(), getSunsetBasedOnElevationSetting(), false); + return getPlagHamincha(getAlos16Point1Degrees(), getSunset(), false); } /** @@ -2141,7 +2141,7 @@ public Instant getBainHashmashosRT13Point24Degrees() { * */ public Instant getBainHashmashosRT58Point5Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 58.5 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 58.5 * MINUTE_MILLIS); } /** @@ -2174,11 +2174,11 @@ public Instant getBainHashmashosRT13Point5MinutesBefore7Point083Degrees() { */ public Instant getBainHashmashosRT2Stars() { Instant alos19Point8 = getAlos19Point8Degrees(); - Instant sunrise = getSunriseBasedOnElevationSetting(); + Instant sunrise = getSunrise(); if (alos19Point8 == null || sunrise == null) { return null; } - return getTimeOffset(getSunsetBasedOnElevationSetting(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); + return getTimeOffset(getSunset(), (sunrise.toEpochMilli() - alos19Point8.toEpochMilli()) * (5 / 18d)); } /** @@ -2195,7 +2195,7 @@ public Instant getBainHashmashosRT2Stars() { * @see getBainHashmashosYereim3Point05Degrees() */ public Instant getBainHashmashosYereim18Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), -18 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), -18 * MINUTE_MILLIS); } /** @@ -2248,7 +2248,7 @@ public Instant getBainHashmashosYereim3Point05Degrees() { * @see getBainHashmashosYereim2Point8Degrees() */ public Instant getBainHashmashosYereim16Point875Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), -16.875 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), -16.875 * MINUTE_MILLIS); } /** @@ -2291,7 +2291,7 @@ public Instant getBainHashmashosYereim2Point8Degrees() { * @see getBainHashmashosYereim2Point1Degrees() */ public Instant getBainHashmashosYereim13Point5Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), -13.5 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), -13.5 * MINUTE_MILLIS); } /** @@ -2583,7 +2583,7 @@ public Instant 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 getSunsetWithElevation() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the + * for 4 mil after {@link getSunset() sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the * {@link isUseElevation()} setting). See detailed documentation explaining the 60 minute concept at {@link getAlos60Minutes()}. * * @return the Instant representing 60 minutes after sea level sunset. If the calculation can't be @@ -2596,7 +2596,7 @@ public Instant getTzaisGeonim9Point75Degrees() { * @see getShaahZmanis60Minutes() */ public Instant getTzais60Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 60 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 60 * MINUTE_MILLIS); } /** @@ -2616,7 +2616,7 @@ public Instant getTzais60Minutes() { * @see setAteretTorahSunsetOffset(double) */ public Instant getTzaisAteretTorah() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); + return getTimeOffset(getSunset(), getAteretTorahSunsetOffset() * MINUTE_MILLIS); } /** @@ -2820,7 +2820,7 @@ public Instant getTzais96Zmanis() { } /** - * Method to return tzais (dusk) calculated as 90 minutes after {@link getSunsetWithElevation() sunset} or {@link + * Method to return tzais (dusk) calculated as 90 minutes after {@link getSunset() sunset} or {@link * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). This method returns * tzais (nightfall) based on the opinion of the Magen Avraham that the time to walk the distance of a mil according to the Rav Chaim Naeh that the time to walk the distance * of a mil according to the Rambam's opinion is 2/5 of an hour (24 minutes) for a total of 120 - * minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link getSunsetWithElevation() + * minutes based on the opinion of Ula who calculated tzais as 5 mil after {@link getSunset() * sunset} or {@link getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). * A similar calculation {@link getTzais26Degrees()} uses degree-based calculations based on this 120 minute calculation. * Since the zman is extremely late and at a point that is long past the 18° point where the darkest point is @@ -2863,7 +2863,7 @@ public Instant getTzais90Minutes() { */ @Deprecated (forRemoval=false) public Instant getTzais120Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 120 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 120 * MINUTE_MILLIS); } /** @@ -2965,7 +2965,7 @@ public Instant getTzais19Point8Degrees() { } /** - * A method to return tzais (dusk) calculated as 96 minutes after {@link getSunsetWithElevation() sunset} or {@link + * A method to return tzais (dusk) calculated as 96 minutes after {@link getSunset() sunset} or {@link * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). For information on how * this is calculated see the comments on {@link getAlos96Minutes()}. * @@ -2976,7 +2976,7 @@ public Instant getTzais19Point8Degrees() { * @see getAlos96Minutes() */ public Instant getTzais96Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 96 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 96 * MINUTE_MILLIS); } /** @@ -3326,13 +3326,13 @@ public Instant getTchilasZmanKidushLevana7Days() { * @see getSofZmanAchilasChametz(Instant, Instant, boolean) */ public Instant getSofZmanAchilasChametzGRA() { - return getSofZmanAchilasChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getSofZmanAchilasChametz(getSunrise(), getSunset(), true); } /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is identical to the + * being {@link getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is identical to the * {@link getSofZmanTfilaMGA72Minutes() Sof zman tfilah MGA 72 minutes}. This time is 4 {@link * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link @@ -3355,7 +3355,7 @@ public Instant getSofZmanAchilasChametzMGA72Minutes() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the opinion * of the Magen Avraham (MGA) based on alos being {@link - * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunriseWithElevation() sunrise}. This time is identical to the + * getAlos72Zmanis() 72 zmaniyos} minutes before {@link getSunrise() sunrise}. This time is identical to the * {@link getSofZmanTfilaMGA72MinutesZmanis() Sof zman tfilah MGA 72 minutes zmanis}. This time is 4 {@link * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to @@ -3379,7 +3379,7 @@ public Instant getSofZmanAchilasChametzMGA72MinutesZmanis() { /** * This method returns the latest time one is allowed eating chametz on Erev Pesach according to the * opinion of the Magen Avraham (MGA) based on alos - * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunriseWithElevation() sunrise}. This time is 4 {@link + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 4 {@link * getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() dawn} based * on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° below sunrise or * sunset. This returns the time of 4 {@link getShaahZmanis16Point1Degrees()} after {@link getAlos16Point1Degrees() dawn}. @@ -3412,13 +3412,13 @@ public Instant getSofZmanAchilasChametzMGA16Point1Degrees() { * @see getSofZmanBiurChametz(Instant, Instant, boolean) */ public Instant getSofZmanBiurChametzGRA() { - return getSofZmanBiurChametz(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getSofZmanBiurChametz(getSunrise(), getSunset(), true); } /** * 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 - * getAlos72Minutes() 72} minutes before {@link getSunriseWithElevation() sunrise}. This time is 5 {@link + * getAlos72Minutes() 72} minutes before {@link getSunrise() sunrise}. This time is 5 {@link * getShaahZmanis72Minutes() shaos zmaniyos} (temporal hours) after {@link getAlos72Minutes() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Minutes() dawn} of 72 minutes before sunrise to {@link * getTzais72Minutes() nightfall} of 72 minutes after sunset. This returns the time of 5 * {@link getShaahZmanis72Minutes()} @@ -3438,7 +3438,7 @@ public Instant getSofZmanBiurChametzMGA72Minutes() { /** * 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 - * getAlos72Zmanis() 72} minutes zmanis before {@link getSunriseWithElevation() sunrise}. This time is 5 {@link + * getAlos72Zmanis() 72} minutes zmanis before {@link getSunrise() sunrise}. This time is 5 {@link * getShaahZmanis72MinutesZmanis() shaos zmaniyos} (temporal hours) after {@link getAlos72Zmanis() dawn} based on the * opinion of the MGA that the day is calculated from a {@link getAlos72Zmanis() dawn} of 72 minutes zmanis before sunrise to * {@link getTzais72Zmanis() nightfall} of 72 minutes zmanis after sunset. This returns the time of 5 * {@link @@ -3459,7 +3459,7 @@ public Instant getSofZmanBiurChametzMGA72MinutesZmanis() { /** * 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 getSunriseWithElevation() sunrise}. This time is 5 + * being {@link getAlos16Point1Degrees() 16.1°} before {@link getSunrise() sunrise}. This time is 5 * {@link getShaahZmanis16Point1Degrees() shaos zmaniyos} (solar hours) after {@link getAlos16Point1Degrees() * dawn} based on the opinion of the MGA that the day is calculated from dawn to nightfall with both being 16.1° * below sunrise or sunset. This returns the time of 5 {@link getShaahZmanis16Point1Degrees()} after @@ -3511,7 +3511,7 @@ public long getShaahZmanisBaalHatanya() { /** * Returns the Baal Hatanya's alos * (dawn) calculated as the time when the sun is 16.9° below the eastern {@link GEOMETRIC_ZENITH geometric horizon} - * before {@link getSunriseWithElevation() sunrise}. It is based on the calculation that the time between dawn and + * before {@link getSunrise() sunrise}. It is based on the calculation that the time between dawn and * netz amiti (sunrise) is 72 minutes, the time that is takes to walk 4 mil at 18 minutes * a mil (Rambam and others). The sun's position at 72 * minutes before {@link getSunriseBaalHatanya netz amiti (sunrise)} in Jerusalem tzais (nightfall) when the sun is 6° below the western geometric horizon (90°) - * after {@link getSunsetWithElevation() sunset}. This tzais / nightfall based on the opinion of the tzais / nightfall based on the opinion of the Baal Hatanya. This calculation is based on the position of the * sun about 24 minutes after {@link getSeaLevelSunset() sunset} in Jerusalem around the equinox / equilux, which @@ -3773,7 +3773,7 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * This method returns Rav Moshe Feinstein's opinion of the * calculation of sof zman krias shema (latest time to recite Shema in the morning) according to the opinion * of the GRA that the day is calculated from sunrise to sunset, but - * calculated using the first half of the day only. The half a day starts at {@link getSunriseWithElevation() sunrise} and + * calculated using the first half of the day only. The half a day starts at {@link getSunrise() sunrise} and * ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman Shema is 3 shaos zmaniyos (solar * hours) after sunrise or half of this half-day. * @@ -3781,12 +3781,12 @@ public Instant getSofZmanShmaMGA72MinutesToFixedLocalChatzos() { * 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. - * @see getSunriseWithElevation() + * @see getSunrise() * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 3); + return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 3); } /** @@ -3794,19 +3794,19 @@ public Instant getSofZmanShmaGRASunriseToFixedLocalChatzos() { * calculation of sof zman tfila (zman tfilah (the latest time to recite the morning prayers)) * according to the opinion of the GRA that the day is * calculated from sunrise to sunset, but calculated using the first half of the day only. The half a day starts at - * {@link getSunriseWithElevation() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman + * {@link getSunrise() sunrise} and ends at {@link getFixedLocalChatzosHayom() fixed local chatzos}. Sof zman * tefila is 4 shaos zmaniyos (solar hours) after sunrise or 2/3 of this half-day. * * @return the Instant of the latest zman krias shema. 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. - * @see getSunriseWithElevation() + * @see getSunrise() * @see getFixedLocalChatzosHayom() * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getSofZmanTfilaGRASunriseToFixedLocalChatzos() { - return getHalfDayBasedZman(getSunriseBasedOnElevationSetting(), getFixedLocalChatzosHayom(), 4); + return getHalfDayBasedZman(getSunrise(), getFixedLocalChatzosHayom(), 4); } /** @@ -3846,7 +3846,7 @@ public Instant getMinchaGedolaGRAFixedLocalChatzos30Minutes() { * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 3.5); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 3.5); } /** @@ -3867,11 +3867,11 @@ public Instant getMinchaKetanaGRAFixedLocalChatzosToSunset() { * @see getHalfDayBasedZman(Instant, Instant, double) */ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { - return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunsetBasedOnElevationSetting(), 4.75); + return getHalfDayBasedZman(getFixedLocalChatzosHayom(), getSunset(), 4.75); } /** - * Method to return tzais (dusk) calculated as 50 minutes after {@link getSunsetWithElevation() sunset} or {@link + * Method to return tzais (dusk) calculated as 50 minutes after {@link getSunset() sunset} or {@link * getSeaLevelSunset() sea level sunset} (depending on the {@link isUseElevation()} setting). 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 other than ones similar to the latitude of the NY area. @@ -3882,17 +3882,17 @@ public Instant getPlagHaminchaGRAFixedLocalChatzosToSunset() { * documentation. */ public Instant getTzais50Minutes() { - return getTimeOffset(getSunsetBasedOnElevationSetting(), 50 * MINUTE_MILLIS); + return getTimeOffset(getSunset(), 50 * MINUTE_MILLIS); } /** * A method for calculating samuch lemincha ketana, / near mincha ketana time that is half an hour before - * {@link getMinchaKetanaGRA()} or is 9 * shaos zmaniyos (solar hours) after the start of - * the day, calculated according to the GRA using a day starting at - * sunrise and ending at sunset. This is the time that eating or other activity can't begin prior to praying mincha. - * The calculation used is 9 * {@link getShaahZmanisGRA()} after {@link getSunriseWithElevation() sunrise} or {@link - * getSunriseBasedOnElevationSetting() elevation adjusted sunrise} (depending on the {@link isUseElevation()} setting). See the - * Mechaber and Mishna Berurah 232 and shaos zmaniyos (solar hours) after the start of the day, calculated + * according to the GRA using a day starting at sunrise and ending at + * sunset. This is the time that eating or other activity can't begin prior to praying mincha. The calculation used + * is 9 * {@link getShaahZmanisGRA()} after {@link getSunrise() sunrise} or {@link getSunrise() elevation adjusted sunrise} + * (depending on the {@link isUseElevation()} setting). See the Mechaber and Mishna Berurah 232 and 249:2. * * @see getShaahZmanisGRA() @@ -3904,7 +3904,7 @@ public Instant getTzais50Minutes() { * returned. See detailed explanation on top of the {@link AstronomicalCalendar} documentation. */ public Instant getSamuchLeMinchaKetanaGRA() { - return getSamuchLeMinchaKetana(getSunriseBasedOnElevationSetting(), getSunsetBasedOnElevationSetting(), true); + return getSamuchLeMinchaKetana(getSunrise(), getSunset(), true); } /** From 37cb93b03206c2bdc80dbf540a6de8e32f9acf21 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:35:31 -0400 Subject: [PATCH 097/121] fix test case for recent sunrise/sunset name changes --- .../com/kosherjava/zmanim/util/SerializationRegressionTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java b/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java index b69bb94c..58d2218f 100644 --- a/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java +++ b/src/test/java/com/kosherjava/zmanim/util/SerializationRegressionTest.java @@ -41,7 +41,7 @@ public void astronomicalCalendarPreservesSubSecondPrecision() { double utcSunrise = astronomicalCalendar.getUTCSunrise(AstronomicalCalendar.GEOMETRIC_ZENITH); long expectedEpochMillis = Math.round(utcSunrise * AstronomicalCalendar.HOUR_MILLIS); - long actualEpochMillis = astronomicalCalendar.getSunriseWithElevation().toEpochMilli() + long actualEpochMillis = astronomicalCalendar.getSunrise().toEpochMilli() % (24 * AstronomicalCalendar.HOUR_MILLIS); assertTrue(expectedEpochMillis % 1000 != 0); From 242deaa87367c6ae06033a4775ec08b31c573166 Mon Sep 17 00:00:00 2001 From: KosherJava Date: Thu, 30 Apr 2026 23:37:49 -0400 Subject: [PATCH 098/121] fix RegressionTestFileWriter for recent sunrise / sunset method name changes --- .../zmanim/hebrewcalendar/RegressionTestFileWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java index c98a7535..ea275fc6 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/RegressionTestFileWriter.java @@ -55,7 +55,7 @@ public static void main(String[] args) throws IOException { zcal.getAlos18Degrees(), zcal.getAlos19Degrees(), zcal.getAlos19Point8Degrees(), zcal.getAlos16Point1Degrees(), zcal.getMisheyakir11Point5Degrees(), zcal.getMisheyakir11Degrees(), zcal.getMisheyakir10Point2Degrees(), zcal.getMisheyakir7Point65Degrees(), - zcal.getMisheyakir9Point5Degrees(), zcal.getSunriseWithElevation(), zcal.getSeaLevelSunrise(), + zcal.getMisheyakir9Point5Degrees(), zcal.getSunrise(), zcal.getSeaLevelSunrise(), zcal.getSofZmanShmaMGA16Point1Degrees(), zcal.getSofZmanShmaMGA72Minutes(), zcal.getSofZmanShmaMGA72MinutesZmanis(), zcal.getSofZmanShmaMGA90Minutes(), zcal.getSofZmanShmaMGA90MinutesZmanis(), zcal.getSofZmanShmaMGA96Minutes(), From 1a517a0f636e508742dbc8b4dbb64e495329f8a3 Mon Sep 17 00:00:00 2001 From: Moshe Dicker <75931499+dickermoshe@users.noreply.github.com> Date: Fri, 1 May 2026 13:08:43 -0400 Subject: [PATCH 099/121] Re-Rename getSunriseWithElevation/getSunsetWithElevation (#267) * Revert "fix RegressionTestFileWriter for recent sunrise / sunset method name changes" This reverts commit 242deaa87367c6ae06033a4775ec08b31c573166. * Revert "fix test case for recent sunrise/sunset name changes" This reverts commit 37cb93b03206c2bdc80dbf540a6de8e32f9acf21. * Revert "ComprehensiveZmanimCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation()" This reverts commit 628328ac27b94ce3594b4af392982bf61783a951. * Revert "ZmanimCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation()" This reverts commit d8870e8f8fb43d87cb29be39f22e63b161133870. * Revert "JavaDoc changes for recent AstronomicalCalendar changes" This reverts commit e5b6076c9da806516a38a9a07b50c083c515f337. * Revert "AstronomicalCalendar - Remove getSunriseWithElevation() and getSunsetWithElevation()" This reverts commit 6f1da01fa51a0bc8cb49a739a286a1726b078392. * rename getSunsetWithElevation/getSunriseWithElevation --- .../zmanim/AstronomicalCalendar.java | 53 +++--- .../zmanim/ComprehensiveZmanimCalendar.java | 178 +++++++++--------- .../com/kosherjava/zmanim/ZmanimCalendar.java | 132 +++++++------ 3 files changed, 190 insertions(+), 173 deletions(-) diff --git a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java index 3297ea82..bb303d36 100644 --- a/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java @@ -110,12 +110,12 @@ public class AstronomicalCalendar implements Cloneable { private AstronomicalCalculator astronomicalCalculator; /** - * The method returns an Instant 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 {@link - * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes - * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. See documentation for the - * specific implementation of the {@link AstronomicalCalculator} that you are using. + * The getSunrise method returns a Instant 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 {@link AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of + * refraction and 16 archminutes for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith 90.83333°}. + * See documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. * * @return the Instant representing the exact sunrise 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, a @@ -124,14 +124,14 @@ public class AstronomicalCalendar implements Cloneable { * @see getSeaLevelSunrise() * @see getUTCSunrise(double) */ - public Instant getSunrise() { - double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); - if (Double.isNaN(sunrise)) { + public Instant getSunrise() { + double sunrise = getUTCSunrise(GEOMETRIC_ZENITH); + if (Double.isNaN(sunrise)) { return null; } else { return getInstantFromTime(sunrise, SolarEvent.SUNRISE); } - } + } /** * A method that returns the sunrise without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation @@ -187,14 +187,15 @@ public Instant getBeginNauticalTwilight() { public Instant getBeginAstronomicalTwilight() { return getSunriseOffsetByDegrees(ASTRONOMICAL_ZENITH); } - + /** - * The method returns an Instant 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 {@link - * AstronomicalCalculator} to add approximately 50/60 of a degree to account for 34 archminutes of refraction and 16 archminutes - * for the sun's radius for a total of {@link AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See - * documentation for the specific implementation of the {@link AstronomicalCalculator} that you are using. + * The getSunset method returns an Instant 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 {@link AstronomicalCalculator} to add approximately 50/60 of a + * degree to account for 34 archminutes of refraction and 16 archminutes for the sun's radius for a total of {@link + * AstronomicalCalculator#adjustZenith(double, double) 90.83333°}. See documentation for the specific implementation of the + * {@link AstronomicalCalculator} that you are using. * Note: In certain cases the calculates sunset will occur before sunrise. This will typically happen when a time zone other than * the local timezone is used (calculating Los Angeles sunset using a GMT time zone for example). In this case the sunset date * will be incremented to the following date. @@ -206,15 +207,15 @@ public Instant getBeginAstronomicalTwilight() { * @see getSeaLevelSunset() * @see getUTCSunset(double) */ - public Instant getSunset() { - double sunset = getUTCSunset(GEOMETRIC_ZENITH); - if (Double.isNaN(sunset)) { - return null; - } else { - return getInstantFromTime(sunset, SolarEvent.SUNSET); - } - } - + public Instant getSunset() { + double sunset = getUTCSunset(GEOMETRIC_ZENITH); + if (Double.isNaN(sunset)) { + return null; + } else { + return getInstantFromTime(sunset, SolarEvent.SUNSET); + } + } + /** * A method that returns the sunset without {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjustment}. * Non-sunrise and sunset calculations such as dawn and dusk, depend on the amount of visible light, something that is not diff --git a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java index 72f4f72d..0b7722d4 100644 --- a/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/ComprehensiveZmanimCalendar.java @@ -30,7 +30,7 @@ * 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 * {@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() + * time based on degrees or time before or after {@link getSunset() sunrise} and {@link getSunset() * sunset} and are of interest for calculation beyond zmanim calculations. Here are some examples. *