diff --git a/KosherSwiftNew.podspec b/KosherSwiftNew.podspec index b0c4356..1c10f7d 100644 --- a/KosherSwiftNew.podspec +++ b/KosherSwiftNew.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |spec| spec.name = "KosherSwiftNew" - spec.version = "1.0.2" + spec.version = "1.0.4" spec.summary = "KosherJava Zmanim API / Library ported to Swift." spec.description = "This Zmanim library is an API for a specialized calendar that can calculate different astronomical times including sunrise and sunset and Jewish zmanim or religious times for prayers and other Jewish religious duties. diff --git a/Sources/KosherSwift/AstronomicalCalendar.swift b/Sources/KosherSwift/AstronomicalCalendar.swift index b58e479..696de60 100644 --- a/Sources/KosherSwift/AstronomicalCalendar.swift +++ b/Sources/KosherSwift/AstronomicalCalendar.swift @@ -66,7 +66,7 @@ public class AstronomicalCalendar { public var astronomicalCalculator:AstronomicalCalculator; /** - * The getSunrise method Returns a Date representing the + * The getSunrise method returns a Date representing the * ``AstronomicalCalculator.getElevationAdjustment(double)`` elevation adjusted sunrise time. The zenith used * for the calculation uses ``GEOMETRIC_ZENITH`` geometric zenith of 90° plus * ``AstronomicalCalculator.getElevationAdjustment(double)``. This is adjusted by the @@ -315,8 +315,8 @@ public class AstronomicalCalendar { } /** - * Default constructor will set a default ``GeoLocation``, a default - * ``AstronomicalCalculator.getDefault()`` AstronomicalCalculator and default the calendar to the current date. + * The default constructor will set a default ``GeoLocation``, a default + * ``AstronomicalCalculator`` which will be the more accurate ``NOAACalculator``, and default the workingDate to the current date. */ public init() { self.workingDate = Date() @@ -326,8 +326,8 @@ public class AstronomicalCalendar { /** * A constructor that takes in geolocation information as a - * parameter. The default ``AstronomicalCalculator.getDefault()`` AstronomicalCalculator used for solar - * calculations is the the ``NOAACalculator``. + * parameter. The default ``AstronomicalCalculator`` used for solar + * calculations is the the more accurate ``NOAACalculator``. * * @param geoLocation * The location information used for calculating astronomical sun times. @@ -533,7 +533,7 @@ public class AstronomicalCalendar { * The time to be set as the time for the Date. The time expected is in the format: 18.75 * for 6:45:00 PM * @param isSunrise true if the time is for sunrise - * @return The Date object from the time input + * @return The nullable Date? object representation of the time double */ func getDateFromTime(date:Date, time: Double, isSunrise:Bool) -> Date? { if (time.isNaN) { @@ -744,7 +744,7 @@ public class AstronomicalCalendar { * with a number of different implementations of the abstract ``AstronomicalCalculator`` based on * different algorithms, including the default ``NOAACalculator`` based on NOAA's implementation of Jean Meeus's algorithms as well as ``SunTimesCalculator`` based on the US - * Naval Observatory's algorithm,. This allows easy runtime switching and comparison of different algorithms. + * Naval Observatory's algorithm. This allows easy runtime switching and comparison of different algorithms. * * @param astronomicalCalculator * The astronomicalCalculator to set. diff --git a/Sources/KosherSwift/ComplexZmanimCalendar.swift b/Sources/KosherSwift/ComplexZmanimCalendar.swift index 7713855..f1f0d88 100644 --- a/Sources/KosherSwift/ComplexZmanimCalendar.swift +++ b/Sources/KosherSwift/ComplexZmanimCalendar.swift @@ -30,12 +30,12 @@ import Foundation * let czc = new ComplexZmanimCalendar(location); * // Optionally set the date or it will default to today's date * To get alos calculated as 14° below the horizon (as calculated in the calendars published in Montreal), - * add `` AstronomicalCalendar#GEOMETRIC_ZENITH`` (90) to the 14° offset to get the desired time: - * Date alos14 = czc.getSunriseOffsetByDegrees(`` AstronomicalCalendar#GEOMETRIC_ZENITH`` + 14); + * add ``AstronomicalCalendar#GEOMETRIC_ZENITH`` (90) to the 14° offset to get the desired time: + * let alos14 = czc.getSunriseOffsetByDegrees(``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: * or even simpler using the included convenience methods - * Date minchaGedola = czc.getMinchaGedola(czc.getAlos16point1Degrees(), czc.getShaahZmanis16Point1Degrees()); + * let 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 * the Trumas Hadeshen's alos to @@ -45,10 +45,10 @@ import Foundation * do not use identical degree-based offsets, this leads to chatzos being at a time other than the * ``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. - * Date plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees(``AstronomicalCalendar#GEOMETRIC_ZENITH`` + 12), - * czc.getSunsetOffsetByDegrees(``AstronomicalCalendar#GEOMETRIC_ZENITH`` + ZENITH_7_POINT_083)); + * let plag = czc.getPlagHamincha(czc.getSunriseOffsetByDegrees(``AstronomicalCalendar#GEOMETRIC_ZENITH`` + 12), + * czc.getSunsetOffsetByDegrees(``AstronomicalCalendar#GEOMETRIC_ZENITH`` + ZENITH_7_POINT_083)); * Something a drop more challenging, but still simple, would be calculating a zman using the same "complex" - * offset day used in the above mentioned Manchester calendar, but for a shaos zmaniyos based zman not + * offset day used in the above-mentioned Manchester calendar, but for a shaos zmaniyos based zman not * supported by this library, such as calculating the point that one should be makpid * not to eat on erev Shabbos or erev Yom Tov. This is 9 shaos zmaniyos into the day. * Calculate the shaah zmanis in milliseconds for this day. @@ -96,10 +96,10 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * The zenith of 7.083° below ``GEOMETRIC_ZENITH`` (90°). This is often referred to as * 7°5' or 7° and 5 minutes. This calculation is used for calculating alos (dawn) and - * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium sized - * stars by Dr. Baruch Cohen in his calendar published in in 1899 in Strasbourg, France. This calculates to + * tzais (nightfall) according to some opinions. This calculation is based on observation of 3 medium-sized + * stars by Dr. Baruch Cohen in his calendar published in 1899 in Strasbourg, France. This calculates to * 7.0833333° below ``GEOMETRIC_ZENITH``. The Sh"Ut - * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh"Ut Bnei Tziyon, Tenuvas Sadeh and + * Melamed Leho'il in Orach Chaim 30 agreed to this zman, as did the Sh"Ut Bnei Tziyon, Tenuvas Sadeh, and * it is very close to the time of the Mekor Chesed of the Sefer chasidim. * It is close to the position of the sun 30 minutes after sunset in Jerusalem around the equinox / equilux, but not @@ -580,7 +580,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * ``getSunrise()``, and tzais is usually calculated as ``getTzaisAteretTorah()`` 40 * minutes (configurable to any offset via ``setAteretTorahSunsetOffset(double)``) after ``getSunset()`` * This day is split into 12 equal parts with each part being a shaah zmanis. Note that with this - * system, chatzos (mid-day) will not be the point that the sun is ``getSunTransit()`` halfway across + * system, chatzos (midday) will not be the point that the sun is ``getSunTransit()`` halfway across * the sky * * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed @@ -602,9 +602,9 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before * sunrise in degrees ``getAlos16Point1Degrees()`` alos 16.1° and ending 14 minutes after sunset in * degrees ``getTzaisGeonim3Point8Degrees()`` tzais 3.8° This day is split into 12 equal parts with - * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point + * each part being a shaah zmanis. Note that with this system, chatzos (midday) will not be the point * that the sun is ``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 + * 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. * * @return the long millisecond length of a shaah zmanis. If the calculation can't be computed @@ -625,7 +625,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * luach of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that is based on a day starting 72 minutes before * sunrise in degrees ``getAlos16Point1Degrees()`` alos 16.1° and ending 13.5 minutes after sunset in * degrees ``getTzaisGeonim3Point7Degrees()`` tzais 3.7° This day is split into 12 equal parts with - * each part being a shaah zmanis. Note that with this system, chatzos (mid-day) will not be the point + * each part being a shaah zmanis. Note that with this system, chatzos (midday) will not be the point * that the sun is ``getSunTransit()`` halfway across the sky These shaos zmaniyos are used for Mincha * Gedola calculation. * @@ -757,7 +757,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair in the Mekor Chaim, Orach Chaim Ch. * 90, though the Mekor Chaim in Ch. 58 and in the Chut Hashani Cha 97 states that - * a a person walks 3 and a 1/3 mil in an hour, or an 18-minute mil. Also see the Divrei Malkiel Vol. 4, Ch. 20, page 34) who + * 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 @@ -786,7 +786,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * 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 x 60 = 720) based on the a day being from ``getSeaLevelSunrise()`` to + * of a day (12 x 60 = 720) based on the day being from ``getSeaLevelSunrise()`` to * ``getSeaLevelSunrise()`` or ``getSunrise()`` to ``getSunset()`` * (depending on the ``isUseElevation()`` setting). * The actual calculation is ``getSeaLevelSunrise()`` - (``getShaahZmanisGra()`` x 1.2). This calculation @@ -803,7 +803,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * Method to return alos (dawn) calculated using 96 minutes before before ``getSunrise()`` or + * Method to return alos (dawn) calculated using 96 minutes before ``getSunrise()`` or * ``getSeaLevelSunrise()`` (depending on the ``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 Rishonim who stated that the time of the Neshef (time between dawn and sunrise) does not vary @@ -1777,7 +1777,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * This method returns the time of mincha gedola based on the opinion of Rabbi Yaakov Moshe Hillel as published in the luach * of the Bais Horaah of Yeshivat Chevrat Ahavat Shalom that mincha gedola is calculated as half a shaah - * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes befoe sunrise + * zmanis after chatzos with shaos zmaniyos calculated based on a day starting 72 minutes before sunrise * ``getAlos16Point1Degrees()`` alos 16.1° and ending 13.5 minutes after sunset * ``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 ``getMinchaGedolaGreaterThan30()`` @@ -1808,7 +1808,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME check for syncronous + * FIXME check for synchronous * This is a convenience method that returns the later of ``getMinchaGedola()`` and * ``getMinchaGedola30Minutes()`` In the winter when 1/2 of a ``getShaahZmanisGra()`` shaah zmanis is * less than 30 minutes ``getMinchaGedola30Minutes()`` will be returned, otherwise ``getMinchaGedola()`` @@ -1867,7 +1867,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * the opinion of the Rambam and others. For more information * on this see the documentation on ``getMinchaKetana()`` mincha ketana * - * @return the the Date of the time of mincha ketana. If the calculation can't be computed such as + * @return the Date of the time of mincha ketana. If the calculation can't be computed such as * northern and southern locations even south of the Arctic Circle and north of the Antarctic Circle where the * sun may not reach low enough below the horizon for this calculation, a nil will be returned. * See detailed explanation on top of the ``AstronomicalCalendar`` documentation. @@ -2516,7 +2516,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * 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 ``ZENITH_4_POINT_8`` 4.8° below the western horizon. This is based on Rabbi Leo Levi's - * calculations. This is the This is a very early zman and should not be relied on without Rabbinical guidance. + * calculations. This is a very early zman and should not be relied on without Rabbinical guidance. * @todo Additional documentation needed. * * @return the Date representing the time when the sun is 4.8° below sea level. If the calculation @@ -2554,7 +2554,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * This method returns the tzais (nightfall) based on the opinion of the Geonim calculated when the * sun's position ``ZENITH_7_POINT_083`` 7.083° (or 7° 5\u2032) below the western horizon. This is often - * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium sized + * referred to as 7°5' or 7° and 5 minutes. This calculation is based on the observation of 3 medium-sized * stars by Dr. Baruch (Berthold) Cohn in his luach Tabellen enthaltend die Zeitangaben für * den Beginn der Nacht und des Tages für die Breitengrade + 66 bis -38 published in Strasbourg, France in 1899. @@ -2665,7 +2665,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * "https://en.wikipedia.org/wiki/Yair_Bacharach">Chavas Yair and 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 ``getSeaLevelSunset()`` See detailed documentation explaining the - * 60 minute concept at ``getAlos60()`` + * 60-minute concept at ``getAlos60()`` * * @return the Date representing 60 minutes after sea level sunset. If the calculation can't be * computed such as in the Arctic Circle where there is at least one day a year where the sun does not rise, @@ -2683,10 +2683,10 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * This method returns tzais usually calculated as 40 minutes (configurable to any offset via * ``setAteretTorahSunsetOffset(ateretTorahSunsetOffset:)``) after sunset. Please note that Chacham Yosef Harari-Raful - * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanai hayom + * of Yeshivat Ateret Torah who uses this time, does so only for calculating various other zmanei hayom * such as Sof Zman Krias Shema and Plag Hamincha. His calendars do not publish a zman * for Tzais. It should also be noted that Chacham Harari-Raful provided a 25 minute zman - * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be change + * for Israel. This API uses 40 minutes year round in any place on the globe by default. This offset can be changed * by calling ``setAteretTorahSunsetOffset(ateretTorahSunsetOffset:)`` * * @return the Date representing 40 minutes (configurable via ``setAteretTorahSunsetOffset(ateretTorahSunsetOffset:)``) @@ -2727,7 +2727,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * Allows setting the offset in minutes after sunset for the Ateret Torah zmanim. The default if unset is * 40 minutes. Chacham Yosef Harari-Raful of Yeshivat Ateret Torah uses 40 minutes globally with the exception - * of Israel where a 25 minute offset is used. This 40 minute (or any other) offset can be overridden by this method. + * of Israel where a 25-minute offset is used. This 40 minute (or any other) offset can be overridden by this method. * This offset impacts all Ateret Torah zmanim. * * @param ateretTorahSunsetOffset @@ -2885,7 +2885,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * time of tzeis. It should be noted that this calculation results in the shortest time from sunset to * tzais being during the winter solstice, the longest at the summer solstice and 72 clock minutes at the * equinox. This does not match reality, since there is no direct relationship between the length of the day and - * twilight. The shortest twilight is during the equinox, the longest is during the the summer solstice, and in the + * twilight. The shortest twilight is during the equinox, the longest is during the summer solstice, and in the * winter with the shortest daylight, the twilight period is longer than during the equinoxes. * * @return the Date representing the time. If the calculation can't be computed such as in the Arctic @@ -2900,7 +2900,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * A utility method to return alos (dawn) or tzais (dusk) based on a fractional day offset. - * @param hours the number of shaaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn + * @param hours the number of shaos zmaniyos (temporal hours) before sunrise or after sunset that defines dawn * or dusk. If a negative number is passed in, it will return the time of alos (dawn) (subtracting the * time from sunrise) and if a positive number is passed in, it will return the time of tzais (dusk) * (adding the time to sunset). If 0 is passed in, a nil will be returned (since we can't tell if it @@ -3001,7 +3001,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * This method should be used lechumra only and returns tzais (dusk) calculated using 120 minutes * zmaniyos after ``getSeaLevelSunset()`` Since the zman - * is extremely late and at a point when the it is long past the 18° point where the darkest point is + * is extremely late and at a point when it is long past the 18° point where the darkest point is * reached, it should only be used lechumra, such as delaying the start of nighttime mitzvos. * * //@Deprecated This method should be used lechumra only since it returns a very late time, and if used @@ -3186,7 +3186,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * optional end of day to limit molad times to the end of the night before or beginning of the next night. * Ignored if either tzais or alos are nil * @param techila - * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, and + * is it the start of Kiddush Levana time or the end? If it is start roll it to the next tzais, * and if it is the end, return the end of the previous night (alos passed in). Ignored if either * alos or tzais are nil. * @return the molad based time. If the zman does not occur during the current date, nil will be @@ -3521,7 +3521,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * * @return the Date of the latest time of eating chametz. If it is not erev Pesach or the * calculation can't be computed such as in the Arctic Circle where there is at least one day a year where the sun does - * not rise, and one where it does not set), a nil will be returned. See detailed explanation on top of + * not rise, and one where it does not set, a nil will be returned. See detailed explanation on top of * the ``AstronomicalCalendar`` documentation. * @see getShaahZmanisMGA() * @see getAlos72() @@ -3563,7 +3563,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion * of the GRA. This time is 5 hours into the day based on the * opinion of the GRA that the day is calculated from @@ -3583,7 +3583,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of * the Magen Avraham (MGA) based on alos * being ``getAlos72()`` 72 minutes before ``getSunrise()`` This time is 5 @@ -3593,7 +3593,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * ``getAlos72()`` dawn. If it is not erev Pesach, a nil will be returned. * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not * erev Pesach or the calculation can't be computed such as in the Arctic Circle where there is at - * least one day a year where the sun does not rise, and one where it does not set), a nil will be + * least one day a year where the sun does not rise, and one where it does not set, a nil will be * returned. See detailed explanation on top of the ``AstronomicalCalendar`` documentation. * @see getShaahZmanisMGA() * @see getAlos72() @@ -3608,7 +3608,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion of * the Magen Avraham (MGA) based on alos * being ``getAlos72()`` 72 minutes before ``getSunrise()`` This time is 5 @@ -3618,7 +3618,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { * ``getAlos72()`` dawn. If it is not erev Pesach, a nil will be returned. * @return the Date of the latest time for burning chametz on Erev Pesach. If it is not * erev Pesach or the calculation can't be computed such as in the Arctic Circle where there is at - * least one day a year where the sun does not rise, and one where it does not set), a nil will be + * least one day a year where the sun does not rise, and one where it does not set, a nil will be * returned. See detailed explanation on top of the ``AstronomicalCalendar`` documentation. * @see getShaahZmanisMGA() * @see getAlos72() @@ -3633,7 +3633,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME adjust for syncronous + * FIXME adjust for synchronous * This method returns the latest time for burning chametz on Erev Pesach according to the opinion * of the Magen Avraham (MGA) based on alos * being ``getAlos16Point1Degrees()`` 16.1° before ``getSunrise()`` This time is 5 @@ -3864,7 +3864,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { } /** - * FIXME syncronous + * FIXME synchronous * This is a convenience method that returns the later of ``getMinchaGedolaBaalHatanya()`` and * ``getMinchaGedola30Minutes()`` In the winter when 1/2 of a ``getShaahZmanisBaalHatanya()`` * shaah zmanis is less than 30 minutes ``getMinchaGedola30Minutes()`` will be returned, otherwise @@ -4120,7 +4120,7 @@ public class ComplexZmanimCalendar : ZmanimCalendar { /** * Method to return tzais (dusk) calculated as 50 minutes after sea level sunset. This method returns * tzais (nightfall) based on the opinion of Rabbi Moshe Feinstein for the New York area. This time should - * not be used for latitudes different than the NY area. + * not be used for latitudes different from the NY area. * * @return the Date representing the time. If the calculation can't be computed such as in the Arctic * Circle where there is at least one day a year where the sun does not rise, and one where it does not set, diff --git a/Sources/KosherSwift/ZmanimCalendar.swift b/Sources/KosherSwift/ZmanimCalendar.swift index 7400097..ce68601 100644 --- a/Sources/KosherSwift/ZmanimCalendar.swift +++ b/Sources/KosherSwift/ZmanimCalendar.swift @@ -114,17 +114,17 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * Is ``getSunTransit()`` astronomical chatzos used for ``getChatzos()`` for enhanced accuracy. For - * example as the day is lengthens, the second half of the day is longer than the first and astronomical chatzos + * example as the day lengthens, the second half of the day is longer than the first and astronomical chatzos * would be a drop earlier than half of the time between sunrise and sunset. * * @todo In the future, if this is set to true, the following may change to enhance accuracy. {@link #getSofZmanShmaGRA() - * Sof zman Shma GRA} would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos + * Sof zman Shma GRA} would be calculated as 3 shaos zmaniyos after sunrise, but the shaos * zmaniyos would be calculated a a 6th of the time between sunrise and chatzos, as opposed to a 12th of the * time between sunrise and sunset. ``getMinchaGedola()`` will be calculated as half a * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical - * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. ``getPlagHamincha()`` Plag - * hamincha would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75 - * shaaos zmaniyos after sunrise. Etc. + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. ``getPlagHamincha()`` Plag + * hamincha would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 + * shaos zmaniyos after sunrise. Etc. * * @return if the use of astronomical chatzos is active. * @see #useAstronomicalChatzos @@ -171,13 +171,13 @@ public class ZmanimCalendar : AstronomicalCalendar { * Conversely, the second half of the day would be shorter in the fall season as the days start getting shorter. * * In the future, if this is set to true, the following may change to enhance accuracy. ``getSofZmanShmaGRA()`` - * would be calculated as 3 shaaos zmaniyos after sunrise, but the shaaos + * would be calculated as 3 shaos zmaniyos after sunrise, but the shaos * zmaniyos would be calculated as a 6th of the time between sunrise and chatzos, as opposed to a 12th of the * time between sunrise and sunset. ``getMinchaGedola()`` will be calculated as half a * shaah zmanis of afternoon hours (a 6th of the time between chatzos and sunset after astronomical - * chatzos as opposed to 6.5 shaaos zmaniyos after sunrise. ``getPlagHamincha()`` Plag - * hamincha would be calculated as 4.75 shaaos zmaniyos after astronomical chatzos as opposed to 10.75 - * shaaos zmaniyos after sunrise. Etc. + * chatzos as opposed to 6.5 shaos zmaniyos after sunrise. ``getPlagHamincha()`` Plag + * hamincha would be calculated as 4.75 shaos zmaniyos after astronomical chatzos as opposed to 10.75 + * shaos zmaniyos after sunrise. Etc. * * @return if the use of astronomical chatzos is active. * @see #useAstronomicalChatzosForOtherZmanim @@ -313,7 +313,7 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * Method to return alos (dawn) calculated using 72 minutes before ``getSunrise()`` or * ``getSeaLevelSunrise()`` (depending on the ``setUseElevation(useElevation:)`` setting). This time - * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72 minute time (but + * is based on the time to walk the distance of 4 Mil at 18 minutes a Mil. The 72-minute time (but * not the concept of fixed minutes) is based on the opinion that the time of the Neshef (twilight between * dawn and sunrise) does not vary by the time of year or location but depends on the time it takes to walk the * distance of 4 Mil. @@ -331,9 +331,9 @@ public class ZmanimCalendar : AstronomicalCalendar { * This method returns ``getSunTransit()`` Astronomical chatzos if the * ``AstronomicalCalculator`` class used supports it and * ``isUseAstronomicalChatzos()`` is set to true or the ``getChatzosAsHalfDay()`` - * halfway point between sunrise and sunset} if it does not support it or it is not configured to use it. There are currently + * halfway point between sunrise and sunset} if it does not support it, or it is not configured to use it. There are currently * two ``AstronomicalCalculator`` calculators available in the API, the default ``NOAACalculator`` and the ``SunTimesCalculator`` USNO - * calculator. The USNO calculator calculates chatzos as halfway between sunrise and sunset (identical to six shaaos + * calculator. The USNO calculator calculates chatzos as halfway between sunrise and sunset (identical to six shaos * zmaniyos after sunrise), while the ``NOAACalculator`` calculates it more accurately as ``getSunTransit()`` astronomical * chatzos. See The Definition of Chatzos * for a detailed explanation of the ways to calculate Chatzos. Since half-day chatzos can be nil in @@ -361,16 +361,16 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * Returns chatzos calculated as halfway between sunrise and sunset. Many are of the opinion that - * chatzos is calculated as the the midpoint between ``getSeaLevelSunrise()`` and + * chatzos is calculated as the midpoint between ``getSeaLevelSunrise()`` and * ``getSeaLevelSunset()``, despite it not being the most accurate way to calculate it. A day * starting at alos and ending at tzais using the same time or degree offset will also return * the same time. In reality due to lengthening or shortening of day, this is not necessarily the exact midpoint of * the day, but it is very close. This method allows you to use the ``NOAACalculator`` and still calculate chatzos - * as six shaaos zmaniyos after sunrise. There are currently two ``AstronomicalCalculator`` calculators available in the API, the + * as six shaos zmaniyos after sunrise. There are currently two ``AstronomicalCalculator`` calculators available in the API, the * ``NOAACalculator`` and the ``SunTimesCalculator``. - * The ``SunTimesCalculator`` calculates chatzos as halfway between sunrise and sunset (and of six shaaos + * The ``SunTimesCalculator`` calculates chatzos as halfway between sunrise and sunset (and of six shaos * zmaniyos), while the ``NOAACalculator`` calculates it as astronomical chatzos that is slightly more - * accurate. This method allows you to use the ``NOAACalculator`` and still calculate chatzos as six shaaos + * accurate. This method allows you to use the ``NOAACalculator`` and still calculate chatzos as six shaos * zmaniyos after sunrise. See The Definition * of Chatzos for a detailed explanation of the ways to calculate Chatzos. * @@ -483,8 +483,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * a Mil. According to the Machtzis Hashekel in * Orach Chaim 235:3, the Pri Megadim in Orach * Chaim 261:2 (see the Biur Halacha) and others (see Hazmanim Bahalacha 17:3 and 17:5) the 72 minutes are standard - * clock minutes any time of the year in any location. Depending on the ``setUseElevation(useElevation:)`` setting) a 72 - * minute offset from either ``getSunset()`` or ``getSeaLevelSunset()`` is used. + * clock minutes any time of the year in any location. Depending on the ``setUseElevation(useElevation:)`` setting, a 72-minute offset from either ``getSunset()`` or ``getSeaLevelSunset()`` is used. * * @see ComplexZmanimCalendar#getTzais16Point1Degrees() * @return the Date representing 72 minutes after sunset. If the calculation can't be @@ -527,7 +526,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * "https://en.wikipedia.org/wiki/Vilna_Gaon">GRA. This method's synchronous parameter indicates if the start * and end of day for the calculation are synchronous, having the same offset. This is typically the case, but some * zmanim calculations are based on a start and end at different offsets from the real start and end of the day, - * such as starting the day at alos and an ending it at tzais genoim or some other variant. If the day + * such as starting the day at alos and an ending it at tzais geonim or some other variant. If the day * is not synchronous a ``getHalfDayBasedZman(startOfHalfDay:endOfHalfDay:hours:)`` 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. @@ -618,12 +617,12 @@ public class ZmanimCalendar : AstronomicalCalendar { * of the day. As an example, passing ``getSunrise()`` and ``getSunset()`` or ``getSeaLevelSunrise()`` sea level sunrise and ``getSeaLevelSunset()`` (depending on the * ``isUseElevation()`` elevation setting) to this method will return mincha gedola according to the opinion of the * GRA. Alternatively, this method uses - * ``isUseAstronomicalChatzosForOtherZmanim()`` to control if the time is based on 6.5 sha'os zmaniyos into the day + * ``isUseAstronomicalChatzosForOtherZmanim()`` to control if the time is based on 6.5 shaos zmaniyos into the day * mentioned above, or as half an hour zmaniyos based on the second half of the day after chatzos (``getSunTransit()`` astronomical chatzos if supported by the ``AstronomicalCalculator`` calculator and * ``isUseAstronomicalChatzos()`` configured or ``getChatzosAsHalfDay()`` chatzos as half a day if not. This * method's synchronous parameter indicates if the start and end of day for the calculation are synchronous, having the same * offset. This is typically the case, but some zmanim calculations are based on a start and end at different offsets - * from the real start and end of the day, such as starting the day at alos and an ending it at tzais genoim + * from the real start and end of the day, such as starting the day at alos and an ending it at tzais geonim * or some other variant. If the day is not synchronous a ``getHalfDayBasedZman(startOfHalfDay:endOfHalfDay:hours:)`` 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. @@ -711,7 +710,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * * @param startOfDay * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos - * passed to to this method. + * passed to this method. * @param endOfDay * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais * passed to this method. @@ -741,7 +740,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * synchronous. Passing true when they are not synchronous is too much of a risk. See information on that method for more details. * @param startOfDay * the start of day for calculating samuch lemincha ketana. This can be sunrise or any alos - * passed to to this method. + * passed to this method. * @param endOfDay * the end of day for calculating samuch lemincha ketana. This can be sunset or any tzais * passed to this method. @@ -764,10 +763,10 @@ public class ZmanimCalendar : AstronomicalCalendar { * mincha ketana is calculated as 9.5 of those shaos zmaniyos after the beginning of the day. As an * example, passing ``getSunrise()`` and ``getSunset()`` or ``getSeaLevelSunrise()`` and ``getSeaLevelSunset()`` (depending on the ``setUseElevation(useElevation:)`` * elevation setting) to this method will return mincha ketana according to the opinion of the - * GRA. This method's synchronous parameter indicates ifthe start + * GRA. This method's synchronous parameter indicates if the start * and end of day for the calculation are synchronous, having the same offset. This is typically the case, but some * zmanim calculations are based on a start and end at different offsets from the real start and end of the day, - * such as starting the day at alos and an ending it at tzais genoim or some other variant. If the day + * such as starting the day at alos and an ending it at tzais geonim or some other variant. If the day * is not synchronous a ``getHalfDayBasedZman(startOfHalfDay:endOfHalfDay:hours:)`` 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. @@ -843,7 +842,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * GRA. This method's synchronous parameter indicates if * the start and end of day for the calculation are synchronous, having the same offset. This is typically the case, but * some zmanim calculations are based on a start and end at different offsets from the real start and end of the - * day, such as starting the day at alos and an ending it at tzais genoim or some other variant. If the + * day, such as starting the day at alos and an ending it at tzais geonim or some other variant. If the * day is not synchronous a ``getHalfDayBasedZman(startOfHalfDay:endOfHalfDay:hours:)`` 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. @@ -926,7 +925,7 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * A method that returns a shaah zmanis (temporal hour) according to the opinion of the Magen Avraham (MGA) based on a 72 minutes alos + * "https://en.wikipedia.org/wiki/Avraham_Gombinern">Magen Avraham (MGA) based on 72 minutes alos * and tzais. This calculation divides the day that runs from dawn to dusk (for sof zman krias shema and * tfila). Dawn for this calculation is 72 minutes before ``getSunrise()`` or ``getSeaLevelSunset()`` * sea level sunrise (depending on the ``setUseElevation(useElevation:)`` elevation setting) and dusk is 72 minutes after ``getSunset()`` sunset or ``getSeaLevelSunset()`` (depending on the ``setUseElevation(useElevation:)`` elevation @@ -967,7 +966,7 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * A method to get the offset in minutes before ``getSeaLevelSunset()`` sea level sunset which * is used in calculating candle lighting time. The default time used is 18 minutes before sea level sunset. Some - * calendars use 15 minutes, while the custom in Jerusalem is to use a 40 minute offset. Please check the local custom + * calendars use 15 minutes, while the custom in Jerusalem is to use a 40-minute offset. Please check the local custom * for candle lighting time. * * @return Returns the currently set candle lighting offset in minutes. @@ -981,7 +980,7 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * A method to set the offset in minutes before ``getSeaLevelSunset()`` sea level sunset that is * used in calculating candle lighting time. The default time used is 18 minutes before sunset. Some calendars use 15 - * minutes, while the custom in Jerusalem is to use a 40 minute offset. + * minutes, while the custom in Jerusalem is to use a 40-minute offset. * * @param candleLightingOffset * The candle lighting offset to set in minutes. @@ -1025,7 +1024,7 @@ public class ZmanimCalendar : AstronomicalCalendar { /** * A generic utility method for calculating any shaah zmanis (temporal hour) based zman with the - * day defined as the start and end of day (or night) and the number of shaahos zmaniyos passed to the + * day defined as the start and end of day (or night) and the number of shaos zmaniyos passed to the * method. This simplifies the code in other methods such as ``getPlagHamincha(startOfDay:endOfDay:)`` and cuts down on * code replication. As an example, passing ``getSunrise()`` and ``getSunset()`` or * ``getSeaLevelSunrise()`` and ``getSeaLevelSunset()`` (depending on the @@ -1039,8 +1038,8 @@ public class ZmanimCalendar : AstronomicalCalendar { * the end of day for calculating the zman. This can be sunset or any tzais passed to * this method. * @param hours - * the number of shaahos zmaniyos (temporal hours) to offset from the start of day - * @return the Date of the time of zman with the shaahos zmaniyos (temporal hours) + * the number of shaos zmaniyos (temporal hours) to offset from the start of day + * @return the Date of the time of zman with the shaos zmaniyos (temporal hours) * in the day offset from the start of day passed to this method. If the calculation can't be computed such * as in the Arctic Circle where there is at least one day a year where the sun does not rise, and one * where it does not set, a nil will be returned. See detailed explanation on top of the @@ -1099,7 +1098,7 @@ public class ZmanimCalendar : AstronomicalCalendar { * second half of the day, from chatzos to sunset / tzais. Morning based times are calculated. based on the first * 6 hours of the day, and afternoon times based on the second half of the day. As an example, passing 0.5, a start of * chatzos and an end of day as sunset will return the time of mincha gedola GRA as half an hour zmanis - * based on the second half of the day. Some zmanim calculations can be based on subtracting sha'os zmaniyos + * based on the second half of the day. Some zmanim calculations can be based on subtracting shaos zmaniyos * from the end of the day, and that is supported by passing a negative hour to this method. * * @param startOfHalfDay @@ -1109,9 +1108,9 @@ public class ZmanimCalendar : AstronomicalCalendar { * The end of the half day. This would be chatzos for morning based times such as sof zman krias shema * and sunset or tzais for afternoon based times such as mincha gedola. * @param hours - * The number of sha'os zmaniyos (hours) to offset the beginning of the first or second half of the day. For example, + * The number of shaos zmaniyos (hours) to offset the beginning of the first or second half of the day. For example, * 3 for sof zman Shma, 0.5 for mincha gedola (half an hour after chatzos) and 4.75 for plag - * hamincha. If the number of hours is negative, it will subtract the number of sha'os zmaniyos from the end + * hamincha. If the number of hours is negative, it will subtract the number of shaos zmaniyos from the end * of the day. * * @return the Date of zman based on calculation of the first or second half of the day. If the @@ -1137,7 +1136,7 @@ public class ZmanimCalendar : AstronomicalCalendar { } /** - * A utility method to calculate the length of a sha'ah zmanis based on 1/6 of a 6 hour day. + * A utility method to calculate the length of a sha'ah zmanis based on 1/6 of a 6-hour day. * @param startOfHalfDay The start of the half-day. This would be alos or sunrise for the first half of the day, * or chatzos for the second half of the day. * @param endOfHalfDay The end of the half-day. This would be chatzos for the first half of the day, or sunset or diff --git a/Sources/KosherSwift/hebrewcalendar/Daf.swift b/Sources/KosherSwift/hebrewcalendar/Daf.swift index 7ce75f7..7eed9e5 100644 --- a/Sources/KosherSwift/hebrewcalendar/Daf.swift +++ b/Sources/KosherSwift/hebrewcalendar/Daf.swift @@ -14,7 +14,7 @@ import Foundation */ public class Daf { /** - * ``getMasechtaNumber()`` and ``setMasechtaNumber(masechtaNumber:). + * See ``getMasechtaNumber()`` and ``setMasechtaNumber(masechtaNumber:). */ public var masechtaNumber:Int = 0 @@ -166,7 +166,7 @@ public class Daf { } /** - * Setter method to allow overriding of the default list of masechtos transliterated into into Latin chars. + * Setter method to allow overriding of the default list of masechtos transliterated into Latin chars. * The default values use Ashkenazi American English transliteration. * * @param masechtosBavliTransliterated the list of transliterated Bavli masechtos to set. @@ -217,7 +217,7 @@ public class Daf { } /** - * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into into Latin chars. + * Setter method to allow overriding of the default list of Yerushalmi masechtos transliterated into Latin chars. * The default uses Ashkenazi American English transliteration. * * @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi masechtos to set. @@ -227,7 +227,7 @@ public class Daf { } /** - * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into into Latin chars. + * Getter method to allow retrieving the list of Yerushalmi masechtos transliterated into Latin chars. * The default uses Ashkenazi American English transliteration. * * @return the array of transliterated masechta (tractate) names of the Daf Yomi Yerushalmi. diff --git a/Sources/KosherSwift/hebrewcalendar/HebrewDateFormatter.swift b/Sources/KosherSwift/hebrewcalendar/HebrewDateFormatter.swift index e2f2338..a827ee1 100644 --- a/Sources/KosherSwift/hebrewcalendar/HebrewDateFormatter.swift +++ b/Sources/KosherSwift/hebrewcalendar/HebrewDateFormatter.swift @@ -326,7 +326,7 @@ public class HebrewDateFormatter { * @see #getTransliteratedShabbosDayOfWeek() * @see #setTransliteratedShabbosDayOfWeek(String) */ - public var transliteratedShabbosDayOfweek = "Shabbos"; + public var transliteratedShabbosDayOfWeek = "Shabbos"; /** * Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation "Shabbos". @@ -337,7 +337,7 @@ public class HebrewDateFormatter { * @see #formatDayOfWeek(JewishCalendar) */ public func getTransliteratedShabbosDayOfWeek() -> String { - return transliteratedShabbosDayOfweek; + return transliteratedShabbosDayOfWeek; } /** @@ -351,7 +351,7 @@ public class HebrewDateFormatter { * @see #formatDayOfWeek(JewishCalendar) */ public func setTransliteratedShabbosDayOfWeek(transliteratedShabbos:String) { - self.transliteratedShabbosDayOfweek = transliteratedShabbos; + self.transliteratedShabbosDayOfWeek = transliteratedShabbos; } /** @@ -555,7 +555,7 @@ public class HebrewDateFormatter { * pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar - * "Adar", "Adar II", "Adar I" * - * @return the list of months beginning in Nissan and ending in in "Adar", "Adar II", "Adar I". The default list is + * @return the list 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[]) @@ -565,7 +565,7 @@ public class HebrewDateFormatter { } /** - * Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default + * Setter method to allow overriding of the default list of months transliterated into Latin chars. The default * uses Ashkenazi American English transliteration. * * @param transliteratedMonths @@ -679,7 +679,7 @@ public class HebrewDateFormatter { * שבט ו׳ אלפים show the use of the Geresh. * * @param useGershGershayim - * set to false to omit the Geresh ׳ and Gershayim ״ in formatting + * set this to false to omit the Geresh ׳ and Gershayim ״ in formatting */ public func setUseGershGershayim(useGershGershayim:Bool) { self.useGershGershayim = useGershGershayim; @@ -687,7 +687,7 @@ public class HebrewDateFormatter { /** * Returns whether the class is set to use the מנצפ״ך letters when - * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false or + * formatting years ending in 20, 40, 50, 80 and 90 to produce תש״פ if false * or תש״ף if true. Traditionally non-final form letters are used, so the year * 5780 would be formatted as תש״פ if the default false is used here. If this returns * true, the format תש״ף would be used. @@ -863,17 +863,17 @@ public class HebrewDateFormatter { public func getFormattedKviah(jewishYear:Int) -> String{ let jewishCalendar = JewishCalendar(jewishYear: jewishYear, jewishMonth: JewishCalendar.TISHREI, jewishDayOfMonth: 1); // set date to Rosh Hashana let kviah = jewishCalendar.getCheshvanKislevKviah(); - let roshHashanaDayOfweek = jewishCalendar.getDayOfWeek(); - var returnValue = formatHebrewNumber(number: roshHashanaDayOfweek); + let roshHashanaDayOfWeek = jewishCalendar.getDayOfWeek(); + var returnValue = formatHebrewNumber(number: roshHashanaDayOfWeek); returnValue += (kviah == JewishCalendar.CHASERIM ? "\u{05D7}" : kviah == JewishCalendar.SHELAIMIM ? "\u{05E9}" : "\u{05DB}"); jewishCalendar.setJewishDate(year: jewishYear, month: JewishCalendar.NISSAN, dayOfMonth: 15); // set to Pesach of the given year - let pesachDayOfweek = jewishCalendar.getDayOfWeek(); - returnValue += formatHebrewNumber(number: pesachDayOfweek); + let pesachDayOfWeek = jewishCalendar.getDayOfWeek(); + returnValue += formatHebrewNumber(number: pesachDayOfWeek); returnValue = returnValue.replacingOccurrences(of: HebrewDateFormatter.GERESH, with: "");// geresh is never used in the kviah format // boolean isLeapYear = JewishCalendar.isJewishLeapYear(jewishYear); // for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh - // Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for - // a 385 day year + // Hashana for a 353-day year, 2 for a 354-day year, 3 for a 355 or 383-day year, 4 for a 384-day year and 5 for + // a 385-day year return returnValue; } @@ -916,7 +916,7 @@ public class HebrewDateFormatter { } /** - * Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999. + * Returns a Hebrew formatted string of a number. The method can calculate from 0 to 9999. *