News for hackers. Stuff that matters.
Re:Parsing Date in JavaScript by needacig on Sunday March 15, 2015 @07:45PM (#9208766)
Moment.js has the unfortunate property that it will recognize many non-dates as dates, so it's not much good for validation. For example: `moment("cats 123 <3!!!").isValid()` returns `true`. I have yet to find a date parsing library that will correctly reject this input.
Re:Parsing Date in JavaScript by hypernurb on Monday March 16, 2015 @10:57AM (#9211781)
I always prefer handling all the Date related stuff on backend and avoid relying on JS as much as I can.
Re:Parsing Date in JavaScript by needacig on Monday March 16, 2015 @02:45PM (#9213403)
This is a good idea, unfortunately I've worked on projects recently in which the "backend" is in JS.