dateUtils.js 242 B

1234567891011
  1. 'use strict';
  2. function isValidDate(date) {
  3. // Taken from http://stackoverflow.com/a/12372720/1562178
  4. // If getTime() returns NaN it'll return false anyway
  5. return date.getTime() === date.getTime();
  6. }
  7. module.exports = {
  8. isValidDate
  9. }