Compare commits

..

4 Commits

Author SHA1 Message Date
388649659c 3.0.10 2019-06-18 11:58:36 +02:00
e8ff289a9a fix(core): update 2019-06-18 11:58:36 +02:00
a5deb25bfb 3.0.9 2019-06-17 17:19:55 +02:00
ce2d1b278b fix(core): update 2019-06-17 17:19:54 +02:00
3 changed files with 8 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smarttime",
"version": "3.0.8",
"version": "3.0.10",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "@pushrocks/smarttime",
"private": false,
"version": "3.0.8",
"version": "3.0.10",
"description": "handle time in smart ways",
"main": "dist/index.js",
"typings": "dist/index.d.ts",

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,8 +21,8 @@ export class ExtendedDate extends Date {
/** */
public static fromEuropeanDateAndTime(
europeanDateArg: string,
timeArg: string,
zoneArg: TAvailableZone
timeArg: string = '12:00:00',
zoneArg: TAvailableZone = 'Europe/Berlin'
) {
const dateArray = /(.*)\.(.*)\.(.*)/.exec(europeanDateArg);
const sliceDate = (dateString: string) => {