-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add toDate
toDateTime
in filter
#46
Comments
As in unix timestamp to a Javascript var toDate = function (timestamp) {
return new Date(parseInt(timestamp, 10) * 1000);
} |
Thanks. it is a problem for the format of date. I just create a project node-iform, base on node-validator. I hope you can take a look that. |
I'd say it's outside the scope of the library, but you can have a look at moment.js which might have the date parsing/formatting functionality you're looking for. I'll take a look at node-iform - nice to see validator out in the wild. |
A simple "toDate" that calls
Maybe a quick check to see if the input is all-numeric (as in the case of "1296111600000"), since passing that as a string returns an Invalid Date. |
I just get here, and view the source code, great work, but just one question, why not put
toDate
,toDateTime
in Filter?The text was updated successfully, but these errors were encountered: