Closed jhuckaby closed 6 years ago
It is hard to consider the name. The Date
is an object. It is confusing if the name is date2objet
. However, I agree, it is not correct to use json
, since people would expect string
output.
I determine to change the name. Thanks!
This library has nothing to do with JSON. It outputs an Object, not a JSON string.
If you really want to output JSON, you have to call
JSON.stringify()
and pass in your object. But really, you may just want to consider renaming this to something likedate2object
.