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