• 개요
@angular/common

formatDate

함수
안정화

Formats a date according to locale rules.

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.

설명

Formats a date according to locale rules.

다음 모듈에서 내보냄

상세 내용으로 이동