import { YearTo, MonthTo, WeekTo, DayTo, HourTo, MinuteTo } from '../at-parts';
export const IntervalUnitArray = ['ms', 's', 'm', 'h', 'D', 'W', 'M', 'Y'];
export const IntervalUnitDescArray = IntervalUnitArray.slice().reverse();
export const IntervalUnitRegexes = {};
export const IntervalExpressionValidationRegex = /[^\d+(ms|s|m|h|D|W|M|Y)]/g;
IntervalUnitArray.forEach((unit) => {
    IntervalUnitRegexes[unit] = new RegExp('([0-9]+)' + unit + '($|[0-9])');
});
export const IntervalUnitSecondFactors = {
    Y: YearTo.seconds,
    M: MonthTo.seconds,
    W: WeekTo.seconds,
    D: DayTo.seconds,
    h: HourTo.seconds,
    m: MinuteTo.seconds,
    s: 1,
    ms: 0.001
};
