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