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