import * as CDS from '../../components/Calendar/CalendarDateShape.js';
import { InternalDate } from './InternalDate.js';
var stringToDate = function (date) {
    return new InternalDate({ value: date }).getComponentsLikeNumber();
};
export var isEqual = function (left, right) { return left === right; };
export var isLess = function (left, right) {
    var leftDate = stringToDate(left);
    var rightDate = stringToDate(right);
    return CDS.isLess(leftDate, rightDate);
};
export var isLessOrEqual = function (left, right) {
    var leftDate = stringToDate(left);
    var rightDate = stringToDate(right);
    return CDS.isLess(leftDate, rightDate) || CDS.isEqual(leftDate, rightDate);
};
export var isGreater = function (left, right) {
    var leftDate = stringToDate(left);
    var rightDate = stringToDate(right);
    return !CDS.isLessOrEqual(leftDate, rightDate);
};
export var isGreaterOrEqual = function (left, right) {
    var leftDate = stringToDate(left);
    var rightDate = stringToDate(right);
    return !CDS.isLess(leftDate, rightDate);
};
export var isBetween = function (between, left, right) {
    var betweenDate = stringToDate(between);
    if (left && CDS.isLess(betweenDate, stringToDate(left))) {
        return false;
    }
    if (right && CDS.isGreater(betweenDate, stringToDate(right))) {
        return false;
    }
    return true;
};
//# sourceMappingURL=comparison.js.map