Node.js examples for String:Parse
Parse date string to Date
/**//from w ww. ja va2 s . c o m * @param {string|Date|number} value * @return {number} timestamp */ number.parseDate = function (value) { return value instanceof Date ? value : new Date( typeof value === 'string' ? value.replace(/-/g, '/') : Math.round(value) ); };