"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecurityDate = exports.ONE_THOUSAND = void 0;
const InvalidTimestampRange_1 = __importDefault(require("./error/InvalidTimestampRange"));
exports.ONE_THOUSAND = 1000;
class SecurityDate {
    static checkDateTimestamp(value, minTimeStamp, maxTimeStamp) {
        const errorList = [];
        const minDate = minTimeStamp ? minTimeStamp : 0;
        const maxDate = maxTimeStamp ? maxTimeStamp : 0;
        if (value < minDate || (maxTimeStamp && value > maxDate)) {
            errorList.push(new InvalidTimestampRange_1.default(new Date(value), new Date(minDate), new Date(maxDate)));
        }
        return errorList;
    }
}
exports.SecurityDate = SecurityDate;
