datify your objects.
> npm install datify
Datify = ;should;should;should;
Datify, by default, will parse only simple ISO strings (
'2011-09-13T17:09:30Z'), it has a mode where everything that can be parsed to Date is parsed to date.
Datifyoptionsconservative = false
Suppose you are building an API, and you receive a JSON. You want to parse & save that JSON to the DB - but your dates are strings (the JSON way). So what you do is store the datifyed version. You might:
Suppose you are using an API (from the browser, for example), that have dates in it, as strings (it is JSON, after all) - you just datify it.
apiResult = ;
> npm install> make test
> npm install> make browserify-test
open browserTest.html in your favorite browser, for example:
> firefox ./browserTest.html