import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate } from './types' ; import subDays from 'date-fns/subDays' ; @ Pipe ( { name : 'dfnsSubDays' } ) export class SubDaysPipe implements PipeTransform { transform ( date , amount ) { return subDays ( date , amount ) ; } } @ NgModule ( { declarations : [ SubDaysPipe ] , exports : [ SubDaysPipe ] } ) export class SubDaysPipeModule { }