Fix check for a date with a 24th hour
authorhichris123 <hichris123@gmail.com>
Thu, 23 Jul 2015 14:37:42 +0000 (07:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 23 Jul 2015 14:37:49 +0000 (14:37 +0000)
commitea056cbf2d338f95fe40381c7adf0133df5ed3c9
tree44eea06cf0f32e3f59e217b51ecfc437d826dbc8
parenta10e877c3e6ffef3b15e433d888a719619116a42
Fix check for a date with a 24th hour

According to the ECMA spec, a 24th hour is allowed if the minutes, seconds, and milliseconds are all zero (i.e. it's midnight). Previously, we parsed the date correctly, however, we failed to account in all checks for the possibility of a 24th hour. This CL changes the check to allow a 24th hour if it's exactly midnight.

BUG=chromium:174609
LOG=Y

Review URL: https://codereview.chromium.org/1240093005

Cr-Commit-Position: refs/heads/master@{#29816}
src/dateparser.cc
test/mjsunit/date-parse.js