MCPcopy Index your code
hub / github.com/angular/angular / assertValidDateFormatLength

Function assertValidDateFormatLength

packages/common/src/i18n/format_date.ts:137–145  ·  view source on GitHub ↗
(format: string)

Source from the content-addressed store, hash-verified

135}
136
137function assertValidDateFormatLength(format: string) {
138 if (format.length > MAX_DATE_FORMAT_LENGTH) {
139 throw new RuntimeError(
140 RuntimeErrorCode.SUSPICIOUS_DATE_FORMAT,
141 ngDevMode &&
142 `Date format is too long. Exceeded maximum length of ${MAX_DATE_FORMAT_LENGTH} characters.`,
143 );
144 }
145}
146
147/**
148 * Asserts that the given date format is free from common mistakes. Throws an

Callers 1

formatDateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…