Create a pipe version of FormatService.transform() function so strings
may be generated from fields directly in templates.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
case 'timestamp':
const date = new Date(value);
+ if (Number.isNaN(date.getTime())) {
+ console.error('Invalid date in format service', value);
+ return '';
+ }
let fmt = this.dateFormat || 'shortDate';
if (params.datePlusTime) {
fmt = this.dateTimeFormat || 'short';