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