import DateRange from "./DateRange"; /** * Class OpeningHoursParser, creates DateRange/Week/Day objects from opening_hours string * Based on a subpart of grammar defined at http://wiki.openstreetmap.org/wiki/Key:opening_hours/specification */ declare class OpeningHoursParser { /** * Parses the given opening_hours string * @param oh The opening_hours string * @return An array of date ranges */ parse(oh: string): DateRange[]; /** * Remove intervals from given typical day/week * @param typical The typical day or week * @param weekdays The concerned weekdays * @param times The concerned times */ _removeInterval(typical: any, weekdays: any, times: any): void; /** * Remove intervals from given typical day/week for a given weekday * @param typical The typical day or week * @param times The concerned times * @param wd The concerned weekday */ _removeIntervalWd(typical: any, times: any, wd: any): void; /** * Adds intervals from given typical day/week * @param typical The typical day or week * @param weekdays The concerned weekdays * @param times The concerned times */ _addInterval(typical: any, weekdays: any, times: any): void; /** * Adds intervals from given typical day/week for a given weekday * @param typical The typical day or week * @param times The concerned times * @param wd The concerned weekday */ _addIntervalWd(typical: any, times: any, wd: any): void; /** * Converts a time string "12:45" into minutes integer * @param time The time string * @return The amount of minutes since midnight */ _asMinutes(time: any): number; /** * Is the given token a weekday selector ? */ _isWeekday(token: any): boolean; /** * Is the given token a time selector ? */ _isTime(token: any): boolean; /** * Is the given token a rule modifier ? */ _isRuleModifier(token: any): boolean; /** * Create tokens for a given block */ _tokenize(block: any): any; _printIntervals(from: any, intervals: any): void; } export default OpeningHoursParser;