formatDate
Formats a date according to locale rules.
API
function formatDate( value: string | number | Date, format: string, locale: string, timezone?: string | undefined, ): string;
@paramvalue
string | number | DateThe date to format, as a Date, or a number (milliseconds since UTC epoch) or an ISO date-time string.
@paramlocale
stringA locale code for the locale format rules to use.
@paramtimezone
string | undefinedThe time zone. A time zone offset from GMT (such as '+0430'). If not specified, uses host system settings.
@returns
stringThe formatted date string.
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