argos/dmp-frontend/src/app/core/pipes/timezone-info-display.pipe.ts

13 lines
337 B
TypeScript
Raw Normal View History

2018-08-30 13:09:36 +02:00
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
import 'moment-timezone';
@Pipe({ name: 'timezoneInfoDisplay' })
export class TimezoneInfoDisplayPipe implements PipeTransform {
2018-10-05 17:00:54 +02:00
constructor() { }
2018-08-30 13:09:36 +02:00
2018-10-05 17:00:54 +02:00
public transform(value): any {
2019-01-18 18:03:45 +01:00
return value + ' (GMT' + moment.tz(value).format('Z') + ')';
2018-10-05 17:00:54 +02:00
}
2018-08-30 13:09:36 +02:00
}