argos/dmp-frontend/src/app/utilities/culture/pipes/TimezoneInfoDisplayPipe.ts

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