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