Closed
Description
Hi,
Prerequisites
- I have attempted to find the simplest possible steps to reproduce the issue.
Steps to reproduce the issue
- Pull Opera 12 from somewhere
- set up a test environment in Opera and initialize the Date Formatter with:
var df = new DateFormatter(); - call df.parseDate("08-13-2019", 'm-d-Y') to see what you get.
Expected behavior and actual behavior
When I follow those steps, I see...
null in Opera console. The bug happens because you call parseInt() only with first parameter. When the string "08" is parsed, it is considered to be octal and is not parsed properly. You should add an additional parameter with radix 10 to all parseInt() calls to fix this behavior on all older browsers. I spent hours tracking and fixing this issue.
I was expecting...
date (with type date)
Environment
Browsers
Opera 12
Operating System
- Windows
Libraries
- jQuery version: any
- php-date-formatter version: latest
Isolating the problem
- [ x] The bug happens consistently in Opera 12