Date format and parser for node.js and browser