1 | import { TranslationWidth } from '@angular/common';
|
2 | import { NgbDateStruct } from './ngb-date-struct';
|
3 | export declare function NGB_DATEPICKER_18N_FACTORY(locale: any): NgbDatepickerI18nDefault;
|
4 | /**
|
5 | * A service supplying i18n data to the datepicker component.
|
6 | *
|
7 | * The default implementation of this service uses the Angular locale and registered locale data for
|
8 | * weekdays and month names (as explained in the Angular i18n guide).
|
9 | *
|
10 | * It also provides a way to i18n data that depends on calendar calculations, like aria labels, day, week and year
|
11 | * numerals. For other static labels the datepicker uses the default Angular i18n.
|
12 | *
|
13 | * See the [i18n demo](#/components/datepicker/examples#i18n) and
|
14 | * [Hebrew calendar demo](#/components/datepicker/calendars#hebrew) on how to extend this class and define
|
15 | * a custom provider for i18n.
|
16 | */
|
17 | export declare abstract class NgbDatepickerI18n {
|
18 | /**
|
19 | * Returns the weekday label using specified width
|
20 | *
|
21 | * @since 9.1.0
|
22 | */
|
23 | abstract getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
24 | /**
|
25 | * Returns the short month name to display in the date picker navigation.
|
26 | *
|
27 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
28 | */
|
29 | abstract getMonthShortName(month: number, year?: number): string;
|
30 | /**
|
31 | * Returns the full month name to display in the date picker navigation.
|
32 | *
|
33 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
34 | */
|
35 | abstract getMonthFullName(month: number, year?: number): string;
|
36 | /**
|
37 | * Returns the text label to display above the day view.
|
38 | *
|
39 | * @since 9.1.0
|
40 | */
|
41 | getMonthLabel(date: NgbDateStruct): string;
|
42 | /**
|
43 | * Returns the value of the `aria-label` attribute for a specific date.
|
44 | *
|
45 | * @since 2.0.0
|
46 | */
|
47 | abstract getDayAriaLabel(date: NgbDateStruct): string;
|
48 | /**
|
49 | * Returns the textual representation of a day that is rendered in a day cell.
|
50 | *
|
51 | * @since 3.0.0
|
52 | */
|
53 | getDayNumerals(date: NgbDateStruct): string;
|
54 | /**
|
55 | * Returns the textual representation of a week number rendered by datepicker.
|
56 | *
|
57 | * @since 3.0.0
|
58 | */
|
59 | getWeekNumerals(weekNumber: number): string;
|
60 | /**
|
61 | * Returns the textual representation of a year that is rendered in the datepicker year select box.
|
62 | *
|
63 | * @since 3.0.0
|
64 | */
|
65 | getYearNumerals(year: number): string;
|
66 | /**
|
67 | * Returns the week label to display in the heading of the month view.
|
68 | *
|
69 | * @since 9.1.0
|
70 | */
|
71 | getWeekLabel(): string;
|
72 | }
|
73 | /**
|
74 | * A service providing default implementation for the datepicker i18n.
|
75 | * It can be used as a base implementation if necessary.
|
76 | *
|
77 | * @since 9.1.0
|
78 | */
|
79 | export declare class NgbDatepickerI18nDefault extends NgbDatepickerI18n {
|
80 | private _locale;
|
81 | private _monthsShort;
|
82 | private _monthsFull;
|
83 | constructor(_locale: string);
|
84 | getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
85 | getMonthShortName(month: number): string;
|
86 | getMonthFullName(month: number): string;
|
87 | getDayAriaLabel(date: NgbDateStruct): string;
|
88 | }
|