fix(core): update
This commit is contained in:
parent
a5deb25bfb
commit
e8ff289a9a
@ -3,6 +3,10 @@ import * as plugins from './smarttime.plugins';
|
|||||||
export type TAvailableZone = 'Europe/Berlin';
|
export type TAvailableZone = 'Europe/Berlin';
|
||||||
|
|
||||||
export class ExtendedDate extends Date {
|
export class ExtendedDate extends Date {
|
||||||
|
public static fromMillis(milliSeconds: number) {
|
||||||
|
return new ExtendedDate(milliSeconds);
|
||||||
|
}
|
||||||
|
|
||||||
public static fromEuropeanDate(europeanDate: string) {
|
public static fromEuropeanDate(europeanDate: string) {
|
||||||
const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDate);
|
const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDate);
|
||||||
const luxonDate = plugins.luxon.DateTime.utc(
|
const luxonDate = plugins.luxon.DateTime.utc(
|
||||||
@ -17,7 +21,7 @@ export class ExtendedDate extends Date {
|
|||||||
/** */
|
/** */
|
||||||
public static fromEuropeanDateAndTime(
|
public static fromEuropeanDateAndTime(
|
||||||
europeanDateArg: string,
|
europeanDateArg: string,
|
||||||
timeArg: string = '12:00',
|
timeArg: string = '12:00:00',
|
||||||
zoneArg: TAvailableZone = 'Europe/Berlin'
|
zoneArg: TAvailableZone = 'Europe/Berlin'
|
||||||
) {
|
) {
|
||||||
const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDateArg);
|
const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDateArg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user