SyntaxFix
Write A Post
Hire A Developer
Questions
Using the builtin Date.parse function which accepts input in ISO8601 format and directly returns the desired integer return value:
Date.parse
var dates_as_int = dates.map(Date.parse);