You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2018/09/04 21:18:00 UTC

[jira] [Commented] (DAFFODIL-519) Implement calendarCenturyStart

    [ https://issues.apache.org/jira/browse/DAFFODIL-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16603608#comment-16603608 ] 

Michael Beckerle commented on DAFFODIL-519:
-------------------------------------------

Note that ICU 62.1 doesn't have this functionality for us to use.

Description of what it does for 2-digit year specifiers include this language:

".... It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance is created. For example, using a pattern of "MM/dd/yy" and a SimpleDateFormat instance created on Jan 1, 1997, the string "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" would be interpreted as May 4, 1964. "

Hence, implementing this requires modifying ICU probably to add this feature to it. 

> Implement calendarCenturyStart
> ------------------------------
>
>                 Key: DAFFODIL-519
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-519
>             Project: Daffodil
>          Issue Type: New Feature
>          Components: Back End, DFDL Language, Front End, Middle &quot;End&quot;
>            Reporter: Jessie Chab
>            Priority: Minor
>             Fix For: deferred
>
>
> per req DFDL-13-144R:
> Property Name: calendarCenturyStart Description: Non-negative Integer. Valid values 0 to 99. This property determines on parsing how two-digit years are interpreted. Specify the two digits that start a 100-year window that contains the current year. For example, if you specify 89, and the current year is 2006, all two-digit dates are interpreted as being in the range 1989 to 2088. A two-digit year less than 89 will be interpreted as 20nn and a two-digit year more than or equal to 89 will be treated as 19nn. Annotation: dfdl:element, dfdl:simpleType
> currently we have tests dateCalendarCenturyStart and dateCalendarCenturyStart2 in:
> daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section05/simple_types/TestSimpleTypes2.scala
> daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section05/simple_types/SimpleTypes.tdml
> that are dependent on the completion of this feature.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)