You can create a date from pretty much any formatted date string without defining the format. Just like D = new Date(dateString). Very handy when comparing timestamps because then you can just call the getTime method on your date var and compare the time in milliseconds.
1
u/[deleted] May 29 '19
You can create a date from pretty much any formatted date string without defining the format. Just like D = new Date(dateString). Very handy when comparing timestamps because then you can just call the getTime method on your date var and compare the time in milliseconds.