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