[
https://issues.apache.org/jira/browse/TRINIDAD-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087269#comment-14087269
]
Yee-Wah Lee commented on TRINIDAD-2504:
---------------------------------------
DateFormat.js parse() method was incompletely implemented - it parsed the
number, but did not set the parseContext fields. Hence the parsed Date would
always be the same defaults, i.e. 12/1/1969 16:00 (local timezone), see
_simpleDateParseImpl() for defaulting code.
Attaching a patch that would implement parsing for 'D'. It requires the year to
be parsed/defaulted first, so it sits outside the _simpleParse routine.
> DateFormat.js incorrectly implements 'D' (day of year) parsing
> --------------------------------------------------------------
>
> Key: TRINIDAD-2504
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2504
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 2.1.0-core
> Reporter: Yee-Wah Lee
> Priority: Minor
>
> 1. Create an inputDate with a converter that uses 'D' (day of year) pattern
> and no initial value
> e.g.
> <tr:inputDate id='id1'>
> <tr:convertDateTime pattern='DDD'/>
> </tr:inputDate>
> 2. Run the demo and pick the 1st of January (any year)
> 3. The input shows 355, the correct value should be 1.
--
This message was sent by Atlassian JIRA
(v6.2#6252)