UNPKG

md2

Version:

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Chips(Tags), Collapse, Colorpicker, Data Table, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.

40 lines (39 loc) 1.7 kB
import { DateAdapter } from './date-adapter'; /** Adapts the native JS Date for use with cdk-based components that work with dates. */ export declare class NativeDateAdapter extends DateAdapter<Date> { getYear(date: Date): number; getMonth(date: Date): number; getDate(date: Date): number; getDayOfWeek(date: Date): number; getMonthNames(style: 'long' | 'short' | 'narrow'): string[]; getDateNames(): string[]; getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[]; getYearName(date: Date): string; getFirstDayOfWeek(): number; getNumDaysInMonth(date: Date): number; clone(date: Date): Date; createDate(year: number, month: number, date: number): Date; today(): Date; parse(value: any): Date | null; format(date: Date, displayFormat: Object): string; addCalendarYears(date: Date, years: number): Date; addCalendarMonths(date: Date, months: number): Date; addCalendarDays(date: Date, days: number): Date; getISODateString(date: Date): string; /** Creates a date but allows the month and date to overflow. */ private _createDateWithOverflow(year, month, date); /** * Pads a number to make it two digits. * @param n The number to pad. * @returns The padded number. */ private _2digit(n); /** * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while * other browsers do not. We remove them to make output consistent and because they interfere with * date parsing. * @param s The string to strip direction characters from. * @returns The stripped string. */ private _stripDirectionalityCharacters(s); }