chrono-node 2.5.1 → 2.6.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/calculation/mergingCalculation.d.ts +1 -1
- package/dist/esm/calculation/mergingCalculation.js +2 -2
- package/dist/esm/chrono.d.ts +3 -3
- package/dist/esm/chrono.js +2 -2
- package/dist/esm/common/abstractRefiners.d.ts +2 -2
- package/dist/esm/common/calculation/weekdays.d.ts +2 -2
- package/dist/esm/common/calculation/weekdays.js +3 -3
- package/dist/esm/common/casualReferences.d.ts +1 -1
- package/dist/esm/common/casualReferences.js +3 -3
- package/dist/esm/common/parsers/AbstractParserWithWordBoundary.d.ts +3 -3
- package/dist/esm/common/parsers/AbstractTimeExpressionParser.d.ts +2 -2
- package/dist/esm/common/parsers/AbstractTimeExpressionParser.js +1 -1
- package/dist/esm/common/parsers/ISOFormatParser.d.ts +2 -2
- package/dist/esm/common/parsers/ISOFormatParser.js +1 -1
- package/dist/esm/common/parsers/SlashDateFormatParser.d.ts +2 -2
- package/dist/esm/common/parsers/SlashDateFormatParser.js +1 -1
- package/dist/esm/common/refiners/AbstractMergeDateRangeRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/AbstractMergeDateRangeRefiner.js +1 -1
- package/dist/esm/common/refiners/AbstractMergeDateTimeRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/AbstractMergeDateTimeRefiner.js +2 -2
- package/dist/esm/common/refiners/ExtractTimezoneAbbrRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/ExtractTimezoneOffsetRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/ForwardDateRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/ForwardDateRefiner.js +1 -1
- package/dist/esm/common/refiners/MergeWeekdayComponentRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/MergeWeekdayComponentRefiner.js +1 -1
- package/dist/esm/common/refiners/OverlapRemovalRefiner.d.ts +2 -2
- package/dist/esm/common/refiners/UnlikelyFormatFilter.d.ts +2 -2
- package/dist/esm/common/refiners/UnlikelyFormatFilter.js +1 -1
- package/dist/esm/configurations.d.ts +1 -1
- package/dist/esm/configurations.js +7 -7
- package/dist/esm/index.d.ts +10 -10
- package/dist/esm/index.js +10 -10
- package/dist/esm/locales/de/constants.d.ts +1 -1
- package/dist/esm/locales/de/constants.js +2 -2
- package/dist/esm/locales/de/constants.js.map +1 -1
- package/dist/esm/locales/de/index.d.ts +2 -2
- package/dist/esm/locales/de/index.js +14 -14
- package/dist/esm/locales/de/parsers/DECasualDateParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DECasualDateParser.js +4 -4
- package/dist/esm/locales/de/parsers/DECasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DECasualTimeParser.js +4 -4
- package/dist/esm/locales/de/parsers/DEMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DEMonthNameLittleEndianParser.js +5 -5
- package/dist/esm/locales/de/parsers/DESpecificTimeExpressionParser.d.ts +2 -2
- package/dist/esm/locales/de/parsers/DESpecificTimeExpressionParser.js +1 -1
- package/dist/esm/locales/de/parsers/DETimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DETimeExpressionParser.js +1 -1
- package/dist/esm/locales/de/parsers/DETimeUnitRelativeFormatParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DETimeUnitRelativeFormatParser.js +5 -5
- package/dist/esm/locales/de/parsers/DETimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DETimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/de/parsers/DEWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/de/parsers/DEWeekdayParser.js +4 -4
- package/dist/esm/locales/de/refiners/DEMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/de/refiners/DEMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/de/refiners/DEMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/de/refiners/DEMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/en/constants.d.ts +2 -2
- package/dist/esm/locales/en/constants.js +5 -4
- package/dist/esm/locales/en/constants.js.map +1 -1
- package/dist/esm/locales/en/index.d.ts +2 -2
- package/dist/esm/locales/en/index.js +20 -20
- package/dist/esm/locales/en/parsers/ENCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENCasualDateParser.js +10 -4
- package/dist/esm/locales/en/parsers/ENCasualDateParser.js.map +1 -1
- package/dist/esm/locales/en/parsers/ENCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENCasualTimeParser.js +2 -2
- package/dist/esm/locales/en/parsers/ENCasualYearMonthDayParser.d.ts +2 -2
- package/dist/esm/locales/en/parsers/ENCasualYearMonthDayParser.js +3 -3
- package/dist/esm/locales/en/parsers/ENMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENMonthNameLittleEndianParser.js +6 -6
- package/dist/esm/locales/en/parsers/ENMonthNameMiddleEndianParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENMonthNameMiddleEndianParser.js +6 -6
- package/dist/esm/locales/en/parsers/ENMonthNameParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENMonthNameParser.js +5 -5
- package/dist/esm/locales/en/parsers/ENRelativeDateFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENRelativeDateFormatParser.js +4 -4
- package/dist/esm/locales/en/parsers/ENSlashMonthFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENSlashMonthFormatParser.js +1 -1
- package/dist/esm/locales/en/parsers/ENTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENTimeExpressionParser.js +2 -2
- package/dist/esm/locales/en/parsers/ENTimeUnitAgoFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENTimeUnitAgoFormatParser.js +4 -4
- package/dist/esm/locales/en/parsers/ENTimeUnitCasualRelativeFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENTimeUnitCasualRelativeFormatParser.js +4 -4
- package/dist/esm/locales/en/parsers/ENTimeUnitLaterFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENTimeUnitLaterFormatParser.js +3 -3
- package/dist/esm/locales/en/parsers/ENTimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENTimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/en/parsers/ENWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/en/parsers/ENWeekdayParser.js +4 -4
- package/dist/esm/locales/en/refiners/ENMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/en/refiners/ENMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/en/refiners/ENMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/en/refiners/ENMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/en/refiners/ENMergeRelativeDateRefiner.d.ts +2 -2
- package/dist/esm/locales/en/refiners/ENMergeRelativeDateRefiner.js +4 -4
- package/dist/esm/locales/es/constants.js +1 -1
- package/dist/esm/locales/es/index.d.ts +2 -2
- package/dist/esm/locales/es/index.js +11 -11
- package/dist/esm/locales/es/parsers/ESCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/es/parsers/ESCasualDateParser.js +2 -2
- package/dist/esm/locales/es/parsers/ESCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/es/parsers/ESCasualTimeParser.js +3 -3
- package/dist/esm/locales/es/parsers/ESMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/es/parsers/ESMonthNameLittleEndianParser.js +5 -5
- package/dist/esm/locales/es/parsers/ESTimeExpressionParser.d.ts +1 -1
- package/dist/esm/locales/es/parsers/ESTimeExpressionParser.js +1 -1
- package/dist/esm/locales/es/parsers/ESTimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/es/parsers/ESTimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/es/parsers/ESWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/es/parsers/ESWeekdayParser.js +4 -4
- package/dist/esm/locales/es/refiners/ESMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/es/refiners/ESMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/es/refiners/ESMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/es/refiners/ESMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/fr/constants.js +1 -1
- package/dist/esm/locales/fr/index.d.ts +2 -2
- package/dist/esm/locales/fr/index.js +14 -14
- package/dist/esm/locales/fr/parsers/FRCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRCasualDateParser.js +4 -4
- package/dist/esm/locales/fr/parsers/FRCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRCasualTimeParser.js +2 -2
- package/dist/esm/locales/fr/parsers/FRMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRMonthNameLittleEndianParser.js +6 -6
- package/dist/esm/locales/fr/parsers/FRSpecificTimeExpressionParser.d.ts +2 -2
- package/dist/esm/locales/fr/parsers/FRSpecificTimeExpressionParser.js +1 -1
- package/dist/esm/locales/fr/parsers/FRTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRTimeExpressionParser.js +1 -1
- package/dist/esm/locales/fr/parsers/FRTimeUnitAgoFormatParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRTimeUnitAgoFormatParser.js +4 -4
- package/dist/esm/locales/fr/parsers/FRTimeUnitRelativeFormatParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRTimeUnitRelativeFormatParser.js +5 -5
- package/dist/esm/locales/fr/parsers/FRTimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRTimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/fr/parsers/FRWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/fr/parsers/FRWeekdayParser.js +4 -4
- package/dist/esm/locales/fr/refiners/FRMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/fr/refiners/FRMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/fr/refiners/FRMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/fr/refiners/FRMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/ja/index.d.ts +2 -2
- package/dist/esm/locales/ja/index.js +4 -4
- package/dist/esm/locales/ja/parsers/JPCasualDateParser.d.ts +2 -2
- package/dist/esm/locales/ja/parsers/JPCasualDateParser.js +2 -2
- package/dist/esm/locales/ja/parsers/JPStandardParser.d.ts +2 -2
- package/dist/esm/locales/ja/parsers/JPStandardParser.js +2 -2
- package/dist/esm/locales/ja/parsers/JPStandardParser.js.map +1 -1
- package/dist/esm/locales/ja/refiners/JPMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/ja/refiners/JPMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/nl/constants.d.ts +1 -1
- package/dist/esm/locales/nl/constants.js +4 -2
- package/dist/esm/locales/nl/constants.js.map +1 -1
- package/dist/esm/locales/nl/index.d.ts +2 -2
- package/dist/esm/locales/nl/index.js +19 -19
- package/dist/esm/locales/nl/parsers/NLCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLCasualDateParser.js +2 -2
- package/dist/esm/locales/nl/parsers/NLCasualDateTimeParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLCasualDateTimeParser.js +3 -3
- package/dist/esm/locales/nl/parsers/NLCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLCasualTimeParser.js +3 -3
- package/dist/esm/locales/nl/parsers/NLCasualYearMonthDayParser.d.ts +2 -2
- package/dist/esm/locales/nl/parsers/NLCasualYearMonthDayParser.js +3 -3
- package/dist/esm/locales/nl/parsers/NLMonthNameMiddleEndianParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLMonthNameMiddleEndianParser.js +6 -6
- package/dist/esm/locales/nl/parsers/NLMonthNameParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLMonthNameParser.js +5 -5
- package/dist/esm/locales/nl/parsers/NLRelativeDateFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLRelativeDateFormatParser.js +4 -4
- package/dist/esm/locales/nl/parsers/NLSlashMonthFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLSlashMonthFormatParser.js +1 -1
- package/dist/esm/locales/nl/parsers/NLTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeExpressionParser.js +1 -1
- package/dist/esm/locales/nl/parsers/NLTimeUnitAgoFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeUnitAgoFormatParser.js +4 -4
- package/dist/esm/locales/nl/parsers/NLTimeUnitCasualRelativeFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeUnitCasualRelativeFormatParser.js +4 -4
- package/dist/esm/locales/nl/parsers/NLTimeUnitLaterFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeUnitLaterFormatParser.js +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLTimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/nl/parsers/NLWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/nl/parsers/NLWeekdayParser.js +4 -4
- package/dist/esm/locales/nl/refiners/NLMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/nl/refiners/NLMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/nl/refiners/NLMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/nl/refiners/NLMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/pt/index.d.ts +2 -2
- package/dist/esm/locales/pt/index.js +10 -10
- package/dist/esm/locales/pt/parsers/PTCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/pt/parsers/PTCasualDateParser.js +2 -2
- package/dist/esm/locales/pt/parsers/PTCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/pt/parsers/PTCasualTimeParser.js +3 -3
- package/dist/esm/locales/pt/parsers/PTMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/pt/parsers/PTMonthNameLittleEndianParser.js +5 -5
- package/dist/esm/locales/pt/parsers/PTTimeExpressionParser.d.ts +1 -1
- package/dist/esm/locales/pt/parsers/PTTimeExpressionParser.js +1 -1
- package/dist/esm/locales/pt/parsers/PTWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/pt/parsers/PTWeekdayParser.js +4 -4
- package/dist/esm/locales/pt/refiners/PTMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/pt/refiners/PTMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/pt/refiners/PTMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/pt/refiners/PTMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/ru/constants.d.ts +1 -1
- package/dist/esm/locales/ru/constants.js +2 -2
- package/dist/esm/locales/ru/index.d.ts +2 -2
- package/dist/esm/locales/ru/index.js +15 -15
- package/dist/esm/locales/ru/parsers/RUCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUCasualDateParser.js +8 -4
- package/dist/esm/locales/ru/parsers/RUCasualDateParser.js.map +1 -1
- package/dist/esm/locales/ru/parsers/RUCasualTimeParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUCasualTimeParser.js +4 -4
- package/dist/esm/locales/ru/parsers/RUMonthNameLittleEndianParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUMonthNameLittleEndianParser.js +6 -6
- package/dist/esm/locales/ru/parsers/RUMonthNameParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUMonthNameParser.js +5 -5
- package/dist/esm/locales/ru/parsers/RURelativeDateFormatParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RURelativeDateFormatParser.js +4 -4
- package/dist/esm/locales/ru/parsers/RUTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUTimeExpressionParser.js +3 -3
- package/dist/esm/locales/ru/parsers/RUTimeUnitAgoFormatParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUTimeUnitAgoFormatParser.js +4 -4
- package/dist/esm/locales/ru/parsers/RUTimeUnitCasualRelativeFormatParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUTimeUnitCasualRelativeFormatParser.js +4 -4
- package/dist/esm/locales/ru/parsers/RUTimeUnitWithinFormatParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUTimeUnitWithinFormatParser.js +3 -3
- package/dist/esm/locales/ru/parsers/RUWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/ru/parsers/RUWeekdayParser.js +4 -4
- package/dist/esm/locales/ru/refiners/RUMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/ru/refiners/RUMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/ru/refiners/RUMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/ru/refiners/RUMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/zh/hans/index.d.ts +2 -2
- package/dist/esm/locales/zh/hans/index.js +11 -11
- package/dist/esm/locales/zh/hans/parsers/ZHHansCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansCasualDateParser.js +1 -1
- package/dist/esm/locales/zh/hans/parsers/ZHHansDateParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansDateParser.js +2 -2
- package/dist/esm/locales/zh/hans/parsers/ZHHansDeadlineFormatParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansDeadlineFormatParser.js +2 -2
- package/dist/esm/locales/zh/hans/parsers/ZHHansRelationWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansRelationWeekdayParser.js +2 -2
- package/dist/esm/locales/zh/hans/parsers/ZHHansTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansTimeExpressionParser.js +2 -2
- package/dist/esm/locales/zh/hans/parsers/ZHHansWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/zh/hans/parsers/ZHHansWeekdayParser.js +2 -2
- package/dist/esm/locales/zh/hans/refiners/ZHHansMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/zh/hans/refiners/ZHHansMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/zh/hans/refiners/ZHHansMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/zh/hans/refiners/ZHHansMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/zh/hant/index.d.ts +2 -2
- package/dist/esm/locales/zh/hant/index.js +11 -11
- package/dist/esm/locales/zh/hant/parsers/ZHHantCasualDateParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantCasualDateParser.js +1 -1
- package/dist/esm/locales/zh/hant/parsers/ZHHantDateParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantDateParser.js +2 -2
- package/dist/esm/locales/zh/hant/parsers/ZHHantDeadlineFormatParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantDeadlineFormatParser.js +2 -2
- package/dist/esm/locales/zh/hant/parsers/ZHHantRelationWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantRelationWeekdayParser.js +2 -2
- package/dist/esm/locales/zh/hant/parsers/ZHHantTimeExpressionParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantTimeExpressionParser.js +2 -2
- package/dist/esm/locales/zh/hant/parsers/ZHHantWeekdayParser.d.ts +3 -3
- package/dist/esm/locales/zh/hant/parsers/ZHHantWeekdayParser.js +2 -2
- package/dist/esm/locales/zh/hant/refiners/ZHHantMergeDateRangeRefiner.d.ts +1 -1
- package/dist/esm/locales/zh/hant/refiners/ZHHantMergeDateRangeRefiner.js +1 -1
- package/dist/esm/locales/zh/hant/refiners/ZHHantMergeDateTimeRefiner.d.ts +1 -1
- package/dist/esm/locales/zh/hant/refiners/ZHHantMergeDateTimeRefiner.js +1 -1
- package/dist/esm/locales/zh/index.d.ts +2 -2
- package/dist/esm/locales/zh/index.js +2 -2
- package/dist/esm/package.json +1 -0
- package/dist/esm/results.d.ts +1 -1
- package/dist/esm/results.js +3 -3
- package/dist/esm/utils/dayjs.d.ts +1 -1
- package/dist/esm/utils/dayjs.js +1 -1
- package/dist/esm/utils/timeunits.d.ts +1 -1
- package/dist/package.json +1 -0
- package/package.json +22 -4
- package/tsconfig.build.esm.json +8 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MergingRefiner } from "../../../common/abstractRefiners";
|
|
2
|
-
import { ParsingResult } from "../../../results";
|
|
1
|
+
import { MergingRefiner } from "../../../common/abstractRefiners.js";
|
|
2
|
+
import { ParsingResult } from "../../../results.js";
|
|
3
3
|
export default class ENMergeRelativeDateRefiner extends MergingRefiner {
|
|
4
4
|
patternBetween(): RegExp;
|
|
5
5
|
shouldMergeResults(textBetween: string, currentResult: ParsingResult, nextResult: ParsingResult): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MergingRefiner } from "../../../common/abstractRefiners";
|
|
2
|
-
import { ParsingComponents, ParsingResult, ReferenceWithTimezone } from "../../../results";
|
|
3
|
-
import { parseTimeUnits } from "../constants";
|
|
4
|
-
import { reverseTimeUnits } from "../../../utils/timeunits";
|
|
1
|
+
import { MergingRefiner } from "../../../common/abstractRefiners.js";
|
|
2
|
+
import { ParsingComponents, ParsingResult, ReferenceWithTimezone } from "../../../results.js";
|
|
3
|
+
import { parseTimeUnits } from "../constants.js";
|
|
4
|
+
import { reverseTimeUnits } from "../../../utils/timeunits.js";
|
|
5
5
|
function hasImpliedEarlierReferenceDate(result) {
|
|
6
6
|
return result.text.match(/\s+(before|from)$/i) != null;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ParsedResult, ParsingOption } from "../../index";
|
|
2
|
-
import { Chrono, Configuration } from "../../chrono";
|
|
1
|
+
import { ParsedResult, ParsingOption } from "../../index.js";
|
|
2
|
+
import { Chrono, Configuration } from "../../chrono.js";
|
|
3
3
|
export declare const casual: Chrono;
|
|
4
4
|
export declare const strict: Chrono;
|
|
5
5
|
export declare function parse(text: string, ref?: Date, option?: ParsingOption): ParsedResult[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { includeCommonConfiguration } from "../../configurations";
|
|
2
|
-
import { Chrono } from "../../chrono";
|
|
3
|
-
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser";
|
|
4
|
-
import ESWeekdayParser from "./parsers/ESWeekdayParser";
|
|
5
|
-
import ESTimeExpressionParser from "./parsers/ESTimeExpressionParser";
|
|
6
|
-
import ESMergeDateTimeRefiner from "./refiners/ESMergeDateTimeRefiner";
|
|
7
|
-
import ESMergeDateRangeRefiner from "./refiners/ESMergeDateRangeRefiner";
|
|
8
|
-
import ESMonthNameLittleEndianParser from "./parsers/ESMonthNameLittleEndianParser";
|
|
9
|
-
import ESCasualDateParser from "./parsers/ESCasualDateParser";
|
|
10
|
-
import ESCasualTimeParser from "./parsers/ESCasualTimeParser";
|
|
11
|
-
import ESTimeUnitWithinFormatParser from "./parsers/ESTimeUnitWithinFormatParser";
|
|
1
|
+
import { includeCommonConfiguration } from "../../configurations.js";
|
|
2
|
+
import { Chrono } from "../../chrono.js";
|
|
3
|
+
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser.js";
|
|
4
|
+
import ESWeekdayParser from "./parsers/ESWeekdayParser.js";
|
|
5
|
+
import ESTimeExpressionParser from "./parsers/ESTimeExpressionParser.js";
|
|
6
|
+
import ESMergeDateTimeRefiner from "./refiners/ESMergeDateTimeRefiner.js";
|
|
7
|
+
import ESMergeDateRangeRefiner from "./refiners/ESMergeDateRangeRefiner.js";
|
|
8
|
+
import ESMonthNameLittleEndianParser from "./parsers/ESMonthNameLittleEndianParser.js";
|
|
9
|
+
import ESCasualDateParser from "./parsers/ESCasualDateParser.js";
|
|
10
|
+
import ESCasualTimeParser from "./parsers/ESCasualTimeParser.js";
|
|
11
|
+
import ESTimeUnitWithinFormatParser from "./parsers/ESTimeUnitWithinFormatParser.js";
|
|
12
12
|
export const casual = new Chrono(createCasualConfiguration());
|
|
13
13
|
export const strict = new Chrono(createConfiguration(true));
|
|
14
14
|
export function parse(text, ref, option) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents, ParsingResult } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents, ParsingResult } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class ESCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(context: ParsingContext): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
2
|
-
import * as references from "../../../common/casualReferences";
|
|
1
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
2
|
+
import * as references from "../../../common/casualReferences.js";
|
|
3
3
|
export default class ESCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(context) {
|
|
5
5
|
return /(ahora|hoy|mañana|ayer)(?=\W|$)/i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
3
|
export default class ESCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(): RegExp;
|
|
5
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results").ParsingComponents;
|
|
5
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results.js").ParsingComponents;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Meridiem } from "../../../index";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { assignTheNextDay } from "../../../utils/dayjs";
|
|
1
|
+
import { Meridiem } from "../../../index.js";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { assignTheNextDay } from "../../../utils/dayjs.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
export default class ESCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
6
6
|
innerPattern() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingResult } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingResult } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class ESMonthNameLittleEndianParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingResult;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { findYearClosestToRef } from "../../../calculation/years";
|
|
2
|
-
import { MONTH_DICTIONARY } from "../constants";
|
|
3
|
-
import { YEAR_PATTERN, parseYear } from "../constants";
|
|
4
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
5
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { findYearClosestToRef } from "../../../calculation/years.js";
|
|
2
|
+
import { MONTH_DICTIONARY } from "../constants.js";
|
|
3
|
+
import { YEAR_PATTERN, parseYear } from "../constants.js";
|
|
4
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
5
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
6
6
|
const PATTERN = new RegExp(`([0-9]{1,2})(?:º|ª|°)?` +
|
|
7
7
|
"(?:\\s*(?:desde|de|\\-|\\–|ao?|\\s)\\s*([0-9]{1,2})(?:º|ª|°)?)?\\s*(?:de)?\\s*" +
|
|
8
8
|
`(?:-|/|\\s*(?:de|,)?\\s*)` +
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
1
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
2
2
|
export default class ESTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
3
3
|
primaryPrefix(): string;
|
|
4
4
|
followingPhase(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
1
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
2
2
|
export default class ESTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
3
3
|
primaryPrefix() {
|
|
4
4
|
return "(?:(?:aslas|deslas|las?|al?|de|del)\\s*)?";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class ESTimeUnitWithinFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TIME_UNITS_PATTERN, parseTimeUnits } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { TIME_UNITS_PATTERN, parseTimeUnits } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class ESTimeUnitWithinFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern() {
|
|
6
6
|
return new RegExp(`(?:en|por|durante|de|dentro de)\\s*(${TIME_UNITS_PATTERN})(?=\\W|$)`, "i");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class ESWeekdayParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WEEKDAY_DICTIONARY } from "../constants";
|
|
2
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { createParsingComponentsAtWeekday } from "../../../common/calculation/weekdays";
|
|
1
|
+
import { WEEKDAY_DICTIONARY } from "../constants.js";
|
|
2
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
|
+
import { createParsingComponentsAtWeekday } from "../../../common/calculation/weekdays.js";
|
|
5
5
|
const PATTERN = new RegExp("(?:(?:\\,|\\(|\\()\\s*)?" +
|
|
6
6
|
"(?:(este|esta|pasado|pr[oó]ximo)\\s*)?" +
|
|
7
7
|
`(${matchAnyPattern(WEEKDAY_DICTIONARY)})` +
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner";
|
|
1
|
+
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner.js";
|
|
2
2
|
export default class ESMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner {
|
|
3
3
|
patternBetween(): RegExp;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner";
|
|
1
|
+
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner.js";
|
|
2
2
|
export default class ESMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return /^\s*(?:-)\s*$/i;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner";
|
|
1
|
+
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner.js";
|
|
2
2
|
export default class ESMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween(): RegExp;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner";
|
|
1
|
+
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner.js";
|
|
2
2
|
export default class ESMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return new RegExp("^\\s*(?:,|de|aslas|a)?\\s*$");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ParsedResult, ParsingOption } from "../../index";
|
|
2
|
-
import { Chrono, Configuration } from "../../chrono";
|
|
1
|
+
import { ParsedResult, ParsingOption } from "../../index.js";
|
|
2
|
+
import { Chrono, Configuration } from "../../chrono.js";
|
|
3
3
|
export declare const casual: Chrono;
|
|
4
4
|
export declare const strict: Chrono;
|
|
5
5
|
export declare function parse(text: string, ref?: Date, option?: ParsingOption): ParsedResult[];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { includeCommonConfiguration } from "../../configurations";
|
|
2
|
-
import { Chrono } from "../../chrono";
|
|
3
|
-
import FRCasualDateParser from "./parsers/FRCasualDateParser";
|
|
4
|
-
import FRCasualTimeParser from "./parsers/FRCasualTimeParser";
|
|
5
|
-
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser";
|
|
6
|
-
import FRTimeExpressionParser from "./parsers/FRTimeExpressionParser";
|
|
7
|
-
import FRMergeDateTimeRefiner from "./refiners/FRMergeDateTimeRefiner";
|
|
8
|
-
import FRMergeDateRangeRefiner from "./refiners/FRMergeDateRangeRefiner";
|
|
9
|
-
import FRWeekdayParser from "./parsers/FRWeekdayParser";
|
|
10
|
-
import FRSpecificTimeExpressionParser from "./parsers/FRSpecificTimeExpressionParser";
|
|
11
|
-
import FRMonthNameLittleEndianParser from "./parsers/FRMonthNameLittleEndianParser";
|
|
12
|
-
import FRTimeUnitAgoFormatParser from "./parsers/FRTimeUnitAgoFormatParser";
|
|
13
|
-
import FRTimeUnitWithinFormatParser from "./parsers/FRTimeUnitWithinFormatParser";
|
|
14
|
-
import FRTimeUnitRelativeFormatParser from "./parsers/FRTimeUnitRelativeFormatParser";
|
|
1
|
+
import { includeCommonConfiguration } from "../../configurations.js";
|
|
2
|
+
import { Chrono } from "../../chrono.js";
|
|
3
|
+
import FRCasualDateParser from "./parsers/FRCasualDateParser.js";
|
|
4
|
+
import FRCasualTimeParser from "./parsers/FRCasualTimeParser.js";
|
|
5
|
+
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser.js";
|
|
6
|
+
import FRTimeExpressionParser from "./parsers/FRTimeExpressionParser.js";
|
|
7
|
+
import FRMergeDateTimeRefiner from "./refiners/FRMergeDateTimeRefiner.js";
|
|
8
|
+
import FRMergeDateRangeRefiner from "./refiners/FRMergeDateRangeRefiner.js";
|
|
9
|
+
import FRWeekdayParser from "./parsers/FRWeekdayParser.js";
|
|
10
|
+
import FRSpecificTimeExpressionParser from "./parsers/FRSpecificTimeExpressionParser.js";
|
|
11
|
+
import FRMonthNameLittleEndianParser from "./parsers/FRMonthNameLittleEndianParser.js";
|
|
12
|
+
import FRTimeUnitAgoFormatParser from "./parsers/FRTimeUnitAgoFormatParser.js";
|
|
13
|
+
import FRTimeUnitWithinFormatParser from "./parsers/FRTimeUnitWithinFormatParser.js";
|
|
14
|
+
import FRTimeUnitRelativeFormatParser from "./parsers/FRTimeUnitRelativeFormatParser.js";
|
|
15
15
|
export const casual = new Chrono(createCasualConfiguration());
|
|
16
16
|
export const strict = new Chrono(createConfiguration(true));
|
|
17
17
|
export function parse(text, ref, option) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents, ParsingResult } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents, ParsingResult } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(context: ParsingContext): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { Meridiem } from "../../../index";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { assignSimilarDate } from "../../../utils/dayjs";
|
|
5
|
-
import * as references from "../../../common/casualReferences";
|
|
2
|
+
import { Meridiem } from "../../../index.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
|
+
import { assignSimilarDate } from "../../../utils/dayjs.js";
|
|
5
|
+
import * as references from "../../../common/casualReferences.js";
|
|
6
6
|
export default class FRCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
7
7
|
innerPattern(context) {
|
|
8
8
|
return /(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents, ParsingResult } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents, ParsingResult } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(context: ParsingContext): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Meridiem } from "../../../index";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { Meridiem } from "../../../index.js";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
3
|
export default class FRCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(context) {
|
|
5
5
|
return /(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingResult } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingResult } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRMonthNameLittleEndianParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingResult;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { findYearClosestToRef } from "../../../calculation/years";
|
|
2
|
-
import { MONTH_DICTIONARY } from "../constants";
|
|
3
|
-
import { YEAR_PATTERN, parseYear } from "../constants";
|
|
4
|
-
import { ORDINAL_NUMBER_PATTERN, parseOrdinalNumberPattern } from "../constants";
|
|
5
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
6
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { findYearClosestToRef } from "../../../calculation/years.js";
|
|
2
|
+
import { MONTH_DICTIONARY } from "../constants.js";
|
|
3
|
+
import { YEAR_PATTERN, parseYear } from "../constants.js";
|
|
4
|
+
import { ORDINAL_NUMBER_PATTERN, parseOrdinalNumberPattern } from "../constants.js";
|
|
5
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
6
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
7
7
|
const PATTERN = new RegExp("(?:on\\s*?)?" +
|
|
8
8
|
`(${ORDINAL_NUMBER_PATTERN})` +
|
|
9
9
|
`(?:\\s*(?:au|\\-|\\–|jusqu'au?|\\s)\\s*(${ORDINAL_NUMBER_PATTERN}))?` +
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Parser, ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingResult } from "../../../results";
|
|
1
|
+
import { Parser, ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingResult } from "../../../results.js";
|
|
3
3
|
export default class FRSpecificTimeExpressionParser implements Parser {
|
|
4
4
|
pattern(context: any): RegExp;
|
|
5
5
|
extract(context: ParsingContext, match: RegExpMatchArray): ParsingResult | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { ParsingContext } from "../../../chrono";
|
|
1
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
4
4
|
export default class FRTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
5
5
|
primaryPrefix(): string;
|
|
6
6
|
followingPhase(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
1
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
2
2
|
export default class FRTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
3
3
|
primaryPrefix() {
|
|
4
4
|
return "(?:(?:[àa])\\s*)?";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
constructor();
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseTimeUnits, TIME_UNITS_PATTERN } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { reverseTimeUnits } from "../../../utils/timeunits";
|
|
1
|
+
import { parseTimeUnits, TIME_UNITS_PATTERN } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
|
+
import { reverseTimeUnits } from "../../../utils/timeunits.js";
|
|
5
5
|
export default class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
constructor();
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NUMBER_PATTERN, parseNumberPattern, TIME_UNIT_DICTIONARY } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { reverseTimeUnits } from "../../../utils/timeunits";
|
|
5
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
1
|
+
import { NUMBER_PATTERN, parseNumberPattern, TIME_UNIT_DICTIONARY } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
|
+
import { reverseTimeUnits } from "../../../utils/timeunits.js";
|
|
5
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
6
6
|
export default class FRTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRTimeUnitWithinFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TIME_UNITS_PATTERN, parseTimeUnits } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { TIME_UNITS_PATTERN, parseTimeUnits } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRTimeUnitWithinFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern() {
|
|
6
6
|
return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${TIME_UNITS_PATTERN})(?=\\W|$)`, "i");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
export default class FRWeekdayParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WEEKDAY_DICTIONARY } from "../constants";
|
|
2
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { createParsingComponentsAtWeekday } from "../../../common/calculation/weekdays";
|
|
1
|
+
import { WEEKDAY_DICTIONARY } from "../constants.js";
|
|
2
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
|
+
import { createParsingComponentsAtWeekday } from "../../../common/calculation/weekdays.js";
|
|
5
5
|
const PATTERN = new RegExp("(?:(?:\\,|\\(|\\()\\s*)?" +
|
|
6
6
|
"(?:(?:ce)\\s*)?" +
|
|
7
7
|
`(${matchAnyPattern(WEEKDAY_DICTIONARY)})` +
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner";
|
|
1
|
+
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner.js";
|
|
2
2
|
export default class FRMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner {
|
|
3
3
|
patternBetween(): RegExp;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner";
|
|
1
|
+
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner.js";
|
|
2
2
|
export default class FRMergeDateRangeRefiner extends AbstractMergeDateRangeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return /^\s*(à|a|-)\s*$/i;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner";
|
|
1
|
+
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner.js";
|
|
2
2
|
export default class FRMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween(): RegExp;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner";
|
|
1
|
+
import AbstractMergeDateTimeRefiner from "../../../common/refiners/AbstractMergeDateTimeRefiner.js";
|
|
2
2
|
export default class FRMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return new RegExp("^\\s*(T|à|a|vers|de|,|-)?\\s*$");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Chrono, Configuration } from "../../chrono";
|
|
2
|
-
import { ParsedResult, ParsingOption } from "../../index";
|
|
1
|
+
import { Chrono, Configuration } from "../../chrono.js";
|
|
2
|
+
import { ParsedResult, ParsingOption } from "../../index.js";
|
|
3
3
|
export declare const casual: Chrono;
|
|
4
4
|
export declare const strict: Chrono;
|
|
5
5
|
export declare function parse(text: string, ref?: Date, option?: ParsingOption): ParsedResult[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import JPStandardParser from "./parsers/JPStandardParser";
|
|
2
|
-
import JPMergeDateRangeRefiner from "./refiners/JPMergeDateRangeRefiner";
|
|
3
|
-
import JPCasualDateParser from "./parsers/JPCasualDateParser";
|
|
4
|
-
import { Chrono } from "../../chrono";
|
|
1
|
+
import JPStandardParser from "./parsers/JPStandardParser.js";
|
|
2
|
+
import JPMergeDateRangeRefiner from "./refiners/JPMergeDateRangeRefiner.js";
|
|
3
|
+
import JPCasualDateParser from "./parsers/JPCasualDateParser.js";
|
|
4
|
+
import { Chrono } from "../../chrono.js";
|
|
5
5
|
export const casual = new Chrono(createCasualConfiguration());
|
|
6
6
|
export const strict = new Chrono(createConfiguration());
|
|
7
7
|
export function parse(text, ref, option) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Parser, ParsingContext } from "../../../chrono";
|
|
1
|
+
import { Parser, ParsingContext } from "../../../chrono.js";
|
|
2
2
|
export default class JPCasualDateParser implements Parser {
|
|
3
3
|
pattern(): RegExp;
|
|
4
|
-
extract(context: ParsingContext, match: RegExpMatchArray): import("../../../results").ParsingComponents;
|
|
4
|
+
extract(context: ParsingContext, match: RegExpMatchArray): import("../../../results.js").ParsingComponents;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { Meridiem } from "../../../index";
|
|
3
|
-
import * as references from "../../../common/casualReferences";
|
|
2
|
+
import { Meridiem } from "../../../index.js";
|
|
3
|
+
import * as references from "../../../common/casualReferences.js";
|
|
4
4
|
const PATTERN = /今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i;
|
|
5
5
|
export default class JPCasualDateParser {
|
|
6
6
|
pattern() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Parser, ParsingContext } from "../../../chrono";
|
|
1
|
+
import { Parser, ParsingContext } from "../../../chrono.js";
|
|
2
2
|
export default class JPStandardParser implements Parser {
|
|
3
3
|
pattern(): RegExp;
|
|
4
|
-
extract(context: ParsingContext, match: RegExpMatchArray): import("../../../results").ParsingComponents;
|
|
4
|
+
extract(context: ParsingContext, match: RegExpMatchArray): import("../../../results.js").ParsingComponents;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toHankaku } from "../constants";
|
|
2
|
-
import { findYearClosestToRef } from "../../../calculation/years";
|
|
1
|
+
import { toHankaku } from "../constants.js";
|
|
2
|
+
import { findYearClosestToRef } from "../../../calculation/years.js";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
const PATTERN = /(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i;
|
|
5
5
|
const SPECIAL_YEAR_GROUP = 1;
|