import { Injectable } from '@angular/core' ; import * as moment from 'moment' ; import { Moment } from 'moment' ; @ Injectable ( ) export class DateFormatter { public getFormattedDate ( millisecondsSinceEpoch ) { const m = moment ( millisecondsSinceEpoch ) ; return m . format ( 'dddd, MMMM D, YYYY' ) ; } }