UNPKG

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