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