RED-9770 - Extend date converter #467
@ -30,6 +30,7 @@ dd['.'] MMM yyyy
|
|||||||
d['.'] MMM yyyy
|
d['.'] MMM yyyy
|
||||||
dd['th']['st']['nd']['rd'] 'of' MMMM, yyyy
|
dd['th']['st']['nd']['rd'] 'of' MMMM, yyyy
|
||||||
d['th']['st']['nd']['rd'] 'of' MMMM, yyyy
|
d['th']['st']['nd']['rd'] 'of' MMMM, yyyy
|
||||||
|
d['st']['nd']['rd']['th'] MMMM yyyy
|
||||||
MMMM dd['th']['st']['nd']['rd'], yyyy
|
MMMM dd['th']['st']['nd']['rd'], yyyy
|
||||||
MMMM d['th']['st']['nd']['rd'], yyyy
|
MMMM d['th']['st']['nd']['rd'], yyyy
|
||||||
yyyy, MMMM dd
|
yyyy, MMMM dd
|
||||||
|
|||||||
@ -178,6 +178,12 @@ public class DocumineFloraTest extends AbstractRedactionIntegrationTest {
|
|||||||
expectedDates.add("07/10/1989");
|
expectedDates.add("07/10/1989");
|
||||||
expectedDates.add("21/08/1998");
|
expectedDates.add("21/08/1998");
|
||||||
expectedDates.add("02/08/1998");
|
expectedDates.add("02/08/1998");
|
||||||
|
expectedDates.add("01/05/1988");
|
||||||
|
expectedDates.add("02/06/2003");
|
||||||
|
expectedDates.add("03/09/2005");
|
||||||
|
expectedDates.add("06/09/2005");
|
||||||
|
expectedDates.add("17/08/2005");
|
||||||
|
expectedDates.add("22/08/2035");
|
||||||
|
|
||||||
String dates = experimentalDates.getComponentValues()
|
String dates = experimentalDates.getComponentValues()
|
||||||
.get(0).getValue();
|
.get(0).getValue();
|
||||||
|
|||||||
@ -47,7 +47,13 @@ public class DateConverterTest {
|
|||||||
"October, 27 1989",
|
"October, 27 1989",
|
||||||
"October, 7 1989",
|
"October, 7 1989",
|
||||||
"August 21,1998",
|
"August 21,1998",
|
||||||
"August 2,1998");
|
"August 2,1998",
|
||||||
|
"1st May 1988",
|
||||||
|
"2nd June 2003",
|
||||||
|
"3rd September 2005",
|
||||||
|
"6th September 2005",
|
||||||
|
"17th August 2005",
|
||||||
|
"22nd August 2035");
|
||||||
|
|
||||||
for (String dateStr : goldenStandardDates) {
|
for (String dateStr : goldenStandardDates) {
|
||||||
Optional<Date> parsedDate = DateConverter.parseDate(dateStr);
|
Optional<Date> parsedDate = DateConverter.parseDate(dateStr);
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user