git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] efinnegan closed pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…


efinnegan closed pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…
URL: https://github.com/apache/incubator-daffodil/pull/70
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala b/daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
index 899fba0b2..76c4be200 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
@@ -48,6 +48,7 @@ import org.apache.daffodil.grammar.primitives.CaptureContentLengthStart
 import org.apache.daffodil.grammar.primitives.CaptureValueLengthEnd
 import org.apache.daffodil.grammar.primitives.CaptureValueLengthStart
 import org.apache.daffodil.grammar.primitives.ComplexNilOrContent
+import org.apache.daffodil.grammar.primitives.ConvertBinaryDateTimeSecMilliPrim
 import org.apache.daffodil.grammar.primitives.ConvertTextBooleanPrim
 import org.apache.daffodil.grammar.primitives.ConvertTextBytePrim
 import org.apache.daffodil.grammar.primitives.ConvertTextCombinator
@@ -115,6 +116,7 @@ import org.apache.daffodil.grammar.primitives.ZonedTextIntPrim
 import org.apache.daffodil.processors.TextJustificationType
 import org.apache.daffodil.schema.annotation.props.Found
 import org.apache.daffodil.schema.annotation.props.NotFound
+import org.apache.daffodil.schema.annotation.props.gen.BinaryCalendarRep
 import org.apache.daffodil.schema.annotation.props.gen.BinaryFloatRep
 import org.apache.daffodil.schema.annotation.props.gen.BinaryNumberRep
 import org.apache.daffodil.schema.annotation.props.gen.LengthKind
@@ -462,6 +464,11 @@ trait ElementBaseGrammarMixin
     case PrimType.Short | PrimType.UnsignedShort => 16
     case PrimType.Float | PrimType.Int | PrimType.UnsignedInt | PrimType.Boolean => 32
     case PrimType.Double | PrimType.Long | PrimType.UnsignedLong => 64
+    case PrimType.DateTime => binaryCalendarRep match {
+      case BinaryCalendarRep.BinarySeconds => 32
+      case BinaryCalendarRep.BinaryMilliseconds => 64
+      case _ => schemaDefinitionError("Size of binary data '" + primType.name + "' with binaryCalendarRep='" + binaryCalendarRep + "' cannot be determined implicitly.")
+    }
     case _ => schemaDefinitionError("Size of binary data '" + primType.name + "' cannot be determined implicitly.")
   }
 
@@ -775,6 +782,25 @@ trait ElementBaseGrammarMixin
       }
 
       case PrimType.Boolean => { new BinaryBoolean(this) }
+
+      case PrimType.DateTime | PrimType.Date | PrimType.Time => {
+        (primType, binaryCalendarRep) match {
+          case (PrimType.DateTime, BinaryCalendarRep.BinarySeconds) => (lengthUnits, binaryNumberKnownLengthInBits) match {
+            case (LengthUnits.Bytes, 32) => new ConvertBinaryDateTimeSecMilliPrim(this, binaryNumberKnownLengthInBits)
+            case (_, 32)  => SDE("lengthUnits must be 'bytes' when binaryCalendarRep='binarySeconds'")
+            case (_, n) => SDE("binary xs:dateTime must be 32 bits when binaryCalendarRep='binarySeconds'. Length in bits was %s.", n)
+          }
+          case (_, BinaryCalendarRep.BinarySeconds) => SDE("binaryCalendarRep='binarySeconds' is not allowed with type %s", primType.name)
+          case (PrimType.DateTime, BinaryCalendarRep.BinaryMilliseconds) => (lengthUnits, binaryNumberKnownLengthInBits) match {
+            case (LengthUnits.Bytes, 64) => new ConvertBinaryDateTimeSecMilliPrim(this, binaryNumberKnownLengthInBits)
+            case (_, 64)  => SDE("lengthUnits must be 'bytes' when binaryCalendarRep='binaryMilliseconds'")
+            case (_, n) => SDE("binary xs:dateTime must be 64 bits when binaryCalendarRep='binaryMilliseconds'. Length in bits was %s.", n)
+          }
+          case (_, BinaryCalendarRep.BinaryMilliseconds) => SDE("binaryCalendarRep='binaryMilliseconds' is not allowed with type %s", primType.name)
+          case _ => notYetImplemented("Type %s when representation='binary' and binaryCalendarRep=%s", primType.name, binaryCalendarRep.toString)
+        }
+      }
+
       case _ => notYetImplemented("Type %s when representation='binary'", primType.name)
     }
     res
diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesDateTime.scala b/daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesDateTime.scala
index 47e24d34a..e6f275e6e 100644
--- a/daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesDateTime.scala
+++ b/daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesDateTime.scala
@@ -17,29 +17,38 @@
 
 package org.apache.daffodil.grammar.primitives
 
+import java.text.ParsePosition
+import com.ibm.icu.text.SimpleDateFormat
 import com.ibm.icu.util.Calendar
 import com.ibm.icu.util.TimeZone
+import com.ibm.icu.util.ULocale
 import org.apache.daffodil.dsom.ElementBase
 import org.apache.daffodil.grammar.Terminal
 import org.apache.daffodil.schema.annotation.props.gen.CalendarCheckPolicy
 import org.apache.daffodil.schema.annotation.props.gen.CalendarFirstDayOfWeek
 import org.apache.daffodil.schema.annotation.props.gen.CalendarPatternKind
+import org.apache.daffodil.processors.unparsers.ConvertBinaryCalendarSecMilliUnparser
 import org.apache.daffodil.processors.unparsers.ConvertTextCalendarUnparser
 import com.ibm.icu.util.Calendar
 import com.ibm.icu.util.TimeZone
 import org.apache.daffodil.processors.CalendarEv
 import org.apache.daffodil.processors.CalendarLanguageEv
+import org.apache.daffodil.processors.parsers.ConvertBinaryCalendarSecMilliParser
 import org.apache.daffodil.processors.parsers.ConvertTextCalendarParser
 import org.apache.daffodil.processors.parsers.TextCalendarConstants
 import scala.Boolean
 
-abstract class ConvertTextCalendarPrimBase(e: ElementBase, guard: Boolean)
+abstract class ConvertCalendarPrimBase(e: ElementBase, guard: Boolean)
   extends Terminal(e, guard) {
 
   protected val xsdType = "dateTime"
   protected val prettyType = "DateTime"
 
   override def toString = "to(xs:" + xsdType + ")"
+}
+
+abstract class ConvertTextCalendarPrimBase(e: ElementBase, guard: Boolean)
+  extends ConvertCalendarPrimBase(e, guard) {
 
   protected def infosetPattern: String
   protected def implicitPattern: String
@@ -144,28 +153,13 @@ abstract class ConvertTextCalendarPrimBase(e: ElementBase, guard: Boolean)
     pattern,
     hasTZ,
     localeEv,
-    calendarEv,
-    infosetPattern,
-    firstDay,
-    calendarDaysInFirstWeek,
-    calendarCheckPolicy,
-    calendarTz,
-    TimeZone.GMT_ZONE)
+    calendarEv)
 
   override lazy val unparser = new ConvertTextCalendarUnparser(
     e.elementRuntimeData,
-    xsdType,
-    prettyType,
     pattern,
-    hasTZ,
     localeEv,
-    calendarEv,
-    infosetPattern,
-    firstDay,
-    calendarDaysInFirstWeek,
-    calendarCheckPolicy,
-    calendarTz,
-    TimeZone.GMT_ZONE)
+    calendarEv)
 }
 
 case class ConvertTextDatePrim(e: ElementBase) extends ConvertTextCalendarPrimBase(e, true) {
@@ -191,3 +185,61 @@ case class ConvertTextDateTimePrim(e: ElementBase) extends ConvertTextCalendarPr
   protected override val implicitPattern = "uuuu-MM-dd'T'HH:mm:ss"
   protected override val validFormatCharacters = "adDeEFGhHkKmMsSuwWvVyXxYzZ".toSeq
 }
+
+abstract class ConvertBinaryCalendarPrimBase(e: ElementBase, guard: Boolean, lengthInBits: Long)
+  extends ConvertCalendarPrimBase(e, guard) {
+
+}
+
+case class ConvertBinaryDateTimeSecMilliPrim(e: ElementBase, lengthInBits: Long) extends ConvertCalendarPrimBase(e, true) {
+  protected override val xsdType = "dateTime"
+  protected override val prettyType = "DateTime"
+
+  lazy val epochCalendar: Calendar = {
+    val cal = Calendar.getInstance
+    cal.clear()
+    cal.setLenient(false)
+
+    val sdfWithTZ = new SimpleDateFormat("uuuu-MM-dd'T'HH:mm:ssZZZZ", ULocale.ENGLISH)
+    var pos = new ParsePosition(0)
+    sdfWithTZ.parse(e.binaryCalendarEpoch, cal, pos)
+
+    if (pos.getIndex != e.binaryCalendarEpoch.length || pos.getErrorIndex >= 0) {
+      // binaryCalendarEpoch didn't match the first format with timezone, so try without
+      cal.clear()
+      pos = new ParsePosition(0)
+      val sdf = new SimpleDateFormat("uuuu-MM-dd'T'HH:mm:ss", ULocale.ENGLISH)
+      cal.setTimeZone(TimeZone.UNKNOWN_ZONE)
+      sdf.parse(e.binaryCalendarEpoch, cal, pos)
+
+      if (pos.getIndex != e.binaryCalendarEpoch.length || pos.getErrorIndex >= 0) {
+        SDE("Failed to parse binaryCalendarEpoch - Format must match the pattern 'uuuu-MM-dd'T'HH:mm:ss' or 'uuuu-MM-dd'T'HH:mm:ssZZZZ'")
+      }
+    }
+
+    try {
+      cal.getTime
+    } catch {
+      case e: IllegalArgumentException => {
+        SDE("Failed to parse binaryCalendarEpoch: %s.", e.getMessage())
+      }
+    }
+
+    cal
+  }
+
+  override lazy val parser = new ConvertBinaryCalendarSecMilliParser(
+    e.elementRuntimeData,
+    !epochCalendar.getTimeZone.equals(TimeZone.UNKNOWN_ZONE),
+    e.binaryCalendarRep,
+    epochCalendar,
+    lengthInBits.toInt)
+
+  override lazy val unparser =
+    new ConvertBinaryCalendarSecMilliUnparser(
+    e.elementRuntimeData,
+    e.binaryCalendarRep,
+    epochCalendar.getTimeInMillis,
+    lengthInBits.toInt,
+    !epochCalendar.getTimeZone.equals(TimeZone.UNKNOWN_ZONE))
+}
diff --git a/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertBinaryCalendarUnparser.scala b/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertBinaryCalendarUnparser.scala
new file mode 100644
index 000000000..f948c2286
--- /dev/null
+++ b/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertBinaryCalendarUnparser.scala
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.daffodil.processors.unparsers
+
+import org.apache.daffodil.calendar.DFDLCalendar
+import org.apache.daffodil.exceptions.Assert
+import org.apache.daffodil.io.DataOutputStream
+import org.apache.daffodil.io.FormatInfo
+import org.apache.daffodil.processors.ElementRuntimeData
+import org.apache.daffodil.schema.annotation.props.gen.BinaryCalendarRep
+import org.apache.daffodil.util.Maybe.One
+import org.apache.daffodil.util.Misc
+
+import com.ibm.icu.util.Calendar
+
+case class ConvertBinaryCalendarSecMilliUnparser(
+  override val context: ElementRuntimeData,
+  binCalRep: BinaryCalendarRep,
+  epochTimeMillis: Long,
+  lengthInBits: Int,
+  hasTZ: Boolean)
+  extends PrimUnparser {
+
+  /**
+   * Primitive unparsers must override runtimeDependencies
+   */
+  override lazy val runtimeDependencies = Nil
+
+  protected def putNumber(dos: DataOutputStream, value: Long, nBits: Int, finfo: FormatInfo): Boolean = {
+    dos.putLong(value, nBits, finfo)
+  }
+
+  def unparse(state: UState): Unit = {
+
+    val node = state.currentInfosetNode.asSimple
+
+    val calValue = node.dataValue match {
+      case dc: DFDLCalendar => dc.calendar
+      case x => Assert.invariantFailed("ConvertTextCalendar received unsupported type. %s of type %s.".format(x, Misc.getNameFromClass(x)))
+    }
+
+    // Adjust the time based on time zone - if a time zone wasn't specified, Calendar will assume the default
+    // time zone for the user instead of TimeZone.UNKNOWN_ZONE so we need to adjust to get the correct time
+    // Note that setting the correct time zone for the calendar will not adjust the time.
+    val epochTime = if (!hasTZ) {
+      val tz = calValue.getTimeZone
+      val gmtOffset = calValue.get(Calendar.ZONE_OFFSET)
+      val dstOffset = if (tz.inDaylightTime(calValue.getTime)) tz.getDSTSavings else 0
+      epochTimeMillis - (gmtOffset + dstOffset)
+    } else {
+      epochTimeMillis
+    }
+
+    val diff: Long = binCalRep match {
+      case BinaryCalendarRep.BinarySeconds => (calValue.getTimeInMillis - epochTime) / 1000
+      case BinaryCalendarRep.BinaryMilliseconds => (calValue.getTimeInMillis - epochTime)
+      case _ => Assert.impossibleCase
+    }
+
+    val dos = state.dataOutputStream
+    val res = putNumber(dos, diff, lengthInBits, state)
+
+    if (!res) {
+      Assert.invariant(dos.maybeRelBitLimit0b.isDefined)
+      UnparseError(One(state.schemaFileLocation), One(state.currentLocation), "Insufficient space to unparse element %s, required %s bits, but only %s were available.",
+        context.dpathElementCompileInfo.namedQName.toPrettyString, lengthInBits, dos.maybeRelBitLimit0b.get)
+    }
+  }
+}
diff --git a/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertTextCalendarUnparser.scala b/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertTextCalendarUnparser.scala
index c25ea05bb..16d25f204 100644
--- a/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertTextCalendarUnparser.scala
+++ b/daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/ConvertTextCalendarUnparser.scala
@@ -18,7 +18,6 @@
 package org.apache.daffodil.processors.unparsers
 
 import com.ibm.icu.util.Calendar
-import com.ibm.icu.util.TimeZone
 import com.ibm.icu.util.ULocale
 
 import org.apache.daffodil.calendar.DFDLCalendar
@@ -30,21 +29,10 @@ import org.apache.daffodil.util.Misc
 import org.apache.daffodil.processors.parsers.ConvertTextCalendarProcessorBase
 
 case class ConvertTextCalendarUnparser(erd: ElementRuntimeData,
-  xsdType: String,
-  prettyType: String,
   pattern: String,
-  hasTZ: Boolean,
   localeEv: CalendarLanguageEv,
-  calendarEv: CalendarEv,
-  infosetPattern: String,
-  firstDay: Int,
-  calendarDaysInFirstWeek: Int,
-  calendarCheckPolicy: Boolean,
-  calendarTz: Option[TimeZone],
-  tz: TimeZone)
-  extends ConvertTextCalendarProcessorBase(erd,
-    xsdType, prettyType, pattern, hasTZ, localeEv, calendarEv, infosetPattern, firstDay, calendarDaysInFirstWeek,
-    calendarCheckPolicy, calendarTz, tz)
+  calendarEv: CalendarEv)
+  extends ConvertTextCalendarProcessorBase(erd, pattern)
   with TextPrimUnparser {
 
   /**
diff --git a/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PrimitivesDateTime1.scala b/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PrimitivesDateTime1.scala
index cf7158d2f..b68eef7ab 100644
--- a/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PrimitivesDateTime1.scala
+++ b/daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PrimitivesDateTime1.scala
@@ -20,7 +20,6 @@ package org.apache.daffodil.processors.parsers
 import java.text.ParsePosition
 import com.ibm.icu.text.SimpleDateFormat
 import com.ibm.icu.util.Calendar
-import com.ibm.icu.util.TimeZone
 import com.ibm.icu.util.ULocale
 import org.apache.daffodil.exceptions.Assert
 import org.apache.daffodil.calendar.DFDLDateTime
@@ -30,21 +29,11 @@ import org.apache.daffodil.processors.CalendarEv
 import org.apache.daffodil.processors.CalendarLanguageEv
 import org.apache.daffodil.processors.ElementRuntimeData
 import org.apache.daffodil.processors.Processor
+import org.apache.daffodil.schema.annotation.props.gen.BinaryCalendarRep
 
 abstract class ConvertTextCalendarProcessorBase(
   override val context: ElementRuntimeData,
-  xsdType: String,
-  prettyType: String,
-  pattern: String,
-  hasTZ: Boolean,
-  localeEv: CalendarLanguageEv,
-  calendarEv: CalendarEv,
-  infosetPattern: String,
-  firstDay: Int,
-  calendarDaysInFirstWeek: Int,
-  calendarCheckPolicy: Boolean,
-  calendarTz: Option[TimeZone],
-  tz: TimeZone) extends Processor {
+  pattern: String) extends Processor {
   // The dfdl:calendarLanguage property can be a runtime-valued expression.
   // Hence, locale and calendar, derived from it, can also be runtime-valued.
   //
@@ -99,16 +88,8 @@ case class ConvertTextCalendarParser(erd: ElementRuntimeData,
   pattern: String,
   hasTZ: Boolean,
   localeEv: CalendarLanguageEv,
-  calendarEv: CalendarEv,
-  infosetPattern: String,
-  firstDay: Int,
-  calendarDaysInFirstWeek: Int,
-  calendarCheckPolicy: Boolean,
-  calendarTz: Option[TimeZone],
-  tz: TimeZone)
-  extends ConvertTextCalendarProcessorBase(erd,
-    xsdType, prettyType, pattern, hasTZ, localeEv, calendarEv, infosetPattern, firstDay, calendarDaysInFirstWeek,
-    calendarCheckPolicy, calendarTz, tz)
+  calendarEv: CalendarEv)
+  extends ConvertTextCalendarProcessorBase(erd, pattern)
   with TextPrimParser {
 
   override lazy val runtimeDependencies = List(localeEv, calendarEv)
@@ -188,3 +169,41 @@ object TextCalendarConstants {
     }
   }
 }
+
+case class ConvertBinaryCalendarSecMilliParser(
+  override val context: ElementRuntimeData,
+  hasTZ: Boolean,
+  binCalRep: BinaryCalendarRep,
+  epochCal: Calendar,
+  lengthInBits: Int)
+  extends PrimParser {
+
+  override lazy val runtimeDependencies = Nil
+
+  def parse(start: PState): Unit = {
+
+    val dis = start.dataInputStream
+    val slong: Long = dis.getSignedLong(lengthInBits, start)
+    val cal = epochCal.clone.asInstanceOf[Calendar]
+
+    val millisToAdd: Long = binCalRep match {
+      case BinaryCalendarRep.BinarySeconds => slong * 1000
+      case BinaryCalendarRep.BinaryMilliseconds => slong
+      case _ => Assert.impossibleCase
+    }
+
+    val newTime = cal.getTimeInMillis + millisToAdd
+    try {
+      cal.setTimeInMillis(newTime)
+    } catch {
+      case e: IllegalArgumentException => {
+        PE(start, "%s milliseconds from the binaryCalendarEpoch is out of range of valid values (%s to %s): %s.",
+            millisToAdd, Calendar.MIN_MILLIS, Calendar.MAX_MILLIS, e.getMessage())
+        return
+      }
+    }
+
+    val newCal = new DFDLDateTime(cal, hasTZ)
+    start.simpleElement.overwriteDataValue(newCal)
+  }
+}
diff --git a/daffodil-test-ibm1/src/test/resources/test-suite/ibm-contributed/dpacalbin100_01.dfdl.xsd b/daffodil-test-ibm1/src/test/resources/test-suite/ibm-contributed/dpacalbin100_01.dfdl.xsd
index 7f4fb1395..fe0408b6c 100644
--- a/daffodil-test-ibm1/src/test/resources/test-suite/ibm-contributed/dpacalbin100_01.dfdl.xsd
+++ b/daffodil-test-ibm1/src/test/resources/test-suite/ibm-contributed/dpacalbin100_01.dfdl.xsd
@@ -26,7 +26,8 @@
 				encodingErrorPolicy="replace" encoding="utf-8" byteOrder="bigEndian" bitOrder="mostSignificantBitFirst" lengthUnits="bytes"
 				textOutputMinLength="1" alignment="1" alignmentUnits="bytes"
 				fillByte="%NUL;"  occursCountKind="implicit" ignoreCase="no"
-				lengthKind="implicit" sequenceKind="ordered" initiatedContent="no" />
+				lengthKind="implicit" sequenceKind="ordered" initiatedContent="no"
+				textPadKind="none"  binaryNumberRep="binary" calendarLanguage='en' />
 
 		</xs:appinfo>
 	</xs:annotation>
@@ -52,7 +53,7 @@
 	<xs:element name="testBinaryMilliseconds" type="xs:dateTime">
 		<xs:annotation>
 			<xs:appinfo source="http://www.ogf.org/dfdl/";>
-				<dfdl:element binaryCalendarRep="binaryMilliseconds" binaryCalendarEpoch="2009-12-24T05:15:00+05:00"/>
+				<dfdl:element binaryCalendarRep="binaryMilliseconds" binaryCalendarEpoch="2009-12-24T05:15:00+05:00" />
 			</xs:appinfo>
 		</xs:annotation>
 	</xs:element>
diff --git a/daffodil-test-ibm1/src/test/scala-debug/org/apache/daffodil/IBMTests2.scala b/daffodil-test-ibm1/src/test/scala-debug/org/apache/daffodil/IBMTests2.scala
index 0a3a5a080..3cdbf3119 100644
--- a/daffodil-test-ibm1/src/test/scala-debug/org/apache/daffodil/IBMTests2.scala
+++ b/daffodil-test-ibm1/src/test/scala-debug/org/apache/daffodil/IBMTests2.scala
@@ -60,8 +60,6 @@ class IBMTestsThatThrow {
 
   @Test def test_simple_type_properties_text_boolean_13_03() { runner2.runOneTest("simple_type_properties_text_boolean_13_03") } // DFDL-462 boolean type
   @Test def test_simple_type_properties_bin_boolean_13_01() { runner2.runOneTest("simple_type_properties_bin_boolean_13_01") } // DFDL-461 boolean type
-  @Test def test_simple_type_properties_bin_calendar_13_01() { runner2.runOneTest("simple_type_properties_bin_calendar_13_01") } // DFDL-99 dateTime
-  @Test def test_simple_type_properties_bin_calendar_13_02() { runner2.runOneTest("simple_type_properties_bin_calendar_13_02") } // DFDL-99 dateTime
 
   @Test def test_simple_type_properties_text_calendar_13_01() { runner2.runOneTest("simple_type_properties_text_calendar_13_01") } // DAFFODIL-1945
 
diff --git a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
index c90083262..a76e64403 100644
--- a/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
+++ b/daffodil-test-ibm1/src/test/scala/org/apache/daffodil/IBMTests.scala
@@ -50,6 +50,9 @@ class IBMTestsThatPass {
   @Test def test_simple_type_properties_text_calendar_13_03() { runner2.runOneTest("simple_type_properties_text_calendar_13_03") }
   @Test def test_simple_type_properties_text_calendar_13_04() { runner2.runOneTest("simple_type_properties_text_calendar_13_04") }
 
+  @Test def test_simple_type_properties_bin_calendar_13_01() { runner2.runOneTest("simple_type_properties_bin_calendar_13_01") }
+  @Test def test_simple_type_properties_bin_calendar_13_02() { runner2.runOneTest("simple_type_properties_bin_calendar_13_02") }
+
   @Test def test_introduction_1_01() { runner1.runOneTest("introduction_1_01") }
 
   @Test def test_property_syntax_7_04() { runner1.runOneTest("property_syntax_7_04") }
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 65250a3e0..57e5efd6a 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
@@ -240,6 +240,33 @@
     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="4" />
     <xs:element name="float_03" type="xs:float"
     dfdl:lengthKind="explicit" dfdl:lengthUnits="bytes" dfdl:length="8" />
+
+    <xs:element name="dateTimeBin" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 4 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="1977-01-01T00:00:07"/>
+    <xs:element name="dateTimeBin2" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 32 }"
+      dfdl:lengthUnits="bits" dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="1970-01-01T00:00:00"/>
+    <xs:element name="dateTimeBin3" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 5 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="1970-01-01T00:00:00"/>
+    <xs:element name="dateTimeBin4" type="xs:dateTime" dfdl:lengthKind="implicit" dfdl:lengthUnits="bytes"
+      dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="1870-01-01T00:05:00+00:00"/>
+    <xs:element name="dateTimeBin5" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 8 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binaryMilliseconds" dfdl:binaryCalendarEpoch="1985-11-21T10:37:04"/>
+    <xs:element name="dateTimeBin6" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 8 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binaryMilliseconds" dfdl:binaryCalendarEpoch="2000-06-15T03:25:19"/>
+    <xs:element name="dateTimeBin7" type="xs:dateTime" dfdl:lengthKind="implicit" dfdl:lengthUnits="bytes"
+      dfdl:binaryCalendarRep="binaryMilliseconds" dfdl:binaryCalendarEpoch="1870-01-01T00:05:00"/>
+    <xs:element name="dateTimeBin8" type="xs:dateTime" dfdl:lengthKind="explicit" dfdl:length="{ 4 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="2018-01-01T09:13:42+09:00"/>
+    <xs:element name="dateTimeBin9" type="xs:dateTime" dfdl:lengthKind="implicit" dfdl:lengthUnits="bytes"
+      dfdl:binaryCalendarRep="binaryMilliseconds" dfdl:binaryCalendarEpoch="2000-01-01T00:00:00-04:00"/>
+    <xs:element name="dateTimeBin10" type="xs:dateTime" dfdl:lengthKind="implicit" dfdl:lengthUnits="bytes"
+      dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="2000-1-1T00:00"/>
+    <xs:element name="dateTimeBin11" type="xs:dateTime" dfdl:lengthKind="implicit" dfdl:lengthUnits="bytes"
+      dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="01-01-2000T00:00:00"/>
+
+    <xs:element name="dateBin2" type="xs:date" dfdl:lengthKind="explicit" dfdl:length="{ 4 }"
+      dfdl:lengthUnits="bytes" dfdl:binaryCalendarRep="binarySeconds" dfdl:binaryCalendarEpoch="1970-01-01T00:00:00+00:00"/>
+
   </tdml:defineSchema>
   
   <tdml:parserTestCase name="TestUnsignedInt" root="Day"
@@ -1951,6 +1978,289 @@
     </tdml:infoset>
   </tdml:parserTestCase>
 
+  <!-- xs:dateTime with binaryCalendarRep='binarySeconds' -->
+  <tdml:parserTestCase name="dateTimeBin" root="dateTimeBin"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111110</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin>1977-01-01T00:01:09.000000</dateTimeBin>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin2" root="dateTimeBin2"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: lengthUnits must be 'bytes' when binaryCalendarRep='binarySeconds'</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin3" root="dateTimeBin3"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: binary xs:dateTime must be 32 bits when binaryCalendarRep='binarySeconds'</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binarySeconds' with implicit length -->
+  <tdml:parserTestCase name="dateTimeBin4" root="dateTimeBin4"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111111 11111110 10101110 10000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin4>1869-12-31T00:05:00.000000+00:00</dateTimeBin4>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin5" root="dateTimeBin5"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin5>1985-11-21T10:37:04.001000</dateTimeBin5>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin6" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000000 11111111 11111111 11111111 11111111</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>2000-08-03T20:28:06.295000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin7" root="dateTimeBin7"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111111 11111111 11111111 11111111 11111010 11011001 10100100 00000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin7>1869-12-31T00:05:00.000000</dateTimeBin7>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin8" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000001 00000010 01001110 11010001 10100111 00001000 00000000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>11000-06-15T03:25:19.000000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin9" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 11100101 10011000 00001111 10110100 10001110 11100111</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>9999-12-31T23:59:59.999000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' -->
+  <tdml:parserTestCase name="dateTimeBin10" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 11100101 10011000 00001111 10110100 10001110 11101000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>10000-01-01T00:00:00.000000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin11" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">01111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Parse Error</tdml:error>
+      <tdml:error>milliseconds from the binaryCalendarEpoch is out of range of valid values</tdml:error>
+      <tdml:error>millis value less than lower bounds for a Calendar</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' with expected result equal
+    to the maximum date allowed -->
+  <tdml:parserTestCase name="dateTimeBin12" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000010 10001101 01000110 11111011 11111100 10101110 01100010 11101000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>5828963-12-20T00:00:00.000000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' - expecting an error for being 1 milisecond
+    greater than the maximum date allowed -->
+  <tdml:parserTestCase name="dateTimeBin13" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000010 10001101 01000110 11111011 11111100 10101110 01100010 11101001</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Parse Error</tdml:error>
+      <tdml:error>millis value greater than upper bounds for a Calendar</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' with expected result equal
+    to the minimum date allowed -->
+  <tdml:parserTestCase name="dateTimeBin14" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111101 01110001 00110111 10110011 11111100 10101110 01100010 11101000</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin6>-5838269-09-20T00:00:00.000000</dateTimeBin6>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <!-- xs:dateTime with binaryCalendarRep='binaryMillieconds' - expecting an error for being 1 milisecond
+    less than the minimum date allowed -->
+  <tdml:parserTestCase name="dateTimeBin15" root="dateTimeBin6"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">11111101 01110001 00110111 10110011 11111100 10101110 01100010 11100111</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Parse Error</tdml:error>
+      <tdml:error>millis value less than lower bounds for a Calendar</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin16" root="dateTimeBin8"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin8>2018-01-01T09:13:43.000000+09:00</dateTimeBin8>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin17" root="dateTimeBin9"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="true">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001</tdml:documentPart>
+    </tdml:document>
+    <tdml:infoset>
+      <tdml:dfdlInfoset>
+        <dateTimeBin9>2000-01-01T00:00:00.001000-04:00</dateTimeBin9>
+      </tdml:dfdlInfoset>
+    </tdml:infoset>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin18" root="dateTimeBin10"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: Failed to parse binaryCalendarEpoch - Format must match the pattern 'uuuu-MM-dd'T'HH:mm:ss' or 'uuuu-MM-dd'T'HH:mm:ssZZZZ'</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateTimeBin19" root="dateTimeBin11"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">00000000 00000000 00000000 00111101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: Failed to parse binaryCalendarEpoch: DAY_OF_MONTH=2000, valid range=1..31</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="dateBin2" root="dateBin2"
+    model="SimpleTypes-binary" description="Section 5 Schema types-dateTime - DFDL-5-016R"
+    roundTrip="false">
+
+    <tdml:document>
+      <tdml:documentPart type="bits">0000 0000 0011 1101</tdml:documentPart>
+    </tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error: binaryCalendarRep='binarySeconds' is not allowed with type Date</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
   <tdml:parserTestCase name="byte_01" root="b_01"
     model="SimpleTypes-Embedded.dfdl.xsd" description="Section 5 Schema types - byte - DFDL-5-015R">
 
@@ -3931,6 +4241,23 @@
     </tdml:errors>
   </tdml:parserTestCase>
 
+<!--
+     Test Name: dateTimeImplicitPatternFail5
+        Schema: dateTimeSchema
+          Root: dateTimeImp
+       Purpose: This test demonstrates a dateTime data type with a year that is out of range.
+-->
+
+  <tdml:parserTestCase name="dateTimeImplicitPatternFail5" root="dateTimeImp"
+    model="dateTimeSchema" description="Section 13 Simple Types - calendarPatternKind - DFDL-13-138R">
+
+    <tdml:document><![CDATA[99999999-03-24T03:45:30]]></tdml:document>
+    <tdml:errors>
+      <tdml:error>Parse Error:</tdml:error>
+      <tdml:error>Placeholder for error message</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
 <!--
      Test Name: datePattern01
         Schema: dateTimeSchema
@@ -6059,7 +6386,7 @@
   
   <!--
     Test name: hexBinary_Delimited_01
-    Schema: SimpleTypes-binary
+    Schema: HexBinary
     Purpose: This document demonstrates the use of the hexBinary simple type with
     bit input.
   -->
@@ -6097,7 +6424,7 @@
   
   <!--
     Test name: hexBinary_Delimited_02
-    Schema: SimpleTypes-binary
+    Schema: HexBinary
     Purpose: This document demonstrates the use of the hexBinary simple type with
     byte input.
   -->
@@ -6124,7 +6451,7 @@
   
   <!--
     Test name: hexBinary_Delimited_03
-    Schema: SimpleTypes-binary
+    Schema: HexBinary
     Purpose: This document demonstrates the use of the hexBinary simple type with byte
     input using raw byte entities.
   -->
@@ -6162,7 +6489,7 @@
   
   <!--
     Test name: hexBinary_Implicit_01
-    Schema: SimpleTypes-binary
+    Schema: HexBinary
     Purpose: This document demonstrates the use of the hexBinary simple type with byte
     input using lengthKind implicit.
   -->
@@ -6361,7 +6688,7 @@
 
   <!--
     Test name: hexBinary_Delimited_04
-    Schema: SimpleTypes-binary
+    Schema: HexBinary
     Purpose: This document demonstrates an error when hexBinary is delimited and has an encoding that is not ISO-8859-1
   -->
 
diff --git a/daffodil-test/src/test/scala-debug/org/apache/daffodil/section05/simple_types/TestSimpleTypesDebug.scala b/daffodil-test/src/test/scala-debug/org/apache/daffodil/section05/simple_types/TestSimpleTypesDebug.scala
index 4adbd221f..a2498e1eb 100644
--- a/daffodil-test/src/test/scala-debug/org/apache/daffodil/section05/simple_types/TestSimpleTypesDebug.scala
+++ b/daffodil-test/src/test/scala-debug/org/apache/daffodil/section05/simple_types/TestSimpleTypesDebug.scala
@@ -115,4 +115,6 @@ class TestSimpleTypesDebug {
   @Test def test_dateCalendarFirstDayOfWeek03() { runner.runOneTest("dateCalendarFirstDayOfWeek03") }
   @Test def test_dateCalendarFirstDayOfWeek04() { runner.runOneTest("dateCalendarFirstDayOfWeek04") }
 
+  // DAFFODIL-1946
+  @Test def test_dateTimeImplicitPatternFail5() { runner.runOneTest("dateTimeImplicitPatternFail5") }
 }
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 cac67ca70..a87831393 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
@@ -170,12 +170,33 @@ class TestSimpleTypes {
   @Test def test_dateImplicitPatternFail() { runner.runOneTest("dateImplicitPatternFail") }
   @Test def test_timeImplicitPattern() { runner.runOneTest("timeImplicitPattern") }
   @Test def test_timeImplicitPatternFail() { runner.runOneTest("timeImplicitPatternFail") }
+  @Test def test_dateTimeBin() { runner.runOneTest("dateTimeBin") }
+  @Test def test_dateTimeBin2() { runner.runOneTest("dateTimeBin2") }
+  @Test def test_dateTimeBin3() { runner.runOneTest("dateTimeBin3") }
+  @Test def test_dateTimeBin4() { runner.runOneTest("dateTimeBin4") }
+  @Test def test_dateTimeBin5() { runner.runOneTest("dateTimeBin5") }
+  @Test def test_dateTimeBin6() { runner.runOneTest("dateTimeBin6") }
+  @Test def test_dateTimeBin7() { runner.runOneTest("dateTimeBin7") }
+  @Test def test_dateTimeBin8() { runner.runOneTest("dateTimeBin8") }
+  @Test def test_dateTimeBin9() { runner.runOneTest("dateTimeBin9") }
+  @Test def test_dateTimeBin10() { runner.runOneTest("dateTimeBin10") }
+  @Test def test_dateTimeBin11() { runner.runOneTest("dateTimeBin11") }
+  @Test def test_dateTimeBin12() { runner.runOneTest("dateTimeBin12") }
+  @Test def test_dateTimeBin13() { runner.runOneTest("dateTimeBin13") }
+  @Test def test_dateTimeBin14() { runner.runOneTest("dateTimeBin14") }
+  @Test def test_dateTimeBin15() { runner.runOneTest("dateTimeBin15") }
+  @Test def test_dateTimeBin16() { runner.runOneTest("dateTimeBin16") }
+  @Test def test_dateTimeBin17() { runner.runOneTest("dateTimeBin17") }
+  @Test def test_dateTimeBin18() { runner.runOneTest("dateTimeBin18") }
+  @Test def test_dateTimeBin19() { runner.runOneTest("dateTimeBin19") }
+  @Test def test_dateBin2() { runner.runOneTest("dateBin2") }
 
   @Test def test_dateTimeImplicitPattern() { runner.runOneTest("dateTimeImplicitPattern") }
   @Test def test_dateTimeImplicitPatternFail() { runner.runOneTest("dateTimeImplicitPatternFail") }
   @Test def test_dateTimeImplicitPatternFail2() { runner.runOneTest("dateTimeImplicitPatternFail2") }
   @Test def test_dateTimeImplicitPatternFail3() { runner.runOneTest("dateTimeImplicitPatternFail3") }
   @Test def test_dateTimeImplicitPatternFail4() { runner.runOneTest("dateTimeImplicitPatternFail4") }
+  //@Test def test_dateTimeImplicitPatternFail5() { runner.runOneTest("dateTimeImplicitPatternFail5") }
 
   @Test def test_datePattern01() { runner.runOneTest("datePattern01") }
   //  @Test def test_datePattern01b() { runner.runOneTest("datePattern01b") }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services