incorectly parses MM Oct yy
Brought to you by:
phatfingers
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;
}
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.