Honestly, I don't like that I have to create a custom object like in moment or dayjs (as you shown) to use the library. I prefer a set of functions that I can immediately apply on every date object.
This is exactly date-fns approach. They provide you functions not objects.
Honestly, I don't like that I have to create a custom object like in moment or dayjs (as you shown) to use the library. I prefer a set of functions that I can immediately apply on every date object.
This is exactly date-fns approach. They provide you functions not objects.
Only that there is no piping in JavaScript (I think).
What do you mean?
|>
or%>%
. I know it is only for the sake of convenience, though.Now, I have to wonder. Is JavaScript
Date
object good enough?Can it validate
2020-13-32
, or is it browser dependent?stackoverflow.com/questions/744532...