Display dates of the form 101-01-02 as undefined as well

In some hard to determine circumstances browsers create these dates for
undefined dates.
This commit is contained in:
Kovid Goyal 2018-09-24 06:10:17 +05:30
parent 40ed2e9f0e
commit 3c6e69e79a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -10,7 +10,7 @@ def is_date_undefined(date):
return dy < uy or ( return dy < uy or (
dy is uy and dy is uy and
date.getUTCMonth() is UNDEFINED_DATE.getUTCMonth() and date.getUTCMonth() is UNDEFINED_DATE.getUTCMonth() and
date.getUTCDate() is UNDEFINED_DATE.getUTCDate()) date.getUTCDate() <= UNDEFINED_DATE.getUTCDate() + 1)
# format_date() {{{ # format_date() {{{