import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate } from './types' ; import differenceInBusinessDays from 'date-fns/differenceInBusinessDays' ; @ Pipe ( { name : 'dfnsDifferenceInBusinessDays' } ) export class DifferenceInBusinessDaysPipe implements PipeTransform { transform ( dateLeft , dateRight ) { return differenceInBusinessDays ( dateLeft , dateRight ) ; } } @ NgModule ( { declarations : [ DifferenceInBusinessDaysPipe ] , exports : [ DifferenceInBusinessDaysPipe ] } ) export class DifferenceInBusinessDaysPipeModule { }