Skip to content

Commit

Permalink
set fixed locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Balcan committed Dec 12, 2024
1 parent e560208 commit 1f5e156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/test/java/org/dhis2/utils/DateUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class DateUtilsTest {

@Test
public void expiryPeriodAndDaysInRange() throws ParseException {
Locale.setDefault(new Locale("es", "ES"));

String testDateInRange = "2018-07-31";
Date dateInRange = DateUtils.oldUiDateFormat().parse(testDateInRange);

Expand Down Expand Up @@ -82,8 +84,6 @@ public void expiryPeriodAndDaysInRange() throws ParseException {
assertEquals("2018-07-26", DateUtils.oldUiDateFormat().format(minDateWeeklyThursday));
assertEquals("2018-07-28", DateUtils.oldUiDateFormat().format(minDateWeeklySaturday));
assertEquals("2018-07-29", DateUtils.oldUiDateFormat().format(minDateWeeklySunday));
Log.d("CHECK", "minDateBiWeekly: " + DateUtils.oldUiDateFormat().format(minDateBiWeekly));
Log.d("CHECK", "expected: 2018-07-16");
assertEquals("2018-07-16", DateUtils.oldUiDateFormat().format(minDateBiWeekly));
assertEquals("2018-06-18", DateUtils.oldUiDateFormat().format(minDateBiWeekly2));
assertEquals("2018-07-01", DateUtils.oldUiDateFormat().format(minDateMonthly));
Expand Down

0 comments on commit 1f5e156

Please sign in to comment.