efinnegan 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_r190994408
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesDateTime.scala
##########
@@ -191,3 +185,46 @@ 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) {
+
+ lazy val epochCalendar: Calendar = {
+ val cal = Calendar.getInstance
+ val sdf = new SimpleDateFormat("uuuu-MM-dd'T'HH:mm:ss", ULocale.ENGLISH)
Review comment:
I updated this to use calendarLanguage but then reading comments below about
calendarTimeZone have me wondering if this is correct since calendarLanguage is
in the same table that specifies the properties are for text or binary with a
packed decimal representation, not binarySeconds or binaryMilliseconds. I would
think using calendarLanguage here is still better but want to check.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services