time-parser.d.ts 615 B

1234567891011121314151617181920
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. export interface TimeResult {
  6. hour: number | null;
  7. minute: number | null;
  8. second: number | null;
  9. period: number | null;
  10. }
  11. export declare class NgTimeParser {
  12. private format;
  13. private localeId;
  14. regex: RegExp;
  15. matchMap: Record<string, null | number>;
  16. constructor(format: string, localeId: string);
  17. toDate(str: string): Date;
  18. getTimeResult(str: string): TimeResult | null;
  19. genRegexp(): void;
  20. }