MCPcopy Create free account
hub / github.com/angular/angular / formatDateTime

Function formatDateTime

packages/common/src/i18n/format_date.ts:276–283  ·  view source on GitHub ↗
(str: string, opt_values: string[])

Source from the content-addressed store, hash-verified

274}
275
276function formatDateTime(str: string, opt_values: string[]) {
277 if (opt_values) {
278 str = str.replace(/\{([^}]+)}/g, function (match, key) {
279 return Object.hasOwn(opt_values, key) ? opt_values[key] : match;
280 });
281 }
282 return str;
283}
284
285function padNumber(
286 num: number,

Callers 1

getNamedFormatFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected