13 lines
300 B
TypeScript
13 lines
300 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
import * as dayjs from 'dayjs';
|
|
|
|
@Pipe({
|
|
name: 'formatMediumDate',
|
|
})
|
|
export class FormatMediumDatePipe implements PipeTransform {
|
|
transform(day: dayjs.Dayjs | null | undefined): string {
|
|
return day ? day.format('D MMM YYYY') : '';
|
|
}
|
|
}
|