git.net

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

[GitHub] stevedlawrence commented on a change in pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…


stevedlawrence commented on a change in pull request #70: Adding property binaryCalendarRep with values "binarySeconds" and "bi…
URL: https://github.com/apache/incubator-daffodil/pull/70#discussion_r189939543
 
 

 ##########
 File path: daffodil-core/src/main/scala/org/apache/daffodil/grammar/ElementBaseGrammarMixin.scala
 ##########
 @@ -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 ConvertBinaryDateTimePrim(this, binaryNumberKnownLengthInBits)
 
 Review comment:
   Do we care here if the dfdl:lengthUnits is bytes or bits? Seems it should be fine to allow dfdl:lengthUnits="bits" as long as the binaryNumberKnownLengthInBits is 32? Same with the below but with 64.

----------------------------------------------------------------
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