From b5509711e74c8030694886b7aa5906f375440379 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 18 Jun 2019 14:45:07 +0200 Subject: [PATCH] fix(core): update --- ts/smarttime.classes.extendeddate.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ts/smarttime.classes.extendeddate.ts b/ts/smarttime.classes.extendeddate.ts index d5176d9..6e7f1ad 100644 --- a/ts/smarttime.classes.extendeddate.ts +++ b/ts/smarttime.classes.extendeddate.ts @@ -20,6 +20,10 @@ export class ExtendedDate extends Date { return new ExtendedDate(milliSeconds); } + public static fromDate(dateArg: Date) { + return new ExtendedDate(dateArg.getTime()); + } + public static fromEuropeanDate(europeanDate: string) { const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDate); const luxonDate = plugins.luxon.DateTime.utc( @@ -68,6 +72,9 @@ export class ExtendedDate extends Date { } // INSTANCE + public timezone: TAvailableZone; + + constructor(unixMilli: number) { super(unixMilli); }