Merge pull request #22128 from alanblins/momenttimezoneguess

Update types for moment-timezone
This commit is contained in:
Arthur Ozga
2017-12-22 18:27:06 -08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
// Type definitions for moment-timezone.js 0.5
// Project: http://momentjs.com/timezone/
// Definitions by: Michel Salib <https://github.com/michelsalib>
// Definitions by: Michel Salib <https://github.com/michelsalib>, Alan Brazil Lins <https://github.com/alanblins>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as moment from 'moment';
@@ -51,7 +51,7 @@ declare module "moment" {
}): void;
names(): string[];
guess(): string;
guess(ignoreCache?: boolean): string;
setDefault(timezone: string): void;
}
@@ -78,6 +78,8 @@ moment.tz.setDefault('America/Los_Angeles');
moment.tz.guess();
moment.tz.guess(true);
const zoneAbbr: string = moment.tz('America/Los_Angeles').zoneAbbr();
const zoneName: string = moment.tz('America/Los_Angeles').zoneName();