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