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 short weekday name to display in the heading of the month view.
|
20 | *
|
21 | * With default calendar we use ISO 8601: 'weekday' is 1=Mon ... 7=Sun.
|
22 | *
|
23 | * @deprecated 9.1.0, use 'getWeekdayLabel' instead
|
24 | */
|
25 | abstract getWeekdayShortName(weekday: number): string;
|
26 | /**
|
27 | * Returns the weekday label using specified width
|
28 | *
|
29 | * @since 9.1.0
|
30 | */
|
31 | getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
32 | /**
|
33 | * Returns the short month name to display in the date picker navigation.
|
34 | *
|
35 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
36 | */
|
37 | abstract getMonthShortName(month: number, year?: number): string;
|
38 | /**
|
39 | * Returns the full month name to display in the date picker navigation.
|
40 | *
|
41 | * With default calendar we use ISO 8601: 'month' is 1=Jan ... 12=Dec.
|
42 | */
|
43 | abstract getMonthFullName(month: number, year?: number): string;
|
44 | /**
|
45 | * Returns the text label to display above the day view.
|
46 | *
|
47 | * @since 9.1.0
|
48 | */
|
49 | getMonthLabel(date: NgbDateStruct): string;
|
50 | /**
|
51 | * Returns the value of the `aria-label` attribute for a specific date.
|
52 | *
|
53 | * @since 2.0.0
|
54 | */
|
55 | abstract getDayAriaLabel(date: NgbDateStruct): string;
|
56 | /**
|
57 | * Returns the textual representation of a day that is rendered in a day cell.
|
58 | *
|
59 | * @since 3.0.0
|
60 | */
|
61 | getDayNumerals(date: NgbDateStruct): string;
|
62 | /**
|
63 | * Returns the textual representation of a week number rendered by datepicker.
|
64 | *
|
65 | * @since 3.0.0
|
66 | */
|
67 | getWeekNumerals(weekNumber: number): string;
|
68 | /**
|
69 | * Returns the textual representation of a year that is rendered in the datepicker year select box.
|
70 | *
|
71 | * @since 3.0.0
|
72 | */
|
73 | getYearNumerals(year: number): string;
|
74 | /**
|
75 | * Returns the week label to display in the heading of the month view.
|
76 | *
|
77 | * @since 9.1.0
|
78 | */
|
79 | getWeekLabel(): string;
|
80 | }
|
81 | /**
|
82 | * A service providing default implementation for the datepicker i18n.
|
83 | * It can be used as a base implementation if necessary.
|
84 | *
|
85 | * @since 9.1.0
|
86 | */
|
87 | export declare class NgbDatepickerI18nDefault extends NgbDatepickerI18n {
|
88 | private _locale;
|
89 | private _monthsShort;
|
90 | private _monthsFull;
|
91 | constructor(_locale: string);
|
92 | getWeekdayShortName(weekday: number): string;
|
93 | getWeekdayLabel(weekday: number, width?: TranslationWidth): string;
|
94 | getMonthShortName(month: number): string;
|
95 | getMonthFullName(month: number): string;
|
96 | getDayAriaLabel(date: NgbDateStruct): string;
|
97 | }
|