You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When validating string date values such as '2010-01-01' using default options, the isDate function returns false when the timezone has been set to a North American timezone such as 'America/Los_Angeles', but returns true for the same date in European timezones such as 'Europe/Amsterdam'.
rantler
changed the title
The isDate function returns false for some timezone (e.g. North American time zones)
The isDate function returns false for some timezones (e.g. North American time zones)
Jan 10, 2024
Closing this as it's indeed a duplicate of #2256. It has been patched in the master branch, but not been released yet. @profnandaa had some issues with releasing the new version so that's not been done yet
Describe the bug
When validating string date values such as '2010-01-01' using default options, the
isDate
function returnsfalse
when the timezone has been set to a North American timezone such as 'America/Los_Angeles', but returnstrue
for the same date in European timezones such as 'Europe/Amsterdam'.Examples
Example of issue in Node REPL:
Additional context
Validator.js version:
13.11.0
Node.js version:
18.16.1
OS platform:
Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000
The text was updated successfully, but these errors were encountered: