UNPKG

@progress/kendo-angular-intl

Version:

Kendo UI Internationalization for Angular components

42 lines (41 loc) 1.71 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { PipeTransform } from '@angular/core'; import { IntlService } from './intl.service'; import { DateFormatOptions } from '@progress/kendo-intl'; import * as i0 from "@angular/core"; /** * Formats a date value to a string based on the requested format. * This pipe uses the [IntlService]({% slug api_intl_intlservice %}). * * @example * ```html * <ul> * <li>{{date | kendoDate }}</li> * <li>{{milliseconds | kendoDate: 'M/dd/yyy' }}</li> * <li>{{stringDate | kendoDate: 'G' }}</li> * </ul> * ``` */ export declare class DatePipe implements PipeTransform { private intlService; /** * @hidden */ constructor(intlService: IntlService); /** * Converts a `Date` object into a string based on the specified format. * If no format is provided, the default short date format is used. * * @param value - The date to format. * @param format - The format string or options (optional). * @param localeId - The ID of the locale which will be used instead of the default one (optional). * @returns The formatted date as a string. */ transform(value: any, format?: string | DateFormatOptions, localeId?: string): any; private normalize; static ɵfac: i0.ɵɵFactoryDeclaration<DatePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<DatePipe, "kendoDate", true>; }