Skip to content

Commit

Permalink
Use Locale.getDefault() instead of with parameter to work on java 1.6…
Browse files Browse the repository at this point in the history
… api

BMS-2015

Reviewer: Aldrin Batac
  • Loading branch information
cvpcasada committed Dec 3, 2015
1 parent 38e7432 commit e9c8eb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/generationcp/middleware/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public static Date getCurrentDate() {
* @return calendar instance
*/
public static Calendar getCalendarInstance() {
Locale currentLocale = Locale.getDefault(Locale.Category.DISPLAY);
Locale currentLocale = Locale.getDefault();
return Calendar.getInstance(currentLocale);
}

Expand All @@ -215,7 +215,7 @@ public static String getCurrentDateAsStringValue(String format) {
* @return SimpleDateFormat
*/
public static SimpleDateFormat getSimpleDateFormat(String format) {
Locale currentLocale = Locale.getDefault(Locale.Category.DISPLAY);
Locale currentLocale = Locale.getDefault();
SimpleDateFormat formatter = new SimpleDateFormat(format, currentLocale);
formatter.setLenient(false);
return formatter;
Expand Down

0 comments on commit e9c8eb6

Please sign in to comment.