Skip to content

Commit

Permalink
chore: Add tests on python date parser/formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Romuald Rousseau committed Dec 18, 2024
1 parent 8940eba commit f417341
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@ public void testPythonSimpleDateformatWithLocale() throws ParseException {

final var formatterUS = new PythonSimpleDateFormat("%b, %Y", Locale.forLanguageTag("en-US"));
assertEquals("Sep, 2023", formatterUS.format(formatterUS.parse("Sep, 2023")));

final var formatterUS2 = new PythonSimpleDateFormat("'Year' %Y-%b %Y", Locale.forLanguageTag("en-US"));
assertEquals("Oct, 2024", formatterUS.format(formatterUS2.parse("Year 2024-Oct 2024")));

final var formatterHU = new PythonSimpleDateFormat("%Y. %B", Locale.forLanguageTag("hu-HU"));
assertEquals("2024. október", formatterHU.format(formatterHU.parse("2024. Október")));
}
}

0 comments on commit f417341

Please sign in to comment.