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,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 PTTimeExpressionParser 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 PTTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
3
3
|
primaryPrefix() {
|
|
4
4
|
return "(?:(?:ao?|às?|das|da|de|do)\\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 PTWeekdayParser 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|passado|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 PTMergeDateRangeRefiner 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 PTMergeDateRangeRefiner 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 PTMergeDateTimeRefiner 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 PTMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return new RegExp("^\\s*(?:,|à)?\\s*$");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { matchAnyPattern, repeatedTimeunitPattern } from "../../utils/pattern";
|
|
2
|
-
import { findMostLikelyADYear } from "../../calculation/years";
|
|
1
|
+
import { matchAnyPattern, repeatedTimeunitPattern } from "../../utils/pattern.js";
|
|
2
|
+
import { findMostLikelyADYear } from "../../calculation/years.js";
|
|
3
3
|
export const REGEX_PARTS = {
|
|
4
4
|
leftBoundary: "([^\\p{L}\\p{N}_]|^)",
|
|
5
5
|
rightBoundary: "(?=[^\\p{L}\\p{N}_]|$)",
|
|
@@ -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,18 +1,18 @@
|
|
|
1
|
-
import RUTimeUnitWithinFormatParser from "./parsers/RUTimeUnitWithinFormatParser";
|
|
2
|
-
import RUMonthNameLittleEndianParser from "./parsers/RUMonthNameLittleEndianParser";
|
|
3
|
-
import RUMonthNameParser from "./parsers/RUMonthNameParser";
|
|
4
|
-
import RUTimeExpressionParser from "./parsers/RUTimeExpressionParser";
|
|
5
|
-
import RUTimeUnitAgoFormatParser from "./parsers/RUTimeUnitAgoFormatParser";
|
|
6
|
-
import RUMergeDateRangeRefiner from "./refiners/RUMergeDateRangeRefiner";
|
|
7
|
-
import RUMergeDateTimeRefiner from "./refiners/RUMergeDateTimeRefiner";
|
|
8
|
-
import { includeCommonConfiguration } from "../../configurations";
|
|
9
|
-
import RUCasualDateParser from "./parsers/RUCasualDateParser";
|
|
10
|
-
import RUCasualTimeParser from "./parsers/RUCasualTimeParser";
|
|
11
|
-
import RUWeekdayParser from "./parsers/RUWeekdayParser";
|
|
12
|
-
import RURelativeDateFormatParser from "./parsers/RURelativeDateFormatParser";
|
|
13
|
-
import { Chrono } from "../../chrono";
|
|
14
|
-
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser";
|
|
15
|
-
import RUTimeUnitCasualRelativeFormatParser from "./parsers/RUTimeUnitCasualRelativeFormatParser";
|
|
1
|
+
import RUTimeUnitWithinFormatParser from "./parsers/RUTimeUnitWithinFormatParser.js";
|
|
2
|
+
import RUMonthNameLittleEndianParser from "./parsers/RUMonthNameLittleEndianParser.js";
|
|
3
|
+
import RUMonthNameParser from "./parsers/RUMonthNameParser.js";
|
|
4
|
+
import RUTimeExpressionParser from "./parsers/RUTimeExpressionParser.js";
|
|
5
|
+
import RUTimeUnitAgoFormatParser from "./parsers/RUTimeUnitAgoFormatParser.js";
|
|
6
|
+
import RUMergeDateRangeRefiner from "./refiners/RUMergeDateRangeRefiner.js";
|
|
7
|
+
import RUMergeDateTimeRefiner from "./refiners/RUMergeDateTimeRefiner.js";
|
|
8
|
+
import { includeCommonConfiguration } from "../../configurations.js";
|
|
9
|
+
import RUCasualDateParser from "./parsers/RUCasualDateParser.js";
|
|
10
|
+
import RUCasualTimeParser from "./parsers/RUCasualTimeParser.js";
|
|
11
|
+
import RUWeekdayParser from "./parsers/RUWeekdayParser.js";
|
|
12
|
+
import RURelativeDateFormatParser from "./parsers/RURelativeDateFormatParser.js";
|
|
13
|
+
import { Chrono } from "../../chrono.js";
|
|
14
|
+
import SlashDateFormatParser from "../../common/parsers/SlashDateFormatParser.js";
|
|
15
|
+
import RUTimeUnitCasualRelativeFormatParser from "./parsers/RUTimeUnitCasualRelativeFormatParser.js";
|
|
16
16
|
export const casual = new Chrono(createCasualConfiguration());
|
|
17
17
|
export const strict = new Chrono(createConfiguration(true));
|
|
18
18
|
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 RUCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(context: ParsingContext): RegExp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
2
|
-
import * as references from "../../../common/casualReferences";
|
|
3
|
-
import { REGEX_PARTS } from "../constants";
|
|
4
|
-
const PATTERN = new RegExp(`(?:с|со)?\\s*(
|
|
1
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
2
|
+
import * as references from "../../../common/casualReferences.js";
|
|
3
|
+
import { REGEX_PARTS } from "../constants.js";
|
|
4
|
+
const PATTERN = new RegExp(`(?:с|со)?\\s*(сегодня|вчера|завтра|послезавтра|послепослезавтра|позапозавчера|позавчера)${REGEX_PARTS.rightBoundary}`, REGEX_PARTS.flags);
|
|
5
5
|
export default class RUCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
6
6
|
patternLeftBoundary() {
|
|
7
7
|
return REGEX_PARTS.leftBoundary;
|
|
@@ -21,8 +21,12 @@ export default class RUCasualDateParser extends AbstractParserWithWordBoundaryCh
|
|
|
21
21
|
return references.tomorrow(context.reference);
|
|
22
22
|
case "послезавтра":
|
|
23
23
|
return references.theDayAfter(context.reference, 2);
|
|
24
|
+
case "послепослезавтра":
|
|
25
|
+
return references.theDayAfter(context.reference, 3);
|
|
24
26
|
case "позавчера":
|
|
25
27
|
return references.theDayBefore(context.reference, 2);
|
|
28
|
+
case "позапозавчера":
|
|
29
|
+
return references.theDayBefore(context.reference, 3);
|
|
26
30
|
}
|
|
27
31
|
return component;
|
|
28
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RUCasualDateParser.js","sourceRoot":"","sources":["../../../../../src/locales/ru/parsers/RUCasualDateParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sCAAsC,EAAE,MAAM,wDAAwD,CAAC;AAChH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,GAAG,IAAI,MAAM,CACtB,
|
|
1
|
+
{"version":3,"file":"RUCasualDateParser.js","sourceRoot":"","sources":["../../../../../src/locales/ru/parsers/RUCasualDateParser.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sCAAsC,EAAE,MAAM,wDAAwD,CAAC;AAChH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,OAAO,GAAG,IAAI,MAAM,CACtB,2FAA2F,WAAW,CAAC,aAAa,EAAE,EACtH,WAAW,CAAC,KAAK,CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,sCAAsC;IAClF,mBAAmB;QACf,OAAO,WAAW,CAAC,YAAY,CAAC;IACpC,CAAC;IAED,YAAY,CAAC,OAAuB;QAChC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,YAAY,CAAC,OAAuB,EAAE,KAAuB;QACzD,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAEpD,QAAQ,SAAS,EAAE;YACf,KAAK,SAAS;gBACV,OAAO,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAE/C,KAAK,OAAO;gBACR,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEnD,KAAK,QAAQ;gBACT,OAAO,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAElD,KAAK,aAAa;gBACd,OAAO,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAExD,KAAK,kBAAkB;gBACnB,OAAO,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAExD,KAAK,WAAW;gBACZ,OAAO,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YAEzD,KAAK,eAAe;gBAChB,OAAO,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;SAC5D;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
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 RUCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
patternLeftBoundary(): string;
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results").ParsingComponents;
|
|
6
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results.js").ParsingComponents;
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
2
|
-
import * as references from "../../../common/casualReferences";
|
|
3
|
-
import { assignSimilarDate } from "../../../utils/dayjs";
|
|
1
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
2
|
+
import * as references from "../../../common/casualReferences.js";
|
|
3
|
+
import { assignSimilarDate } from "../../../utils/dayjs.js";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
|
-
import { REGEX_PARTS } from "../constants";
|
|
5
|
+
import { REGEX_PARTS } from "../constants.js";
|
|
6
6
|
const PATTERN = new RegExp(`(сейчас|прошлым\\s*вечером|прошлой\\s*ночью|следующей\\s*ночью|сегодня\\s*ночью|этой\\s*ночью|ночью|этим утром|утром|утра|в\\s*полдень|вечером|вечера|в\\s*полночь)` +
|
|
7
7
|
`${REGEX_PARTS.rightBoundary}`, REGEX_PARTS.flags);
|
|
8
8
|
export default class RUCasualTimeParser extends AbstractParserWithWordBoundaryChecking {
|
|
@@ -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 RUMonthNameLittleEndianParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { findYearClosestToRef } from "../../../calculation/years";
|
|
2
|
-
import { MONTH_DICTIONARY, REGEX_PARTS } 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, REGEX_PARTS } 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(`(?:с)?\\s*(${ORDINAL_NUMBER_PATTERN})` +
|
|
8
8
|
`(?:` +
|
|
9
9
|
`\\s{0,3}(?:по|-|–|до)?\\s{0,3}` +
|
|
@@ -1,7 +1,7 @@
|
|
|
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 RUMonthNameParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
patternLeftBoundary(): string;
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results").ParsingResult;
|
|
6
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../results.js").ParsingResult;
|
|
7
7
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FULL_MONTH_NAME_DICTIONARY, MONTH_DICTIONARY, REGEX_PARTS } from "../constants";
|
|
2
|
-
import { findYearClosestToRef } from "../../../calculation/years";
|
|
3
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
4
|
-
import { YEAR_PATTERN, parseYear } from "../constants";
|
|
5
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { FULL_MONTH_NAME_DICTIONARY, MONTH_DICTIONARY, REGEX_PARTS } from "../constants.js";
|
|
2
|
+
import { findYearClosestToRef } from "../../../calculation/years.js";
|
|
3
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
4
|
+
import { YEAR_PATTERN, parseYear } from "../constants.js";
|
|
5
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
6
6
|
const PATTERN = new RegExp(`((?:в)\\s*)?` +
|
|
7
7
|
`(${matchAnyPattern(MONTH_DICTIONARY)})` +
|
|
8
8
|
`\\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 RURelativeDateFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { REGEX_PARTS, TIME_UNIT_DICTIONARY } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
1
|
+
import { REGEX_PARTS, TIME_UNIT_DICTIONARY } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
5
|
-
import { matchAnyPattern } from "../../../utils/pattern";
|
|
4
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
5
|
+
import { matchAnyPattern } from "../../../utils/pattern.js";
|
|
6
6
|
const PATTERN = new RegExp(`(в прошлом|на прошлой|на следующей|в следующем|на этой|в этом)\\s*(${matchAnyPattern(TIME_UNIT_DICTIONARY)})(?=\\s*)${REGEX_PARTS.rightBoundary}`, REGEX_PARTS.flags);
|
|
7
7
|
const MODIFIER_WORD_GROUP = 1;
|
|
8
8
|
const RELATIVE_WORD_GROUP = 2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../chrono";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
1
|
+
import { ParsingContext } from "../../../chrono.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
4
4
|
export default class RUTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
5
5
|
constructor(strictMode: any);
|
|
6
6
|
patternFlags(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Meridiem } from "../../../index";
|
|
2
|
-
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser";
|
|
3
|
-
import { REGEX_PARTS } from "../constants";
|
|
1
|
+
import { Meridiem } from "../../../index.js";
|
|
2
|
+
import { AbstractTimeExpressionParser } from "../../../common/parsers/AbstractTimeExpressionParser.js";
|
|
3
|
+
import { REGEX_PARTS } from "../constants.js";
|
|
4
4
|
export default class RUTimeExpressionParser extends AbstractTimeExpressionParser {
|
|
5
5
|
constructor(strictMode) {
|
|
6
6
|
super(strictMode);
|
|
@@ -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 RUTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseTimeUnits, REGEX_PARTS, 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, REGEX_PARTS, 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
|
const PATTERN = new RegExp(`(${TIME_UNITS_PATTERN})\\s{0,5}назад(?=(?:\\W|$))`, REGEX_PARTS.flags);
|
|
6
6
|
export default class RUTimeUnitAgoFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
7
7
|
patternLeftBoundary() {
|
|
@@ -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 RUTimeUnitCasualRelativeFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(): RegExp;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TIME_UNITS_PATTERN, parseTimeUnits, REGEX_PARTS } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
4
|
-
import { reverseTimeUnits } from "../../../utils/timeunits";
|
|
1
|
+
import { TIME_UNITS_PATTERN, parseTimeUnits, REGEX_PARTS } 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
|
const PATTERN = new RegExp(`(эти|последние|прошлые|следующие|после|спустя|через|\\+|-)\\s*(${TIME_UNITS_PATTERN})${REGEX_PARTS.rightBoundary}`, REGEX_PARTS.flags);
|
|
6
6
|
export default class RUTimeUnitCasualRelativeFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
7
7
|
patternLeftBoundary() {
|
|
@@ -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 RUTimeUnitWithinFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
patternLeftBoundary(): string;
|
|
6
6
|
innerPattern(context: ParsingContext): RegExp;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TIME_UNITS_PATTERN, parseTimeUnits, REGEX_PARTS } from "../constants";
|
|
2
|
-
import { ParsingComponents } from "../../../results";
|
|
3
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary";
|
|
1
|
+
import { TIME_UNITS_PATTERN, parseTimeUnits, REGEX_PARTS } from "../constants.js";
|
|
2
|
+
import { ParsingComponents } from "../../../results.js";
|
|
3
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
4
4
|
const PATTERN = `(?:(?:около|примерно)\\s*(?:~\\s*)?)?(${TIME_UNITS_PATTERN})${REGEX_PARTS.rightBoundary}`;
|
|
5
5
|
const PATTERN_WITH_PREFIX = new RegExp(`(?:в течение|в течении)\\s*${PATTERN}`, REGEX_PARTS.flags);
|
|
6
6
|
const PATTERN_WITHOUT_PREFIX = new RegExp(PATTERN, "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 RUWeekdayParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
patternLeftBoundary(): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { REGEX_PARTS, 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 { REGEX_PARTS, 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
|
`(?:в\\s*?)?` +
|
|
7
7
|
`(?:(эту|этот|прошлый|прошлую|следующий|следующую|следующего)\\s*)?` +
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner";
|
|
1
|
+
import AbstractMergeDateRangeRefiner from "../../../common/refiners/AbstractMergeDateRangeRefiner.js";
|
|
2
2
|
export default class RUMergeDateRangeRefiner 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 RUMergeDateRangeRefiner 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 RUMergeDateTimeRefiner 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 RUMergeDateTimeRefiner extends AbstractMergeDateTimeRefiner {
|
|
3
3
|
patternBetween() {
|
|
4
4
|
return new RegExp(`^\\s*(T|в|,|-)?\\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 hans: Chrono;
|
|
4
4
|
export declare const casual: Chrono;
|
|
5
5
|
export declare const strict: Chrono;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Chrono } from "../../../chrono";
|
|
2
|
-
import ExtractTimezoneOffsetRefiner from "../../../common/refiners/ExtractTimezoneOffsetRefiner";
|
|
3
|
-
import { includeCommonConfiguration } from "../../../configurations";
|
|
4
|
-
import ZHHansCasualDateParser from "./parsers/ZHHansCasualDateParser";
|
|
5
|
-
import ZHHansDateParser from "./parsers/ZHHansDateParser";
|
|
6
|
-
import ZHHansDeadlineFormatParser from "./parsers/ZHHansDeadlineFormatParser";
|
|
7
|
-
import ZHHansRelationWeekdayParser from "./parsers/ZHHansRelationWeekdayParser";
|
|
8
|
-
import ZHHansTimeExpressionParser from "./parsers/ZHHansTimeExpressionParser";
|
|
9
|
-
import ZHHansWeekdayParser from "./parsers/ZHHansWeekdayParser";
|
|
10
|
-
import ZHHansMergeDateRangeRefiner from "./refiners/ZHHansMergeDateRangeRefiner";
|
|
11
|
-
import ZHHansMergeDateTimeRefiner from "./refiners/ZHHansMergeDateTimeRefiner";
|
|
1
|
+
import { Chrono } from "../../../chrono.js";
|
|
2
|
+
import ExtractTimezoneOffsetRefiner from "../../../common/refiners/ExtractTimezoneOffsetRefiner.js";
|
|
3
|
+
import { includeCommonConfiguration } from "../../../configurations.js";
|
|
4
|
+
import ZHHansCasualDateParser from "./parsers/ZHHansCasualDateParser.js";
|
|
5
|
+
import ZHHansDateParser from "./parsers/ZHHansDateParser.js";
|
|
6
|
+
import ZHHansDeadlineFormatParser from "./parsers/ZHHansDeadlineFormatParser.js";
|
|
7
|
+
import ZHHansRelationWeekdayParser from "./parsers/ZHHansRelationWeekdayParser.js";
|
|
8
|
+
import ZHHansTimeExpressionParser from "./parsers/ZHHansTimeExpressionParser.js";
|
|
9
|
+
import ZHHansWeekdayParser from "./parsers/ZHHansWeekdayParser.js";
|
|
10
|
+
import ZHHansMergeDateRangeRefiner from "./refiners/ZHHansMergeDateRangeRefiner.js";
|
|
11
|
+
import ZHHansMergeDateTimeRefiner from "./refiners/ZHHansMergeDateTimeRefiner.js";
|
|
12
12
|
export const hans = new Chrono(createCasualConfiguration());
|
|
13
13
|
export const casual = new Chrono(createCasualConfiguration());
|
|
14
14
|
export const strict = new Chrono(createConfiguration());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../../chrono";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { ParsingComponents, ParsingResult } from "../../../../results";
|
|
1
|
+
import { ParsingContext } from "../../../../chrono.js";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { ParsingComponents, ParsingResult } from "../../../../results.js";
|
|
4
4
|
export default class ZHHansCasualDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(context: ParsingContext): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingComponents | ParsingResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
3
|
const NOW_GROUP = 1;
|
|
4
4
|
const DAY_GROUP_1 = 2;
|
|
5
5
|
const TIME_GROUP_1 = 3;
|
|
@@ -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 ZHHansDateParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(): RegExp;
|
|
5
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results").ParsingResult;
|
|
5
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results.js").ParsingResult;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { NUMBER, zhStringToNumber, zhStringToYear } from "../constants";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { NUMBER, zhStringToNumber, zhStringToYear } from "../constants.js";
|
|
4
4
|
const YEAR_GROUP = 1;
|
|
5
5
|
const MONTH_GROUP = 2;
|
|
6
6
|
const DAY_GROUP = 3;
|
|
@@ -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 ZHHansDeadlineFormatParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(): RegExp;
|
|
5
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results").ParsingResult;
|
|
5
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results.js").ParsingResult;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { NUMBER, zhStringToNumber } from "../constants";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { NUMBER, zhStringToNumber } from "../constants.js";
|
|
4
4
|
const PATTERN = new RegExp("(\\d+|[" +
|
|
5
5
|
Object.keys(NUMBER).join("") +
|
|
6
6
|
"]+|半|几)(?:\\s*)" +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsingContext } from "../../../../chrono";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { ParsingResult } from "../../../../results";
|
|
1
|
+
import { ParsingContext } from "../../../../chrono.js";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { ParsingResult } from "../../../../results.js";
|
|
4
4
|
export default class ZHHansRelationWeekdayParser extends AbstractParserWithWordBoundaryChecking {
|
|
5
5
|
innerPattern(): RegExp;
|
|
6
6
|
innerExtract(context: ParsingContext, match: RegExpMatchArray): ParsingResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary";
|
|
3
|
-
import { WEEKDAY_OFFSET } from "../constants";
|
|
2
|
+
import { AbstractParserWithWordBoundaryChecking } from "../../../../common/parsers/AbstractParserWithWordBoundary.js";
|
|
3
|
+
import { WEEKDAY_OFFSET } from "../constants.js";
|
|
4
4
|
const PATTERN = new RegExp("(?<prefix>上|下|这)(?:个)?(?:星期|礼拜|周)(?<weekday>" + Object.keys(WEEKDAY_OFFSET).join("|") + ")");
|
|
5
5
|
export default class ZHHansRelationWeekdayParser extends AbstractParserWithWordBoundaryChecking {
|
|
6
6
|
innerPattern() {
|
|
@@ -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 ZHHansTimeExpressionParser extends AbstractParserWithWordBoundaryChecking {
|
|
4
4
|
innerPattern(): RegExp;
|
|
5
|
-
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results").ParsingResult;
|
|
5
|
+
innerExtract(context: ParsingContext, match: RegExpMatchArray): import("../../../../results.js").ParsingResult;
|
|
6
6
|
}
|