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