core/common/date.pipe.ts
Formats a date value according to locale rules. If no other format specified it defaults to medium
used as standard date/time format.
Extends Angular's DatePipe in a way so that date values exceeding the range supported by ECMAScript
are displayed as earliest/latest supported point in time printed in the desired format pre- or postfixed
by the word before
or after
, respectively.
In all other cases the pipe behaves as the standard DatePipe.
<span class="highlight">{{ deadline | c8yDate }}</span> <!-- e.g. 7 May 2020, 17:45:19 (en-GB) or 07.05.2020, 17:45:19 (de) -->
<span>{{ lastUpdated | c8yDate: 'a h:MM:ss' }}</span> <!-- e.g. pm 5:45:19 -->
<span>{{ 8640000000000000 + 1 | c8yDate }}</span> <!-- e.g. after 13 Sep 275760, 03:00:00 --> ```
Name | c8yDate |
transform | ||||||||||||||||||||
transform(value: any, format: string, timezone?: string, locale?: string)
|
||||||||||||||||||||
Parameters :
Returns :
any
|