src/app/shared/_pipes/unix-date.pipe.ts
Name | unixDate |
transform | |||||||||
transform(timestamp: number, ...args: [])
|
|||||||||
Defined in src/app/shared/_pipes/unix-date.pipe.ts:7
|
|||||||||
Parameters :
Returns :
any
|
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'unixDate',
})
export class UnixDatePipe implements PipeTransform {
transform(timestamp: number, ...args: unknown[]): any {
return new Date(timestamp * 1000).toLocaleDateString('en-GB');
}
}