Spec-Zone.ru › Angular

formatDate

Formats a date according to locale rules.

DatePipeInternationalization (i18n) Guide

API

function formatDate(
  value: string | number | Date,
  format: string,
  locale: string,
  timezone?: string | undefined,
): string;
@paramvaluestring | number | Date

The date to format, as a Date, or a number (milliseconds since UTC epoch) or an ISO date-time string.

@paramformatstring

The date-time components to include. See DatePipe for details.

@paramlocalestring

A locale code for the locale format rules to use.

@paramtimezonestring | undefined

The time zone. A time zone offset from GMT (such as '+0430'). If not specified, uses host system settings.

@returnsstring

The formatted date string.

Description

Formats a date according to locale rules.


Exported by

  • CommonModule

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/common/formatDate

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API