tinkerhubco / docnest-desktop

DocNest platform desktop app
2 stars 0 forks source link

Test | Deterministic snapshot for components using `Date()` or `Date.now()` #23

Open isotopeee opened 5 years ago

isotopeee commented 5 years ago

References:

jmaicaaan commented 5 years ago

https://stackoverflow.com/questions/9584719/date-vs-new-date-in-javascript

What is the benefit of this? Enlighten me!

isotopeee commented 5 years ago

I think new Date() returns a mutable date object and Date() return a String representing the current time in UTC (same as Date.toString()). I think we should be okay with new Date() form and utilize date-fns when we have time.