Before there is a problem with the JavaScript Date function, returns "Date {Invalid Date}" in Firefox, but it works fine in Google Chrome.
JavaScript Date
returns "Date {Invalid Date}"
// My Input is new Date("Sat Jan 01 00:00:00 EST 1"); // Works fine in google chrome // Result: Mon Jan 01 2001 10:30:00 GMT+0530 (India Standard Time) // Not working in Firefox (Version: 15.0.1) // Result: Date {Invalid Date}
Date does not accept the time zone parameter in this way. I thought Chrome was just ignoring this.
new Date(year, month, day [, hour, minute, second, millisecond])
See @Brett's comment below for more details.
This works in all browsers -
new date ('2001/01/31 12:00:00 AM')
Make sure the parameter matches RFC1123: http://tools.ietf.org/html/rfc1123
Source: https://habr.com/ru/post/1438934/More articles:Setting compiler flags to a file in the projct TemplateInfo.plist template file - xcode4Android Webview: javascript execution from java method called from javascript - javascriptMake AuthorizeAttribute Deny Users By Default If Roles Are Empty - authorizationHow to combine several lines into one line? - mysqlHow to stop WPF Grid from automatically setting fields on children - marginIs it possible if TeamCity builds a module against all agents when a VCS trigger occurs? - teamcityHow do I remove Google Tracking (UTM) settings from a URL? - ruby ββ| fooobar.comHow do I unit test a monkey patch in Python - pythonConvert base10 to base36 in perl - perlCompareAttribute for case insensitive comparison - c #All Articles