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 {
|
|
|
|
return value + ' (GMT' + moment['tz'](value).format('Z') + ')';
|
|
|
|
}
|
2018-08-30 13:09:36 +02:00
|
|
|
}
|