|
15 | 15 | */ |
16 | 16 | package com.kosherjava.zmanim.hebrewcalendar; |
17 | 17 |
|
18 | | -import java.text.SimpleDateFormat; |
| 18 | +import java.time.format.DateTimeFormatter; |
19 | 19 | import java.util.EnumMap; |
20 | 20 |
|
21 | 21 | /** |
@@ -69,7 +69,7 @@ public class HebrewDateFormatter { |
69 | 69 | /** |
70 | 70 | * The internal DateFormat. See {@link #isLongWeekFormat()} and {@link #setLongWeekFormat(boolean)}. |
71 | 71 | */ |
72 | | - private SimpleDateFormat weekFormat = null; |
| 72 | + private DateTimeFormatter weekFormat = null; |
73 | 73 |
|
74 | 74 | /** |
75 | 75 | * List of transliterated parshiyos using the default <em>Ashkenazi</em> pronunciation. The formatParsha method |
@@ -122,7 +122,7 @@ public class HebrewDateFormatter { |
122 | 122 | * Default constructor sets the {@link EnumMap}s of Hebrew and default transliterated parshiyos. |
123 | 123 | */ |
124 | 124 | public HebrewDateFormatter() { |
125 | | - weekFormat = new SimpleDateFormat("EEEE"); |
| 125 | + weekFormat = DateTimeFormatter.ofPattern("EEEE"); |
126 | 126 | transliteratedParshaMap = new EnumMap<>(JewishCalendar.Parsha.class); |
127 | 127 | transliteratedParshaMap.put(JewishCalendar.Parsha.NONE, ""); |
128 | 128 | transliteratedParshaMap.put(JewishCalendar.Parsha.BERESHIS, "Bereshis"); |
@@ -294,9 +294,9 @@ public boolean isLongWeekFormat() { |
294 | 294 | public void setLongWeekFormat(boolean longWeekFormat) { |
295 | 295 | this.longWeekFormat = longWeekFormat; |
296 | 296 | if (longWeekFormat) { |
297 | | - weekFormat = new SimpleDateFormat("EEEE"); |
| 297 | + weekFormat = DateTimeFormatter.ofPattern("EEEE"); |
298 | 298 | } else { |
299 | | - weekFormat = new SimpleDateFormat("EEE"); |
| 299 | + weekFormat = DateTimeFormatter.ofPattern("EEE"); |
300 | 300 | } |
301 | 301 | } |
302 | 302 |
|
|
0 commit comments