You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
451 B
TypeScript
22 lines
451 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
|
|
/**
|
|
* Generated class for the JsonDatePipe pipe.
|
|
*
|
|
* See https://angular.io/api/core/Pipe for more info on Angular Pipes.
|
|
*/
|
|
@Pipe({
|
|
name: 'jsonDate',
|
|
})
|
|
export class JsonDatePipe implements PipeTransform {
|
|
/**
|
|
* Takes a value and makes it lowercase.
|
|
*/
|
|
transform(value: string): any {
|
|
if(value)
|
|
return new Date(parseInt(value.substr(6)));
|
|
else
|
|
return value;
|
|
}
|
|
}
|