Check if an object is of type Date

import { isDate } from "@nevware21/ts-utils";

let _theDate = null;

function getSetDate(newDate?: any) {
_theDate = isDate(newDate) ? newDate : new Date();

return _theDate;
}