question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Note for date parsing

See original GitHub issue

Hello all,

This is not a bug report, this is a heads-up message for people those run into this situation.

One of my clients recently told me that the date validations always gives error in iPhones and I started to check the reason, and it came out that date comparisons in safari need a different format than the standards accepted by other browsers.

For example yyyy-mm-dd hh:ii:ss is not a valid format for safari. It should be formatted like yyyy-mm-dd[T]hh:ii:ss[Z] to be accepted in all browsers.

Keep that in mind. There’s nothing to change inside the validator.js code because it’s needed to be done outside the library.

Thanks for the great library!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tpaksucommented, Aug 19, 2019
0reactions
tpaksucommented, Aug 19, 2019

Ok, but how can we ensure that the user puts in a valid formatted date for new Date()? Putting a compatibility table for users doesn’t seem to be a right way IMHO. Maybe an extra parameter for specifying a format would be useful but plain javascript doesn’t support that I guess. Will need a library to do the parsing. Complicated…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Date.parse() - JavaScript - MDN Web Docs
The Date.parse() method parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or...
Read more >
How to Use Date.parse in JavaScript - Tabnine Academy
The Date.parse() method takes as an argument a string representing a date, and returns the number of milliseconds that have elapsed between January...
Read more >
Parsing a string to a date in JavaScript - Stack Overflow
The best string format for string parsing is the date ISO format together with the JavaScript Date ... Note that the number of...
Read more >
Formatting and parsing date-time patterns - IBM
For parsing, if the number of pattern letters is more than two, the year is interpreted literally, regardless of the number of digits....
Read more >
Learn How does Date Parsing work in JavaScript? - eduCBA
Date Parsing purpose is whenever we get data from the third party, we don't know that the given date in their documents is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found