dateUtils.js 242 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 'use strict'; function isValidDate(date) { // Taken from http://stackoverflow.com/a/12372720/1562178 // If getTime() returns NaN it'll return false anyway return date.getTime() === date.getTime(); } module.exports = { isValidDate }