Skip to content

Commit

Permalink
ZmanimFormatter - Change Deprecation pending minimum Java 9 change
Browse files Browse the repository at this point in the history
- Change Deprecation pending minimum Java 9 change
- Remove unused private method formatDigits
  • Loading branch information
KosherJava authored Jan 1, 2025
1 parent eb7e5ca commit e0dd162
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/main/java/com/kosherjava/zmanim/util/ZmanimFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public String formatDateTime(Date dateTime, Calendar calendar) {
* @return the XSD dateTime
* @deprecated This method will be removed in v3.0
*/
@Deprecated (since="2.5", forRemoval=true)
@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);
}
Expand All @@ -318,18 +318,6 @@ public String getXSDateTime(Date date) {
return new StringBuilder(dateFormat.format(date)).toString();
}

/**
* Represent the hours and minutes with two-digit strings.
*
* @param digits
* hours or minutes.
* @return two-digit String representation of hrs or minutes.
*/
private static String formatDigits(int digits) {
String dd = String.valueOf(Math.abs(digits));
return dd.length() == 1 ? '0' + dd : dd;
}

/**
* This returns the xml representation of an xsd:duration object.
*
Expand Down

0 comments on commit e0dd162

Please sign in to comment.