diff --git a/daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/EvCalendarLanguage.scala b/daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/EvCalendarLanguage.scala
index 5eac44c55c..635cf1dd73 100644
--- a/daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/EvCalendarLanguage.scala
+++ b/daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/EvCalendarLanguage.scala
@@ -120,7 +120,7 @@ class DateTimeFormatterEv(
override def initialValue = {
val formatter = new SimpleDateFormat(pattern, locale)
formatter.setCalendar(calendar)
- formatter.setLenient(true) // TODO: should this use calendarCheckPolicy?
+ formatter.setLenient(calendar.isLenient)
formatter
}
}
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
index 91ad8fb287..bdfc5210c9 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section05/simple_types/SimpleTypes.tdml
@@ -325,7 +325,7 @@
+ dfdl:lengthKind="explicit" dfdl:length="{ 7 }" dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="bcd" dfdl:calendarCheckPolicy="lax"/>
@@ -5102,7 +5102,7 @@
dfdl:textCalendarJustification="right" dfdl:textCalendarPadCharacter="d" dfdl:lengthKind="delimited" />
-
+
@@ -5145,7 +5145,9 @@
-
+
+
+
@@ -5216,7 +5218,7 @@
-
+
@@ -6283,7 +6285,19 @@
-
+ Unable to parse
+ 2001-03-35
+ valid range
+
+
+
+
+
+
+
+ Unable to parse
+ Mar. 31 2001
@@ -6299,7 +6313,9 @@
-
+ Unable to parse
+ 13:99:50-0800
+ valid range
@@ -6315,7 +6331,9 @@
- Failed to parse '13:30:70GMT'
+ Unable to parse
+ 13:30:70GMT
+ valid range
diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
index e3f7e13beb..2ec4badeda 100644
--- a/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
+++ b/daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_functions/Functions.tdml
@@ -702,7 +702,7 @@
-
+
@@ -819,7 +819,7 @@
-
+
@@ -904,7 +904,7 @@
-
+
@@ -913,11 +913,11 @@
-
+
+ dfdl:calendarPattern="HH:mm:ss.SSSz" dfdl:calendarCheckPolicy="lax" />
diff --git a/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala b/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
index 126a11df4a..b68d50fe4b 100644
--- a/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
+++ b/daffodil-test/src/test/scala/org/apache/daffodil/section05/simple_types/TestSimpleTypes.scala
@@ -398,11 +398,20 @@ class TestSimpleTypes {
@Test def test_dateLaxCheckPolicy04(): Unit = { runner.runOneTest("dateLaxCheckPolicy04") }
@Test def test_dateLaxCheckPolicy05(): Unit = { runner.runOneTest("dateLaxCheckPolicy05") }
- // DFDL-1042 - not very strict
- // @Test def test_dateStrictCheckPolicy01() { runner.runOneTest("dateStrictCheckPolicy01") }
- // @Test def test_timeStrictCheckPolicy01() { runner.runOneTest("timeStrictCheckPolicy01") }
- // @Test def test_timeStrictCheckPolicy02() { runner.runOneTest("timeStrictCheckPolicy02") }
- // @Test def test_timeFormatting5() { runner.runOneTest("timeFormatting5") }
+ // DFDL-1042/DFDL-2951
+ @Test def test_dateStrictCheckPolicy01(): Unit = {
+ runner.runOneTest("dateStrictCheckPolicy01")
+ }
+ @Test def test_dateStrictCheckPolicy02(): Unit = {
+ runner.runOneTest("dateStrictCheckPolicy02")
+ }
+ @Test def test_timeStrictCheckPolicy01(): Unit = {
+ runner.runOneTest("timeStrictCheckPolicy01")
+ }
+ @Test def test_timeStrictCheckPolicy02(): Unit = {
+ runner.runOneTest("timeStrictCheckPolicy02")
+ }
+ @Test def test_timeFormatting5(): Unit = { runner.runOneTest("timeFormatting5") }
@Test def test_Long1(): Unit = { runner.runOneTest("Long1") }
@Test def test_BigInteger1(): Unit = { runner.runOneTest("BigInteger1") }