import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate } from './types' ; import isAfter from 'date-fns/isAfter' ; @ Pipe ( { name : 'dfnsIsAfter' } ) export class IsAfterPipe implements PipeTransform { transform ( date , dateToCompare ) { return isAfter ( date , dateToCompare ) ; } } @ NgModule ( { declarations : [ IsAfterPipe ] , exports : [ IsAfterPipe ] } ) export class IsAfterPipeModule { }