import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import { DateFnsInputDate } from './types' ; import lastDayOfMonth from 'date-fns/lastDayOfMonth' ; @ Pipe ( { name : 'dfnsLastDayOfMonth' } ) export class LastDayOfMonthPipe implements PipeTransform { transform ( date ) { return lastDayOfMonth ( date ) ; } } @ NgModule ( { declarations : [ LastDayOfMonthPipe ] , exports : [ LastDayOfMonthPipe ] } ) export class LastDayOfMonthPipeModule { }