Menu

#5 incorectly parses MM Oct yy

v1.0_(example)
closed-fixed
None
5
2015-06-04
2015-01-22
No

incorrectly parses dates like 11 Oct 16
Bug appears in DateTime.parse
// One more scan for Date.toString() style
if (!hasDatepart.year && str.endsWith("T " + dateState.parts[dateState.parts.length - 1])) {
dateState.year = Integer.parseInt(dateState.parts[dateState.parts.length - 1]);
hasDatepart.year = true;
dateState.usedint[dateState.usedint.length - 1] = true;
}

Discussion

  • John Pile

    John Pile - 2015-06-04

    Fixed in datetime-3.0.2.jar, and updated dependency in pojava-3.0.3. Removed criteria that "T" must be present, and required match of two three letter words and a two-digit number. This block is intended to mitigate dates produced by java.util.Date for early years, such as 7 or 12 AD, where the year is not to be confused with a two-digit abbreviation in the current century.

     
  • John Pile

    John Pile - 2015-06-04
    • status: open --> closed-fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.