{"version":3,"file":"ngb-date-parser-formatter.d.ts","sources":["ngb-date-parser-formatter.d.ts"],"names":[],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;;;AACA","sourcesContent":["import { NgbDateStruct } from './ngb-date-struct';\r\nexport declare function NGB_DATEPICKER_PARSER_FORMATTER_FACTORY(): NgbDateISOParserFormatter;\r\n/**\r\n * An abstract service for parsing and formatting dates for the\r\n * [`NgbInputDatepicker`](#/components/datepicker/api#NgbInputDatepicker) directive.\r\n * Converts between the internal `NgbDateStruct` model presentation and a `string` that is displayed in the\r\n * input element.\r\n *\r\n * When user types something in the input this service attempts to parse it into a `NgbDateStruct` object.\r\n * And vice versa, when users selects a date in the calendar with the mouse, it must be displayed as a `string`\r\n * in the input.\r\n *\r\n * Default implementation uses the ISO 8601 format, but you can provide another implementation via DI\r\n * to use an alternative string format or a custom parsing logic.\r\n *\r\n * See the [date format overview](#/components/datepicker/overview#date-model) for more details.\r\n */\r\nexport declare abstract class NgbDateParserFormatter {\r\n    /**\r\n     * Parses the given `string` to an `NgbDateStruct`.\r\n     *\r\n     * Implementations should try their best to provide a result, even\r\n     * partial. They must return `null` if the value can't be parsed.\r\n     */\r\n    abstract parse(value: string): NgbDateStruct;\r\n    /**\r\n     * Formats the given `NgbDateStruct` to a `string`.\r\n     *\r\n     * Implementations should return an empty string if the given date is `null`,\r\n     * and try their best to provide a partial result if the given date is incomplete or invalid.\r\n     */\r\n    abstract format(date: NgbDateStruct): string;\r\n}\r\nexport declare class NgbDateISOParserFormatter extends NgbDateParserFormatter {\r\n    parse(value: string): NgbDateStruct;\r\n    format(date: NgbDateStruct): string;\r\n}\r\n"]}