fix(core): update

This commit is contained in:
Philipp Kunz 2019-06-18 11:58:36 +02:00
parent a5deb25bfb
commit e8ff289a9a

View File

@ -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);