ngx-moment icon indicating copy to clipboard operation
ngx-moment copied to clipboard

Check value emptiness in LocalTimePipe

Open nealyip opened this issue 5 years ago • 1 comments

just like the way DateFormatPipe does,

if (!value) { return ‘’; }

nealyip avatar Sep 25 '19 11:09 nealyip

Since amLocal currently always returns a Moment object, I'm not it should return '' if given an empty value.

Is the problem that https://github.com/urish/ngx-moment#amlocal-pipe returns 'Invalid date' when given an empty input? Maybe instead, amDateFormat should return '' if given an invalid Moment object

camillef avatar Oct 07 '19 18:10 camillef