Skip to content

Commit

Permalink
fix typos (#223)
Browse files Browse the repository at this point in the history
Thanks @Elyahu41
  • Loading branch information
Elyahu41 authored Jan 12, 2024
1 parent 93f441f commit 2638fc3
Show file tree
Hide file tree
Showing 20 changed files with 266 additions and 272 deletions.
24 changes: 12 additions & 12 deletions src/main/java/com/kosherjava/zmanim/AstronomicalCalendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* <code>{@link java.util.Date}</code> is expected and {@link Long#MIN_VALUE} when a <code>long</code> is expected. The
* reason that <code>Exception</code>s 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.
*
* <p>
* 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:
*
Expand Down Expand Up @@ -107,7 +107,7 @@ public class AstronomicalCalendar implements Cloneable {
private AstronomicalCalculator astronomicalCalculator;

/**
* The getSunrise method Returns a <code>Date</code> representing the
* The getSunrise method returns a <code>Date</code> representing the
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunrise time. The zenith used
* for the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90&deg; plus
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
Expand Down Expand Up @@ -192,7 +192,7 @@ public Date getBeginAstronomicalTwilight() {
}

/**
* The getSunset method Returns a <code>Date</code> representing the
* The getSunset method returns a <code>Date</code> representing the
* {@link AstronomicalCalculator#getElevationAdjustment(double) elevation adjusted} sunset time. The zenith used for
* the calculation uses {@link #GEOMETRIC_ZENITH geometric zenith} of 90&deg; plus
* {@link AstronomicalCalculator#getElevationAdjustment(double)}. This is adjusted by the
Expand Down Expand Up @@ -367,8 +367,8 @@ public AstronomicalCalendar() {
/**
* A constructor that takes in <a href="https://en.wikipedia.org/wiki/Geolocation">geolocation</a> information as a
* parameter. The default {@link AstronomicalCalculator#getDefault() AstronomicalCalculator} used for solar
* calculations is the the {@link com.kosherjava.zmanim.util.NOAACalculator}.
*
* calculations is the more accurate {@link com.kosherjava.zmanim.util.NOAACalculator}.
*
* @param geoLocation
* The location information used for calculating astronomical sun times.
*
Expand Down Expand Up @@ -470,7 +470,7 @@ public long getTemporalHour() {
* non-elevation adjusted temporal hour by passing in {@link #getSeaLevelSunrise() sea level sunrise} and
* {@link #getSeaLevelSunset() sea level sunset} as parameters.
*
* @param startOfday
* @param startOfDay
* The start of the day.
* @param endOfDay
* The end of the day.
Expand All @@ -480,11 +480,11 @@ public long getTemporalHour() {
*
* @see #getTemporalHour()
*/
public long getTemporalHour(Date startOfday, Date endOfDay) {
if (startOfday == null || endOfDay == null) {
public long getTemporalHour(Date startOfDay, Date endOfDay) {
if (startOfDay == null || endOfDay == null) {
return Long.MIN_VALUE;
}
return (endOfDay.getTime() - startOfday.getTime()) / 12;
return (endOfDay.getTime() - startOfDay.getTime()) / 12;
}

/**
Expand Down Expand Up @@ -562,8 +562,8 @@ public Date getSunTransit(Date startOfDay, Date endOfDay) {
* @param time
* The time to be set as the time for the <code>Date</code>. The time expected is in the format: 18.75
* for 6:45:00 PM.time is sunrise and false if it is sunset
* @param isSunrise true if the
* @return The Date.
* @param isSunrise true if this time is for sunrise
* @return The Date object representation of the time double
*/
protected Date getDateFromTime(double time, boolean isSunrise) {
if (Double.isNaN(time)) {
Expand Down Expand Up @@ -786,7 +786,7 @@ public AstronomicalCalculator getAstronomicalCalculator() {
* different algorithms, including the default {@link com.kosherjava.zmanim.util.NOAACalculator} based on <a href=
* "https://noaa.gov">NOAA's</a> implementation of Jean Meeus's algorithms as well as {@link
* com.kosherjava.zmanim.util.SunTimesCalculator} based on the <a href = "https://www.cnmoc.usff.navy.mil/usno/">US
* Naval Observatory's</a> algorithm,. This allows easy runtime switching and comparison of different algorithms.
* Naval Observatory's</a> algorithm. This allows easy runtime switching and comparison of different algorithms.
*
* @param astronomicalCalculator
* The astronomicalCalculator to set.
Expand Down
100 changes: 50 additions & 50 deletions src/main/java/com/kosherjava/zmanim/ComplexZmanimCalendar.java

Large diffs are not rendered by default.

116 changes: 58 additions & 58 deletions src/main/java/com/kosherjava/zmanim/ZmanimCalendar.java

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/main/java/com/kosherjava/zmanim/hebrewcalendar/Daf.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
public class Daf {
/**
* {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.
* See {@link #getMasechtaNumber()} and {@link #setMasechtaNumber(int)}.
*/
private int masechtaNumber;

Expand Down Expand Up @@ -159,7 +159,7 @@ public String getMasechtaTransliterated() {
}

/**
* Setter method to allow overriding of the default list of <em>masechtos</em> transliterated into into Latin chars.
* Setter method to allow overriding of the default list of <em>masechtos</em> transliterated into Latin chars.
* The default values use Ashkenazi American English transliteration.
*
* @param masechtosBavliTransliterated the list of transliterated Bavli <em>masechtos</em> to set.
Expand Down Expand Up @@ -220,7 +220,7 @@ public String getYerushlmiMasechtaTransliterated() {
}

/**
* Setter method to allow overriding of the default list of Yerushalmi <em>masechtos</em> transliterated into into Latin chars.
* Setter method to allow overriding of the default list of Yerushalmi <em>masechtos</em> transliterated into Latin chars.
* The default uses Ashkenazi American English transliteration.
*
* @param masechtosYerushalmiTransliterated the list of transliterated Yerushalmi <em>masechtos</em> to set.
Expand All @@ -240,7 +240,7 @@ public void setYerushlmiMasechtaTransliterated(String[] masechtosYerushalmiTrans
}

/**
* Getter method to allow retrieving the list of Yerushalmi <em>masechtos</em> transliterated into into Latin chars.
* Getter method to allow retrieving the list of Yerushalmi <em>masechtos</em> transliterated into Latin chars.
* The default uses Ashkenazi American English transliteration.
*
* @return the array of transliterated <em>masechta</em> (tractate) names of the Daf Yomi Yerushalmi.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* The HebrewDateFormatter class formats a {@link JewishDate}.
*
* <p>
* The class formats Jewish dates, numbers, <em>Daf Yomi</em> (<em>Bavli</em> and <em>Yerushalmi</em>), the <em>Omer</em>,
* <em>Parshas Hashavua</em> (including the special <em>parshiyos</em> of <em>Shekalim</em>, <em>Zachor</em>, <em>Parah</em>
* and <em>Hachodesh</em>), Yomim Tovim and the Molad (experimental) in Hebrew or Latin chars, and has various settings.
Expand Down Expand Up @@ -333,7 +333,7 @@ public void setLongWeekFormat(boolean longWeekFormat) {
* @see #getTransliteratedShabbosDayOfWeek()
* @see #setTransliteratedShabbosDayOfWeek(String)
*/
private String transliteratedShabbosDayOfweek = "Shabbos";
private String transliteratedShabbosDayOfWeek = "Shabbos";

/**
* Returns the day of Shabbos transliterated into Latin chars. The default uses Ashkenazi pronunciation "Shabbos".
Expand All @@ -344,7 +344,7 @@ public void setLongWeekFormat(boolean longWeekFormat) {
* @see #formatDayOfWeek(JewishDate)
*/
public String getTransliteratedShabbosDayOfWeek() {
return transliteratedShabbosDayOfweek;
return transliteratedShabbosDayOfWeek;
}

/**
Expand All @@ -358,7 +358,7 @@ public String getTransliteratedShabbosDayOfWeek() {
* @see #formatDayOfWeek(JewishDate)
*/
public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) {
this.transliteratedShabbosDayOfweek = transliteratedShabbos;
this.transliteratedShabbosDayOfWeek = transliteratedShabbos;
}

/**
Expand All @@ -377,7 +377,7 @@ public void setTransliteratedShabbosDayOfWeek(String transliteratedShabbos) {
* {@link #formatYomTov(JewishCalendar)} when formatting the Yom Tov String. The default list of months uses
* Ashkenazi pronunciation in typical American English spelling.
*
* @return the list of transliterated holidays. The default list is currently ["Erev Pesach", "Pesach",
* @return the array of transliterated holidays. The default list is currently ["Erev Pesach", "Pesach",
* "Chol Hamoed Pesach", "Pesach Sheni", "Erev Shavuos", "Shavuos", "Seventeenth of Tammuz", "Tishah B'Av",
* "Tu B'Av", "Erev Rosh Hashana", "Rosh Hashana", "Fast of Gedalyah", "Erev Yom Kippur", "Yom Kippur",
* "Erev Succos", "Succos", "Chol Hamoed Succos", "Hoshana Rabbah", "Shemini Atzeres", "Simchas Torah",
Expand Down Expand Up @@ -580,7 +580,7 @@ public void setHebrewOmerPrefix(String hebrewOmerPrefix) {
* pronunciation in typical American English spelling. This list has a length of 14 with 3 variations for Adar -
* "Adar", "Adar II", "Adar I"
*
* @return the list of months beginning in Nissan and ending in in "Adar", "Adar II", "Adar I". The default list is
* @return the array of months beginning in Nissan and ending in "Adar", "Adar II", "Adar I". The default list is
* currently ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", "Kislev", "Teves",
* "Shevat", "Adar", "Adar II", "Adar I"].
* @see #setTransliteratedMonthList(String[])
Expand All @@ -590,7 +590,7 @@ public String[] getTransliteratedMonthList() {
}

/**
* Setter method to allow overriding of the default list of months transliterated into into Latin chars. The default
* Setter method to allow overriding of the default list of months transliterated into Latin chars. The default
* uses Ashkenazi American English transliteration.
*
* @param transliteratedMonths
Expand Down Expand Up @@ -680,7 +680,7 @@ public boolean isUseGershGershayim() {
* &#x05E9;&#x05D1;&#x05D8; &#x05D5;&#x05F3; &#x05D0;&#x05DC;&#x05E4;&#x05D9;&#x05DD; show the use of the Geresh.
*
* @param useGershGershayim
* set to false to omit the Geresh &#x5F3; and Gershayim &#x5F4; in formatting
* set this to false to omit the Geresh &#x5F3; and Gershayim &#x5F4; in formatting
*/
public void setUseGershGershayim(boolean useGershGershayim) {
this.useGershGershayim = useGershGershayim;
Expand All @@ -689,7 +689,7 @@ public void setUseGershGershayim(boolean useGershGershayim) {
/**
* Returns whether the class is set to use the &#x05DE;&#x05E0;&#x05E6;&#x05E4;&#x05F4;&#x05DA; letters when
* formatting years ending in 20, 40, 50, 80 and 90 to produce &#x05EA;&#x05E9;&#x05F4;&#x05E4; if false or
* or &#x05EA;&#x05E9;&#x05F4;&#x05E3; if true. Traditionally non-final form letters are used, so the year
* &#x05EA;&#x05E9;&#x05F4;&#x05E3; if true. Traditionally non-final form letters are used, so the year
* 5780 would be formatted as &#x05EA;&#x05E9;&#x05F4;&#x05E4; if the default false is used here. If this returns
* true, the format &#x05EA;&#x05E9;&#x05F4;&#x05E3; would be used.
*
Expand Down Expand Up @@ -859,17 +859,17 @@ private static String formatMolad(long moladChalakim) {
public String getFormattedKviah(int jewishYear) {
JewishDate jewishDate = new JewishDate(jewishYear, JewishDate.TISHREI, 1); // set date to Rosh Hashana
int kviah = jewishDate.getCheshvanKislevKviah();
int roshHashanaDayOfweek = jewishDate.getDayOfWeek();
String returnValue = formatHebrewNumber(roshHashanaDayOfweek);
int roshHashanaDayOfWeek = jewishDate.getDayOfWeek();
String returnValue = formatHebrewNumber(roshHashanaDayOfWeek);
returnValue += (kviah == JewishDate.CHASERIM ? "\u05D7" : kviah == JewishDate.SHELAIMIM ? "\u05E9" : "\u05DB");
jewishDate.setJewishDate(jewishYear, JewishDate.NISSAN, 15); // set to Pesach of the given year
int pesachDayOfweek = jewishDate.getDayOfWeek();
returnValue += formatHebrewNumber(pesachDayOfweek);
int pesachDayOfWeek = jewishDate.getDayOfWeek();
returnValue += formatHebrewNumber(pesachDayOfWeek);
returnValue = returnValue.replaceAll(GERESH, "");// geresh is never used in the kviah format
// boolean isLeapYear = JewishDate.isJewishLeapYear(jewishYear);
// for efficiency we can avoid the expensive recalculation of the pesach day of week by adding 1 day to Rosh
// Hashana for a 353 day year, 2 for a 354 day year, 3 for a 355 or 383 day year, 4 for a 384 day year and 5 for
// a 385 day year
// Hashana for a 353-day year, 2 for a 354-day year, 3 for a 355 or 383 day year, 4 for a 384-day year and 5 for
// a 385-day year
return returnValue;
}

Expand Down Expand Up @@ -912,7 +912,7 @@ public String formatDafYomiYerushalmi(Daf daf) {
}

/**
* Returns a Hebrew formatted string of a number. The method can calculate from 0 - 9999.
* Returns a Hebrew formatted string of a number. The method can calculate from 0 to 9999.
* <ul>
* <li>Single digit numbers such as 3, 30 and 100 will be returned with a &#x5F3; (<a
* href="http://en.wikipedia.org/wiki/Geresh">Geresh</a>) appended as at the end. For example &#x5D2;&#x5F3;,
Expand Down Expand Up @@ -969,7 +969,7 @@ public String formatHebrewNumber(int number) {
sb.append(GERESH);
}
sb.append(" ");
sb.append(ALAFIM); // add # of thousands plus word thousand (overide alafim boolean)
sb.append(ALAFIM); // add # of thousands plus the word "thousand" (override alafim boolean)
return sb.toString();
} else if (useLonghebrewYears && number >= 1000) { // if alafim boolean display thousands
sb.append(jOnes[thousands]);
Expand All @@ -988,7 +988,7 @@ public String formatHebrewNumber(int number) {
sb.append(tavTaz[1]);
} else {
int tens = number / 10;
if (number % 10 == 0) { // if evenly divisable by 10
if (number % 10 == 0) { // if evenly divisible by 10
if (!singleDigitNumber) {
if(isUseFinalFormLetters()) {
sb.append(jTenEnds[tens]); // years like 5780 will end with a final form &#x05E3;
Expand All @@ -1015,16 +1015,16 @@ public String formatHebrewNumber(int number) {
}

/**
* Retruns the list of transliterated parshiyos used by this formatter.
* Returns the map of transliterated parshiyos used by this formatter.
*
* @return the list of transliterated Parshios
* @return the map of transliterated Parshios
*/
public EnumMap<JewishCalendar.Parsha, String> getTransliteratedParshiosList() {
return transliteratedParshaMap;
}

/**
* Setter method to allow overriding of the default list of parshiyos transliterated into into Latin chars. The
* Setter method to allow overriding of the default list of parshiyos transliterated into Latin chars. The
* default uses Ashkenazi American English transliteration.
*
* @param transliteratedParshaMap
Expand Down
Loading

0 comments on commit 2638fc3

Please sign in to comment.