diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java index 71fa8f12..fb2250d7 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/HebrewDateFormatter.java @@ -313,12 +313,12 @@ public void setLongWeekFormat(boolean longWeekFormat) { private static final String GERSHAYIM = "\u05F4"; /** - * Transliterated month names.  Defaults to ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", + * Transliterated month names.  Defaults to ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Marcheshvan", * "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" ]. * @see #getTransliteratedMonthList() * @see #setTransliteratedMonthList(String[]) */ - private String[] transliteratedMonths = { "Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Cheshvan", + private String[] transliteratedMonths = { "Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Marcheshvan", "Kislev", "Teves", "Shevat", "Adar", "Adar II", "Adar I" }; /** @@ -581,7 +581,7 @@ public void setHebrewOmerPrefix(String hebrewOmerPrefix) { * "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", + * currently ["Nissan", "Iyar", "Sivan", "Tammuz", "Av", "Elul", "Tishrei", "Marcheshvan", "Kislev", "Teves", * "Shevat", "Adar", "Adar II", "Adar I"]. * @see #setTransliteratedMonthList(String[]) */ @@ -595,7 +595,7 @@ public String[] getTransliteratedMonthList() { * * @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"]. + * "Marheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II", "Adar I"]. * @see #getTransliteratedMonthList() */ public void setTransliteratedMonthList(String[] transliteratedMonths) { @@ -605,14 +605,14 @@ 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", + * "\u05EA\u05E9\u05E8\u05D9","\u05DE\u05E8\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) */ private static final 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", + "\u05EA\u05E9\u05E8\u05D9", "\u05DE\u05E8\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" }; @@ -845,7 +845,7 @@ private static String formatMolad(long moladChalakim) { /** * 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 + * Rosh Hashana, the second letter represents the lengths of Marcheshvan and Kislev ({@link JewishDate#SHELAIMIM * Shelaimim} , {@link JewishDate#KESIDRAN Kesidran} or {@link JewishDate#CHASERIM Chaserim}) and the 3rd letter * represents the day of week of Pesach. For example 5729 (1969) would return בשה (Rosh Hashana on * Monday, Shelaimim, and Pesach on Thursday), while 5771 (2011) would return השג (Rosh Hashana on @@ -858,7 +858,7 @@ 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 kviah = jewishDate.getMarcheshvanKislevKviah(); int roshHashanaDayOfWeek = jewishDate.getDayOfWeek(); String returnValue = formatHebrewNumber(roshHashanaDayOfWeek); returnValue += (kviah == JewishDate.CHASERIM ? "\u05D7" : kviah == JewishDate.SHELAIMIM ? "\u05E9" : "\u05DB"); diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java index acc987f2..73c929aa 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishCalendar.java @@ -142,7 +142,7 @@ public class JewishCalendar extends JewishDate { public static final int YOM_KIPPUR_KATAN = 36; /** - * The Monday, Thursday and Monday after the first Shabbos after Rosh Chodesh Cheshvan and Iyar) are BeHab + * The Monday, Thursday and Monday after the first Shabbos after Rosh Chodesh Marcheshvan and Iyar) are BeHab * days. This constant is not actively in use. * @see #isBeHaB() */ @@ -409,7 +409,7 @@ private int getParshaYearType() { } return 6; } - if (isCheshvanLong()) { //BaSh + if (isMarcheshvanLong()) { //BaSh if (getInIsrael()) { return 15; } @@ -425,7 +425,7 @@ private int getParshaYearType() { if (isKislevShort()) { //HaCh return 8; } - if (isCheshvanLong()) { //HaSh + if (isMarcheshvanLong()) { //HaSh return 9; } break; @@ -433,7 +433,7 @@ private int getParshaYearType() { if (isKislevShort()) { //ZaCh return 10; } - if (isCheshvanLong()) { //ZaSh + if (isMarcheshvanLong()) { //ZaSh if (getInIsrael()) { return 16; } @@ -447,7 +447,7 @@ private int getParshaYearType() { if (isKislevShort()) { //BaCh return 0; } - if (isCheshvanLong()) { //BaSh + if (isMarcheshvanLong()) { //BaSh if (getInIsrael()) { return 12; } @@ -460,7 +460,7 @@ private int getParshaYearType() { } return 1; case Calendar.THURSDAY: - if (isCheshvanLong()) { //HaSh + if (isMarcheshvanLong()) { //HaSh return 3; } if (!isKislevShort()) { //Hak @@ -474,7 +474,7 @@ private int getParshaYearType() { if (isKislevShort()) { //ZaCh return 4; } - if (isCheshvanLong()) { //ZaSh + if (isMarcheshvanLong()) { //ZaSh return 5; } break; @@ -1047,7 +1047,7 @@ public boolean isErevRoshChodesh() { /** * Returns true if the current day is Yom Kippur Katan. Returns false for Erev Rosh Hashana, - * Erev Rosh Chodesh Cheshvan, Teves and Iyyar. If Erev Rosh Chodesh occurs + * Erev Rosh Chodesh Marcheshvan, Teves and Iyyar. If Erev Rosh Chodesh occurs * on a Friday or Shabbos, Yom Kippur Katan is moved back to Thursday. * * @return true if the current day is Erev Rosh Chodesh. Returns false for Erev Rosh Hashana. @@ -1069,7 +1069,7 @@ public boolean isYomKippurKatan() { /** * The Monday, Thursday and Monday after the first Shabbos after {@link #isRoshChodesh() Rosh Chodesh} - * {@link JewishDate#CHESHVAN Cheshvan} and {@link JewishDate#IYAR Iyar} are Marcheshvan} and {@link JewishDate#IYAR Iyar} are BeHaB days. If the last Monday of Iyar's BeHaB coincides with {@link * #PESACH_SHENI Pesach Sheni}, the method currently considers it both Pesach Sheni and BeHaB. * As seen in an Ohr Sameach article on the subject The @@ -1416,7 +1416,7 @@ public int getTekufasTishreiElapsedDays() { @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 + // The 7th Marcheshvan can't occur on Shabbos, so always return true for 7 Marcheshvan return getJewishMonth() == CHESHVAN && getJewishDayOfMonth() == 7; } else { if (getDayOfWeek() == Calendar.SATURDAY) { //Not recited on Friday night @@ -1450,7 +1450,7 @@ public boolean isVeseinTalUmatarStartDate() { @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 + // The 7th Marcheshvan can't occur on Shabbos, so always return true for 6 Marcheshvan return getJewishMonth() == CHESHVAN && getJewishDayOfMonth() == 6; } else { if (getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java index eb47d309..ad2cc04a 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/JewishDate.java @@ -104,7 +104,7 @@ public class JewishDate implements Comparable, Cloneable { public static final int TISHREI = 7; /** - * Value of the month field indicating Cheshvan/marcheshvan, the eighth numeric month of the year in the Jewish + * Value of the month field indicating Marcheshvan/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; @@ -166,7 +166,7 @@ public class JewishDate implements Comparable, Cloneable { /** * A short year where both {@link #CHESHVAN} and {@link #KISLEV} are 29 days. * - * @see #getCheshvanKislevKviah() + * @see #getMarcheshvanKislevKviah() * @see HebrewDateFormatter#getFormattedKviah(int) */ public static final int CHASERIM = 0; @@ -174,7 +174,7 @@ public class JewishDate implements Comparable, Cloneable { /** * An ordered year where {@link #CHESHVAN} is 29 days and {@link #KISLEV} is 30 days. * - * @see #getCheshvanKislevKviah() + * @see #getMarcheshvanKislevKviah() * @see HebrewDateFormatter#getFormattedKviah(int) */ public static final int KESIDRAN = 1; @@ -182,7 +182,7 @@ public class JewishDate implements Comparable, Cloneable { /** * A long year where both {@link #CHESHVAN} and {@link #KISLEV} are 30 days. * - * @see #getCheshvanKislevKviah() + * @see #getMarcheshvanKislevKviah() * @see HebrewDateFormatter#getFormattedKviah(int) */ public static final int SHELAIMIM = 2; @@ -689,7 +689,7 @@ private static void validateGregorianYear(int year) { * @param year * the Jewish year * @return the number of days for a given Jewish year. - * @see #isCheshvanLong() + * @see #isMarcheshvanLong() * @see #isKislevShort() */ public static int getDaysInJewishYear(int year) { @@ -700,7 +700,7 @@ public static int getDaysInJewishYear(int 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 #isMarcheshvanLong() * @see #isKislevShort() * @see #isJewishLeapYear() */ @@ -709,28 +709,28 @@ public int getDaysInJewishYear() { } /** - * 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 + * Returns if Marcheshvan is long in a given Jewish year. The method name isLong is done since in a Kesidran (ordered) + * year Marcheshvan is short. ND+ER * * @param year * the year - * @return true if Cheshvan is long in Jewish year. - * @see #isCheshvanLong() - * @see #getCheshvanKislevKviah() + * @return true if Marcheshvan is long in Jewish year. + * @see #isMarcheshvanLong() + * @see #getMarcheshvanKislevKviah() */ - private static boolean isCheshvanLong(int year) { + private static boolean isMarcheshvanLong(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. + * Returns if Marcheshvan 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 Marcheshvan is short. * - * @return true if Cheshvan is long for the current year that the calendar is set to - * @see #isCheshvanLong() + * @return true if Marcheshvan is long for the current year that the calendar is set to + * @see #isMarcheshvanLong() */ - public boolean isCheshvanLong() { - return isCheshvanLong(getJewishYear()); + public boolean isMarcheshvanLong() { + return isMarcheshvanLong(getJewishYear()); } /** @@ -741,7 +741,7 @@ public boolean isCheshvanLong() { * the Jewish year * @return true if Kislev is short for the given Jewish year. * @see #isKislevShort() - * @see #getCheshvanKislevKviah() + * @see #getMarcheshvanKislevKviah() */ private static boolean isKislevShort(int year) { return getDaysInJewishYear(year) % 10 == 3; @@ -758,19 +758,19 @@ public boolean isKislevShort() { } /** - * 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 + * Returns the Marcheshvan 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 Marcheshvan 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 + * @return {@link #SHELAIMIM} if both cheshvan and kislev are 30 days, {@link #KESIDRAN} if Marcheshvan is 29 days and * Kislev is 30 days and {@link #CHASERIM} if both are 29 days. - * @see #isCheshvanLong() + * @see #isMarcheshvanLong() * @see #isKislevShort() */ - public int getCheshvanKislevKviah() { - if (isCheshvanLong() && !isKislevShort()) { + public int getMarcheshvanKislevKviah() { + if (isMarcheshvanLong() && !isKislevShort()) { return SHELAIMIM; - } else if (!isCheshvanLong() && isKislevShort()) { + } else if (!isMarcheshvanLong() && isKislevShort()) { return CHASERIM; } else { return KESIDRAN; @@ -787,7 +787,7 @@ public int getCheshvanKislevKviah() { * @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))) + if ((month == IYAR) || (month == TAMMUZ) || (month == ELUL) || ((month == CHESHVAN) && !(isMarcheshvanLong(year))) || ((month == KISLEV) && isKislevShort(year)) || (month == TEVES) || ((month == ADAR) && !(isJewishLeapYear(year))) || (month == ADAR_II)) { return 29; diff --git a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java index 13556a06..01df84ed 100644 --- a/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java +++ b/src/main/java/com/kosherjava/zmanim/hebrewcalendar/TefilaRules.java @@ -242,7 +242,7 @@ public boolean isTachanunRecitedMincha(JewishCalendar jewishCalendar) { */ public boolean isVeseinTalUmatarStartDate(JewishCalendar jewishCalendar) { if (jewishCalendar.getInIsrael()) { - // The 7th Cheshvan can't occur on Shabbos, so always return true for 7 Cheshvan + // The 7th Marcheshvan can't occur on Shabbos, so always return true for 7 Marcheshvan return jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 7; } else { if (jewishCalendar.getDayOfWeek() == Calendar.SATURDAY) { //Not recited on Friday night @@ -275,7 +275,7 @@ public boolean isVeseinTalUmatarStartDate(JewishCalendar jewishCalendar) { */ public boolean isVeseinTalUmatarStartingTonight(JewishCalendar jewishCalendar) { if (jewishCalendar.getInIsrael()) { - // The 7th Cheshvan can't occur on Shabbos, so always return true for 6 Cheshvan + // The 7th Marcheshvan can't occur on Shabbos, so always return true for 6 Marcheshvan return jewishCalendar.getJewishMonth() == JewishDate.CHESHVAN && jewishCalendar.getJewishDayOfMonth() == 6; } else { if (jewishCalendar.getDayOfWeek() == Calendar.FRIDAY) { //Not recited on Friday night diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInJewishMonth.java b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInJewishMonth.java index 2e549b98..19c3022e 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInJewishMonth.java +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/UT_DaysInJewishMonth.java @@ -62,7 +62,7 @@ private void assertHaser(int year) { JewishDate jewishDate = new JewishDate(); jewishDate.setJewishYear(year); - Assert.assertFalse(jewishDate.isCheshvanLong()); + Assert.assertFalse(jewishDate.isMarcheshvanLong()); Assert.assertTrue(jewishDate.isKislevShort()); } @@ -80,7 +80,7 @@ private void assertQesidrah(int year) { JewishDate jewishDate = new JewishDate(); jewishDate.setJewishYear(year); - Assert.assertFalse(jewishDate.isCheshvanLong( )); + Assert.assertFalse(jewishDate.isMarcheshvanLong( )); Assert.assertFalse(jewishDate.isKislevShort( )); } @@ -98,7 +98,7 @@ private void assertShalem(int year) { JewishDate jewishDate = new JewishDate(); jewishDate.setJewishYear(year); - Assert.assertTrue(jewishDate.isCheshvanLong( )); + Assert.assertTrue(jewishDate.isMarcheshvanLong( )); Assert.assertFalse(jewishDate.isKislevShort( )); } diff --git a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/package.html b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/package.html index 48858225..d9014ec2 100644 --- a/src/test/java/com/kosherjava/zmanim/hebrewcalendar/package.html +++ b/src/test/java/com/kosherjava/zmanim/hebrewcalendar/package.html @@ -5,11 +5,11 @@ In writing these unit tests, I found http://www.printablejewishcalendar.com/ which produces a nice output -for each month. And, given that Cheshvan, Kislev and Adar are the only variable months, it was fairly easy +for each month. And, given that Marcheshvan, Kislev and Adar are the only variable months, it was fairly easy to work out the following:
-Year   Cheshvan  Kislev  LEAP?   TYPE
+Year   Marcheshvan  Kislev  LEAP?   TYPE
 5769   29        30      No      Qesidrah
 5770   30        30      No      Shalem
 5771   30        30      Yes     Shalem Leap
@@ -50,7 +50,7 @@
 	
  • Av
  • Elul
  • Tishri
  • -
  • Cheshvan
  • +
  • Marcheshvan
  • Kislev
  • Tevet
  • Shevat