"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidTimestamp = isValidTimestamp;
exports.unixTimestampOf = unixTimestampOf;
function isValidTimestamp(timestamp) {
    if (typeof timestamp === 'number') {
        return timestamp >= 1262304000000 && timestamp <= 2524608000000;
    }
    else if (typeof timestamp === 'string') {
        return !isNaN(Date.parse(timestamp));
    }
    return false;
}
function unixTimestampOf(timestamp) {
    if (typeof timestamp === 'number')
        return timestamp;
    if (timestamp instanceof Date)
        return timestamp.getTime();
    return Date.parse(timestamp);
}
//# sourceMappingURL=timestamp.js.map