From e8ff289a9a063980b9e7921a97cedc86f98c3a1b Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 18 Jun 2019 11:58:36 +0200 Subject: [PATCH] fix(core): update --- ts/smarttime.classes.extendeddate.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/smarttime.classes.extendeddate.ts b/ts/smarttime.classes.extendeddate.ts index 556291b..ba765f7 100644 --- a/ts/smarttime.classes.extendeddate.ts +++ b/ts/smarttime.classes.extendeddate.ts @@ -3,6 +3,10 @@ import * as plugins from './smarttime.plugins'; export type TAvailableZone = 'Europe/Berlin'; export class ExtendedDate extends Date { + public static fromMillis(milliSeconds: number) { + return new ExtendedDate(milliSeconds); + } + public static fromEuropeanDate(europeanDate: string) { const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDate); const luxonDate = plugins.luxon.DateTime.utc( @@ -17,7 +21,7 @@ export class ExtendedDate extends Date { /** */ public static fromEuropeanDateAndTime( europeanDateArg: string, - timeArg: string = '12:00', + timeArg: string = '12:00:00', zoneArg: TAvailableZone = 'Europe/Berlin' ) { const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDateArg);