UNPKG

serina

Version:

Natural Language Parser for date and time in Javascript

9 lines (8 loc) 623 B
import RELATIVE_DATES from 'filters/relativeDates/relativeDates.constants'; import { DayLiteUnits } from 'lib/date/types'; export type RegexTimeUnit = keyof typeof RELATIVE_DATES.TIME_UNITS; export declare function regexTimeUnitToDayLiteTimeUnit(regexTimeUnit: RegexTimeUnit): DayLiteUnits; export declare function convertRelativeAdverbToObj(relativeDateStr: string): Date; export declare function convertRelativeExpressionToObj(expression: string): Date; export declare function relativeDateStringToDayMonthYear(date: string): Date; export declare function relativeDateStringToDateObj(matchingText: string): Date;