(
value: Date | string | number | null | undefined,
format?: string,
timezone?: string,
locale?: string,
)
| 261 | locale?: string, |
| 262 | ): string | null; |
| 263 | transform( |
| 264 | value: Date | string | number | null | undefined, |
| 265 | format?: string, |
| 266 | timezone?: string, |
| 267 | locale?: string, |
| 268 | ): string | null { |
| 269 | if (value == null || value === '' || value !== value) return null; |
| 270 | |
| 271 | try { |
| 272 | const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT; |
| 273 | const _timezone = |
| 274 | timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined; |
| 275 | return formatDate(value, _format, locale || this.locale, _timezone); |
| 276 | } catch (error) { |
| 277 | throw invalidPipeArgumentError(DatePipe, (error as Error).message); |
| 278 | } |
| 279 | } |
| 280 | } |
nothing calls this directly
no test coverage detected