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