Timestamp microservice project - is there a date check library?

Is there a Node/Express module to check if a passed string matches a known date format?

I can get my project to work, but it’s going to take a lot of if/else statements to check all the different potential date formats (e.g 21 January 2018, January 21 2018, 21/01/2018, etc).


Disregard the above. I was over thinking the challenge. I don’t need to account for all numeric examples, so this is a lot less work than I expected.

Yes, I think you can do this creating Date object too but lot of packages are available, most popular, I believe, would be momentjs

1 Like

Yeah, I ended up using momentjs. It’s a great module.