Skip to content

Commit

Permalink
docs(common): revert format date_pipe (#51359)
Browse files Browse the repository at this point in the history
PR Close #51359
  • Loading branch information
luishcastroc authored and pkozlowski-opensource committed Aug 15, 2023
1 parent d8e5316 commit 03619ad
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions packages/common/src/pipes/date_pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ export const DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken<string>('DATE_PIPE_
* ]
* ```
*/
export const DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken<DatePipeConfig>(
'DATE_PIPE_DEFAULT_OPTIONS',
);
export const DATE_PIPE_DEFAULT_OPTIONS =
new InjectionToken<DatePipeConfig>('DATE_PIPE_DEFAULT_OPTIONS');

// clang-format off
/**
Expand Down Expand Up @@ -247,25 +246,15 @@ export class DatePipe implements PipeTransform {
*
* @returns A date string in the desired format.
*/
transform(
value: Date|string|number,
format?: string,
timezone?: string,
locale?: string,
): string|null;
transform(value: Date|string|number, format?: string, timezone?: string, locale?: string): string
|null;
transform(value: null|undefined, format?: string, timezone?: string, locale?: string): null;
transform(
value: Date|string|number|null|undefined,
format?: string,
timezone?: string,
locale?: string,
): string|null;
value: Date|string|number|null|undefined, format?: string, timezone?: string,
locale?: string): string|null;
transform(
value: Date|string|number|null|undefined,
format?: string,
timezone?: string,
locale?: string,
): string|null {
value: Date|string|number|null|undefined, format?: string, timezone?: string,
locale?: string): string|null {
if (value == null || value === '' || value !== value) return null;

try {
Expand Down

0 comments on commit 03619ad

Please sign in to comment.