import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate , DateFnsWeekIndex } from './types' ; import endOfWeek from 'date-fns/endOfWeek' ; @ Pipe ( { name : 'dfnsEndOfWeek' } ) export class EndOfWeekPipe implements PipeTransform { transform ( date , options ? ) { return endOfWeek ( date , options ) ; } } @ NgModule ( { declarations : [ EndOfWeekPipe ] , exports : [ EndOfWeekPipe ] } ) export class EndOfWeekPipeModule { }