1a12fb870b
- New /developers/ page with API docs, SDKs, pricing, use cases - OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics - Case study: Glasskiosken i Flatenbadet — complete ROI analysis - Updated /order/ with recurring missions and frequency dropdown
15 lines
337 B
JavaScript
15 lines
337 B
JavaScript
'use strict'
|
|
|
|
module.exports = isValidDate
|
|
|
|
/**
|
|
* Checks if the argument is a JS Date and not 'Invalid Date'.
|
|
*
|
|
* @param {Date} date The date to check.
|
|
*
|
|
* @returns {boolean} true if the argument is a JS Date and not 'Invalid Date'.
|
|
*/
|
|
function isValidDate (date) {
|
|
return date instanceof Date && !Number.isNaN(date.getTime())
|
|
}
|