@matheo/datepicker
Version:
Angular material date+time picker
1 lines • 44.4 kB
Source Map (JSON)
{"version":3,"file":"matheo-datepicker-core.mjs","sources":["../../../../libs/datepicker/core/datetime/date-adapter.ts","../../../../libs/datepicker/core/datetime/native-date-adapter.ts","../../../../libs/datepicker/core/datetime/native-date-formats.ts","../../../../libs/datepicker/core/datetime/index.ts","../../../../libs/datepicker/core/matheo-datepicker-core.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable, Subject} from 'rxjs';\n\nexport type DateUnit =\n | 'y' | 'year' | 'years'\n | 'M' | 'month' | 'months'\n | 'd' | 'day' | 'days'\n | 'h' | 'hour' | 'hours'\n | 'm' | 'minute' | 'minutes';\n\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nexport abstract class DateAdapter<D> {\n /** The locale to use for all dates. */\n protected locale: any;\n protected _localeChanges = new Subject<void>();\n\n /** A stream that emits when the locale changes. */\n readonly localeChanges: Observable<void> = this._localeChanges;\n\n /**\n * Gets the year component of the given date.\n * @param date The date to extract the year from.\n * @returns The year component.\n */\n abstract getYear(date: D): number;\n\n /**\n * Gets the month component of the given date.\n * @param date The date to extract the month from.\n * @returns The month component (0-indexed, 0 = January).\n */\n abstract getMonth(date: D): number;\n\n abstract getHours(date: D): number;\n\n abstract setHours(date: D, value: number): D;\n\n abstract getMinutes(date: D): number;\n\n abstract setMinutes(date: D, value: number): D;\n\n abstract getSeconds(date: D): number;\n\n abstract setSeconds(date: D, value: number, ms?: number): D;\n\n abstract getMilliseconds(date: D): number;\n\n /**\n * Gets the date of the month component of the given date.\n * @param date The date to extract the date of the month from.\n * @returns The month component (1-indexed, 1 = first of month).\n */\n abstract getDate(date: D): number;\n\n /**\n * Gets the day of the week component of the given date.\n * @param date The date to extract the day of the week from.\n * @returns The month component (0-indexed, 0 = Sunday).\n */\n abstract getDayOfWeek(date: D): number;\n\n /**\n * Gets a list of names for the months.\n * @param style The naming style (e.g. long = 'January', short = 'Jan', narrow = 'J').\n * @returns An ordered list of all month names, starting with January.\n */\n abstract getMonthNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets a list of names for the dates of the month.\n * @returns An ordered list of all date of the month names, starting with '1'.\n */\n abstract getDateNames(): string[];\n\n abstract getHourNames(): string[];\n\n abstract getMinuteNames(): string[];\n\n /**\n * Gets a list of names for the days of the week.\n * @param style The naming style (e.g. long = 'Sunday', short = 'Sun', narrow = 'S').\n * @returns An ordered list of all weekday names, starting with Sunday.\n */\n abstract getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];\n\n /**\n * Gets the name for the year of the given date.\n * @param date The date to get the year name for.\n * @returns The name of the given year (e.g. '2017').\n */\n abstract getYearName(date: D): string;\n\n /**\n * Gets the first day of the week.\n * @returns The first day of the week (0-indexed, 0 = Sunday).\n */\n abstract getFirstDayOfWeek(): number;\n\n /**\n * Gets the number of days in the month of the given date.\n * @param date The date whose month should be checked.\n * @returns The number of days in the month of the given date.\n */\n abstract getNumDaysInMonth(date: D): number;\n\n /**\n * Clones the given date.\n * @param date The date to clone\n * @returns A new date equal to the given date.\n */\n abstract clone(date: D): D;\n\n /**\n * Creates a date with the given year, month, and date. Does not allow over/under-flow of the\n * month and date.\n * @param year The full year of the date. (e.g. 89 means the year 89, not the year 1989).\n * @param month The month of the date (0-indexed, 0 = January). Must be an integer 0 - 11.\n * @param date The date of month of the date. Must be an integer 1 - length of the given month.\n * @returns The new date, or null if invalid.\n */\n abstract createDate(\n year: number,\n month: number,\n date: number,\n hours?: number,\n minutes?: number,\n seconds?: number,\n ms?: number,\n ): D;\n\n /**\n * Gets today's date.\n * @returns Today's date.\n */\n abstract today(): D;\n\n /**\n * Parses a date from a user-provided value.\n * @param value The value to parse.\n * @param parseFormat The expected format of the value being parsed\n * (type is implementation-dependent).\n * @returns The parsed date.\n */\n abstract parse(value: any, parseFormat: any): D | null;\n\n /**\n * Formats a date as a string according to the given format.\n * @param date The value to format.\n * @param displayFormat The format to use to display the date as a string.\n * @returns The formatted date string.\n */\n abstract format(date: D, displayFormat: any): string;\n\n /**\n * Adds the given number of years to the date. Years are counted as if flipping 12 pages on the\n * calendar for each year and then finding the closest date in the new month. For example when\n * adding 1 year to Feb 29, 2016, the resulting date will be Feb 28, 2017.\n * @param date The date to add years to.\n * @param years The number of years to add (may be negative).\n * @returns A new date equal to the given one with the specified number of years added.\n */\n abstract addCalendarYears(date: D, years: number): D;\n\n /**\n * Adds the given number of months to the date. Months are counted as if flipping a page on the\n * calendar for each month and then finding the closest date in the new month. For example when\n * adding 1 month to Jan 31, 2017, the resulting date will be Feb 28, 2017.\n * @param date The date to add months to.\n * @param months The number of months to add (may be negative).\n * @returns A new date equal to the given one with the specified number of months added.\n */\n abstract addCalendarMonths(date: D, months: number): D;\n\n /**\n * Adds the given number of days to the date. Days are counted as if moving one cell on the\n * calendar for each day.\n * @param date The date to add days to.\n * @param days The number of days to add (may be negative).\n * @returns A new date equal to the given one with the specified number of days added.\n */\n abstract addCalendarDays(date: D, days: number): D;\n\n abstract addCalendarHours(date: D, hours: number): D;\n\n abstract addCalendarMinutes(date: D, minutes: number): D;\n\n abstract addCalendarSeconds(date: D, seconds: number, ms?: number): D;\n\n /**\n * Gets the RFC 3339 compatible string (https://tools.ietf.org/html/rfc3339) for the given date.\n * This method is used to generate date strings that are compatible with native HTML attributes\n * such as the `min` or `max` attribute of an `<input>`.\n * @param date The date to get the ISO date string for.\n * @returns The ISO date string date string.\n */\n abstract toIso8601(date: D): string;\n\n /**\n * Checks whether the given object is considered a date instance by this DateAdapter.\n * @param obj The object to check\n * @returns Whether the object is a date instance.\n */\n abstract isDateInstance(obj: any): boolean;\n\n /**\n * Checks whether the given date is valid.\n * @param date The date to check.\n * @returns Whether the date is valid.\n */\n abstract isValid(date: D): boolean;\n\n /**\n * Gets date instance that is not valid.\n * @returns An invalid date.\n */\n abstract invalid(): D;\n\n /**\n * Given a potential date object, returns that same date object if it is\n * a valid date, or `null` if it's not a valid date.\n * @param obj The object to check.\n * @returns A date or `null`.\n */\n getValidDateOrNull(obj: unknown): D | null {\n return this.isDateInstance(obj) && this.isValid(obj as D) ? obj as D : null;\n }\n\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value: any): D | null {\n if (value == null || this.isDateInstance(value) && this.isValid(value)) {\n return value;\n }\n return this.invalid();\n }\n\n /**\n * Sets the locale used for all dates.\n * @param locale The new locale.\n */\n setLocale(locale: any) {\n this.locale = locale;\n this._localeChanges.next();\n }\n\n /**\n * Compares two dates.\n * @param first The first date to compare.\n * @param second The second date to compare.\n * @param unit Unit deep of the comparision.\n * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n * a number greater than 0 if the first date is later.\n */\n compareDate(first: D, second: D, unit: DateUnit = 'minute'): number {\n let d1 = this.getYear(first).toString();\n let d2 = this.getYear(second).toString();\n\n if (['y', 'year', 'years'].includes(unit)) {\n return Number(d1) - Number(d2);\n }\n\n d1 += this.getMonth(first).toString().padStart(2, '0');\n d2 += this.getMonth(second).toString().padStart(2, '0');\n\n if (['M', 'month', 'months'].includes(unit)) {\n return Number(d1) - Number(d2);\n }\n\n d1 += this.getDate(first).toString().padStart(2, '0');\n d2 += this.getDate(second).toString().padStart(2, '0');\n\n if (['d', 'day', 'days'].includes(unit)) {\n return Number(d1) - Number(d2);\n }\n\n d1 += this.getHours(first).toString().padStart(2, '0');\n d2 += this.getHours(second).toString().padStart(2, '0');\n\n if (['h', 'hour', 'hours'].indexOf(unit) >= 0) {\n return Number(d1) - Number(d2);\n }\n\n d1 += this.getMinutes(first).toString().padStart(2, '0');\n d2 += this.getMinutes(second).toString().padStart(2, '0');\n\n return Number(d1) - Number(d2);\n }\n\n /**\n * Checks if two dates are equal.\n * @param first The first date to check.\n * @param second The second date to check.\n * @returns Whether the two dates are equal.\n * Null dates are considered equal to other null dates.\n */\n sameDate(first: D | null, second: D | null, unit: DateUnit = 'minute'): boolean {\n if (first && second) {\n let firstValid = this.isValid(first);\n let secondValid = this.isValid(second);\n if (firstValid && secondValid) {\n return !this.compareDate(first, second, unit);\n }\n return firstValid == secondValid;\n }\n return first == second;\n }\n\n /**\n * Clamp the given date between min and max dates.\n * @param date The date to clamp.\n * @param min The minimum value to allow. If null or omitted no min is enforced.\n * @param max The maximum value to allow. If null or omitted no max is enforced.\n * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n * otherwise `date`.\n */\n clampDate(date: D, min?: D | null, max?: D | null, unit: DateUnit = 'minute'): D {\n if (min && this.compareDate(date, min, unit) < 0) {\n return min;\n }\n if (max && this.compareDate(date, max, unit) > 0) {\n return max;\n }\n return date;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Inject, Injectable, Optional, isDevMode} from '@angular/core';\nimport {MAT_DATE_LOCALE} from '@angular/material/core';\nimport {DateAdapter} from './date-adapter';\n\n// TODO(mmalerba): Remove when we no longer support safari 9.\n/** Whether the browser supports the Intl API. */\nlet SUPPORTS_INTL_API: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n SUPPORTS_INTL_API = typeof Intl != 'undefined';\n} catch {\n SUPPORTS_INTL_API = false;\n}\n\n/** The default month names to use if Intl API is not available. */\nconst DEFAULT_MONTH_NAMES = {\n 'long': [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ],\n 'short': ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n 'narrow': ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D']\n};\n\n\n/** The default date names to use if Intl API is not available. */\nconst DEFAULT_DATE_NAMES = range(31, i => String(i + 1));\n\n/** The default hour names to use if Intl API is not available. */\nconst DEFAULT_HOUR_NAMES = range(24, i => i === 0 ? '00' : String(i));\n\n/** The default minute names to use if Intl API is not available. */\nconst DEFAULT_MINUTE_NAMES = range(60, String);\n\n/** The default day of the week names to use if Intl API is not available. */\nconst DEFAULT_DAY_OF_WEEK_NAMES = {\n 'long': ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n 'short': ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n 'narrow': ['S', 'M', 'T', 'W', 'T', 'F', 'S']\n};\n\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings an with out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX =\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\n@Injectable()\nexport class NativeDateAdapter extends DateAdapter<Date> {\n /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors. */\n private readonly _clampDate: boolean;\n\n /**\n * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.\n * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off\n * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`\n * will produce `'8/13/1800'`.\n *\n * TODO(mmalerba): drop this variable. It's not being used in the code right now. We're now\n * getting the string representation of a Date object from its utc representation. We're keeping\n * it here for sometime, just for precaution, in case we decide to revert some of these changes\n * though.\n */\n useUtcForDisplay: boolean = true;\n\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: string, platform: Platform) {\n super();\n super.setLocale(matDateLocale);\n\n // IE does its own time zone correction, so we disable this on IE.\n this.useUtcForDisplay = !platform.TRIDENT;\n this._clampDate = platform.TRIDENT || platform.EDGE;\n }\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getHours(date: Date): number {\n return date.getHours();\n }\n\n setHours(date: Date, value: number): Date {\n const clone = this.clone(date);\n clone.setHours(value);\n return clone;\n }\n\n getMinutes(date: Date): number {\n return date.getMinutes();\n }\n\n setMinutes(date: Date, value: number): Date {\n const clone = this.clone(date);\n clone.setMinutes(value);\n return clone;\n }\n\n getSeconds(date: Date): number {\n return date.getSeconds();\n }\n\n setSeconds(date: Date, value: number, ms?: number): Date {\n const clone = this.clone(date);\n clone.setSeconds(value, ms);\n return clone;\n }\n\n getMilliseconds(date: Date): number {\n return date.getMilliseconds();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\n return range(12, i =>\n this._stripDirectionalityCharacters(this._format(dtf, new Date(2017, i, 1))));\n }\n return DEFAULT_MONTH_NAMES[style];\n }\n\n getDateNames(): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\n return range(31, i => this._stripDirectionalityCharacters(\n this._format(dtf, new Date(2017, 0, i + 1))));\n }\n return DEFAULT_DATE_NAMES;\n }\n\n getHourNames(): string[] {\n return DEFAULT_HOUR_NAMES;\n }\n\n getMinuteNames(): string[] {\n return DEFAULT_MINUTE_NAMES;\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\n return range(7, i => this._stripDirectionalityCharacters(\n this._format(dtf, new Date(2017, 0, i + 1))));\n }\n return DEFAULT_DAY_OF_WEEK_NAMES[style];\n }\n\n getYearName(date: Date): string {\n if (SUPPORTS_INTL_API) {\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\n return this._stripDirectionalityCharacters(this._format(dtf, date));\n }\n return String(this.getYear(date));\n }\n\n getFirstDayOfWeek(): number {\n // We can't tell using native JS Date what the first day of the week is, we default to Sunday.\n return 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return this.getDate(this._createDateWithOverflow(\n this.getYear(date), this.getMonth(date) + 1, 0));\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(\n year: number,\n month: number,\n date: number,\n hours: number = 0,\n minutes: number = 0,\n seconds: number = 0,\n ms: number = 0,\n ): Date {\n if (isDevMode()) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n let result = this._createDateWithOverflow(year, month, date, hours, minutes, seconds, ms);\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (isDevMode())) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any): Date | null {\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n // parameters.\n if (typeof value == 'number') {\n return new Date(value);\n }\n return value ? new Date(Date.parse(value)) : null;\n }\n\n format(date: Date, displayFormat: Object): string {\n if (!this.isValid(date)) {\n throw Error('NativeDateAdapter: Cannot format invalid date.');\n }\n\n if (SUPPORTS_INTL_API) {\n // On IE and Edge the i18n API will throw a hard error that can crash the entire app\n // if we attempt to format a date whose year is less than 1 or greater than 9999.\n if (this._clampDate && (date.getFullYear() < 1 || date.getFullYear() > 9999)) {\n date = this.clone(date);\n date.setFullYear(Math.max(1, Math.min(9999, date.getFullYear())));\n }\n\n displayFormat = {...displayFormat, timeZone: 'utc'};\n\n const dtf = new Intl.DateTimeFormat(this.locale, displayFormat);\n return this._stripDirectionalityCharacters(this._format(dtf, date));\n }\n return this._stripDirectionalityCharacters(date.toDateString());\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n this.getHours(date),\n this.getMinutes(date),\n this.getSeconds(date),\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) != ((this.getMonth(date) + months) % 12 + 12) % 12) {\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n this.getHours(date),\n this.getMinutes(date),\n this.getSeconds(date),\n );\n }\n\n addCalendarHours(date: Date, hours: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHours(date) + hours,\n this.getMinutes(date),\n this.getSeconds(date),\n );\n }\n\n addCalendarMinutes(date: Date, minutes: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHours(date),\n this.getMinutes(date) + minutes,\n this.getSeconds(date),\n );\n }\n\n addCalendarSeconds(date: Date, seconds: number, ms?: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date),\n this.getHours(date),\n this.getMinutes(date),\n this.getSeconds(date) + seconds,\n this.getMilliseconds(date) + ms,\n );\n }\n\n toIso8601(date: Date): string {\n return [\n date.getUTCFullYear(),\n this._2digit(date.getUTCMonth() + 1),\n this._2digit(date.getUTCDate())\n ].join('-');\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any) {\n return obj instanceof Date;\n }\n\n isValid(date: Date) {\n return !isNaN(date.getTime());\n }\n\n invalid(): Date {\n return new Date(NaN);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(\n year: number,\n month: number,\n date: number,\n hours: number = 0,\n minutes: number = 0,\n seconds: number = 0,\n ms: number = 0,\n ) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const d = new Date();\n d.setFullYear(year, month, date);\n d.setHours(hours, minutes, seconds, ms);\n return d;\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /**\n * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while\n * other browsers do not. We remove them to make output consistent and because they interfere with\n * date parsing.\n * @param str The string to strip direction characters from.\n * @returns The stripped string.\n */\n private _stripDirectionalityCharacters(str: string) {\n return str.replace(/[\\u200e\\u200f]/g, '');\n }\n\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n * @param dtf Intl.DateTimeFormat object, containg the desired string format. It must have\n * timeZone set to 'utc' to work fine.\n * @param date Date from which we want to get the string representation according to dtf\n * @returns A Date object with its UTC representation based on the passed in date info\n */\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatDateFormats} from './date-formats';\n\n\nexport const MAT_NATIVE_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: null,\n datetimeInput: null,\n timeInput: null,\n monthInput: null,\n yearInput: null,\n },\n display: {\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\n datetimeInput: {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric'\n },\n timeInput: {hour: 'numeric', minute: 'numeric'},\n monthInput: {month: 'short', year: 'numeric'},\n yearInput: {year: 'numeric'},\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\n monthLabel: {month: 'short'},\n monthDayLabel: {month: 'short', day: 'numeric'},\n monthDayA11yLabel: {month: 'long', day: 'numeric'},\n monthYearLabel: {year: 'numeric', month: 'short'},\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\n timeLabel: {hours: 'numeric', minutes: 'numeric'},\n }\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {DateAdapter as MaterialDateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\nimport {DateAdapter} from './date-adapter';\nimport {NativeDateAdapter} from './native-date-adapter';\nimport {MAT_NATIVE_DATE_FORMATS} from './native-date-formats';\n\nexport * from './date-adapter';\nexport * from './date-formats';\nexport * from './native-date-adapter';\nexport * from './native-date-formats';\n\n\n@NgModule({\n imports: [PlatformModule],\n providers: [\n {provide: DateAdapter, useClass: NativeDateAdapter},\n {provide: MaterialDateAdapter, useClass: NativeDateAdapter},\n ],\n})\nexport class NativeDateModule {}\n\n\n@NgModule({\n imports: [NativeDateModule],\n providers: [{provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS}],\n})\nexport class MatNativeDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["MaterialDateAdapter"],"mappings":";;;;;;;AAAA;;;;;;;AAiBA;MACsB,WAAW;IAAjC;QAGY,mBAAc,GAAG,IAAI,OAAO,EAAQ,CAAC;;QAGtC,kBAAa,GAAqB,IAAI,CAAC,cAAc,CAAC;KA6ThE;;;;;;;IA/GC,kBAAkB,CAAC,GAAY;QAC7B,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,IA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