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.
27 lines
499 B
TypeScript
27 lines
499 B
TypeScript
import { Pipe, PipeTransform } from '@angular/core';
|
|
import { CommonService } from '../../services/common/common.service';
|
|
import { DatePipe } from '@angular/common';
|
|
|
|
@Pipe({
|
|
name: 'date'
|
|
})
|
|
|
|
export class DatePipeTransform implements PipeTransform {
|
|
|
|
constructor(
|
|
public cs: CommonService
|
|
) {
|
|
|
|
}
|
|
transform(value: any, args?: any): any {
|
|
if (value) {
|
|
return this.cs.evaluteDate(value);
|
|
// return super.transform(value, 'dd/MMM/yyyy');
|
|
}
|
|
return null;
|
|
}
|
|
|
|
|
|
}
|
|
|