UNPKG

2.41 kBTypeScriptView Raw
1import { InjectionToken } from '@angular/core';
2import { CalendarDateFormatterInterface, DateFormatterParams } from '../calendar-date-formatter/calendar-date-formatter.interface';
3import { DateAdapter } from '../../../date-adapters/date-adapter';
4import * as i0 from "@angular/core";
5export declare const MOMENT: InjectionToken<string>;
6/**
7 * This will use <a href="http://momentjs.com/" target="_blank">moment</a> to do all date formatting. To use this class:
8 *
9 * ```typescript
10 * import { CalendarDateFormatter, CalendarMomentDateFormatter, MOMENT } from 'angular-calendar';
11 * import moment from 'moment';
12 *
13 * // in your component
14 * provide: [{
15 * provide: MOMENT, useValue: moment
16 * }, {
17 * provide: CalendarDateFormatter, useClass: CalendarMomentDateFormatter
18 * }]
19 *
20 * ```
21 */
22export declare class CalendarMomentDateFormatter implements CalendarDateFormatterInterface {
23 protected moment: any;
24 protected dateAdapter: DateAdapter;
25 /**
26 * @hidden
27 */
28 constructor(moment: any, dateAdapter: DateAdapter);
29 /**
30 * The month view header week day labels
31 */
32 monthViewColumnHeader({ date, locale }: DateFormatterParams): string;
33 /**
34 * The month view cell day number
35 */
36 monthViewDayNumber({ date, locale }: DateFormatterParams): string;
37 /**
38 * The month view title
39 */
40 monthViewTitle({ date, locale }: DateFormatterParams): string;
41 /**
42 * The week view header week day labels
43 */
44 weekViewColumnHeader({ date, locale }: DateFormatterParams): string;
45 /**
46 * The week view sub header day and month labels
47 */
48 weekViewColumnSubHeader({ date, locale, }: DateFormatterParams): string;
49 /**
50 * The week view title
51 */
52 weekViewTitle({ date, locale, weekStartsOn, excludeDays, daysInWeek, }: DateFormatterParams): string;
53 /**
54 * The time formatting down the left hand side of the week view
55 */
56 weekViewHour({ date, locale }: DateFormatterParams): string;
57 /**
58 * The time formatting down the left hand side of the day view
59 */
60 dayViewHour({ date, locale }: DateFormatterParams): string;
61 /**
62 * The day view title
63 */
64 dayViewTitle({ date, locale }: DateFormatterParams): string;
65 static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMomentDateFormatter, never>;
66 static ɵprov: i0.ɵɵInjectableDeclaration<CalendarMomentDateFormatter>;
67}