import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { calculateLocale , DateFnsConfigurationService } from './date-fns-configuration.service' ; import { DateFnsInputDate , DateFnsWeekIndex } from './types' ; import isSameWeek from 'date-fns/isSameWeek' ; @ Pipe ( { name : 'dfnsIsSameWeekPure' } ) export class IsSameWeekPurePipe implements PipeTransform { constructor ( public config ) { } transform ( dateLeft , dateRight , options ? ) { return isSameWeek ( dateLeft , dateRight , calculateLocale ( options , this . config ) ) ; } } @ NgModule ( { declarations : [ IsSameWeekPurePipe ] , exports : [ IsSameWeekPurePipe ] } ) export class IsSameWeekPurePipeModule { }