import { NgModule , Pipe , PipeTransform } from '@angular/core' ; import parseISO from 'date-fns/parseISO' ; @ Pipe ( { name : 'dfnsParseIso' } ) export class ParseIsoPipe implements PipeTransform { transform ( dateString , options ? ) { return parseISO ( dateString , options ) ; } } @ NgModule ( { declarations : [ ParseIsoPipe ] , exports : [ ParseIsoPipe ] } ) export class ParseIsoPipeModule { }