@finnair/v-validation-luxon
Advanced tools
Comparing version 1.1.0-alpha.2 to 1.1.0-alpha.3
@@ -6,2 +6,10 @@ # Change Log | ||
# [1.1.0-alpha.3](https://github.com/finnair/v-validation/compare/v1.1.0-alpha.2...v1.1.0-alpha.3) (2022-08-15) | ||
**Note:** Version bump only for package @finnair/v-validation-luxon | ||
# [1.1.0-alpha.2](https://github.com/finnair/v-validation/compare/v1.1.0-alpha.1...v1.1.0-alpha.2) (2022-08-12) | ||
@@ -8,0 +16,0 @@ |
@@ -16,3 +16,5 @@ import { DateTime } from 'luxon'; | ||
constructor(input: LuxonDateTimeInput); | ||
static fromISO(value: string): DateLuxon; | ||
static fromISO(value: string, options?: Object): DateLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateLuxon; | ||
protected normalize(dateTime: DateTime): DateTime; | ||
@@ -24,3 +26,5 @@ wrap(fn: (dateTime: DateTime) => DateTime): DateLuxon; | ||
constructor(input: LuxonDateTimeInput); | ||
static fromISO(value: string): DateUtcLuxon; | ||
static fromISO(value: string, options?: Object): DateUtcLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateUtcLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateUtcLuxon; | ||
protected normalize(dateTime: DateTime): DateTime; | ||
@@ -34,3 +38,5 @@ wrap(fn: (dateTime: DateTime) => DateTime): DateUtcLuxon; | ||
constructor(input: LuxonDateTimeInput); | ||
static fromISO(value: string): DateTimeLuxon; | ||
static fromISO(value: string, options?: Object): DateTimeLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateTimeLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateTimeLuxon; | ||
wrap(fn: (dateTime: DateTime) => DateTime): DateTimeLuxon; | ||
@@ -42,2 +48,4 @@ toJSON(): string; | ||
static fromISO(value: string): DateTimeUtcLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateTimeUtcLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateTimeUtcLuxon; | ||
protected normalize(dateTime: DateTime): DateTime; | ||
@@ -52,2 +60,4 @@ wrap(fn: (dateTime: DateTime) => DateTime): DateTimeUtcLuxon; | ||
static fromISO(value: string): DateTimeMillisLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateTimeMillisLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateTimeMillisLuxon; | ||
wrap(fn: (dateTime: DateTime) => DateTime): DateTimeMillisLuxon; | ||
@@ -58,3 +68,5 @@ toJSON(): string; | ||
constructor(input: LuxonDateTimeInput); | ||
static fromISO(value: string): DateTimeMillisUtcLuxon; | ||
static fromISO(value: string, options?: Object): DateTimeMillisUtcLuxon; | ||
static fromJSDate(date: Date, options?: Object): DateTimeMillisUtcLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): DateTimeMillisUtcLuxon; | ||
protected normalize(dateTime: DateTime): DateTime; | ||
@@ -67,5 +79,7 @@ wrap(fn: (dateTime: DateTime) => DateTime): DateTimeMillisUtcLuxon; | ||
constructor(input: LuxonDateTimeInput); | ||
static fromISO(value: string): TimeLuxon; | ||
static fromISO(value: string, options?: Object): TimeLuxon; | ||
static fromJSDate(date: Date, options?: Object): TimeLuxon; | ||
static fromMillis(milliseconds: number, options?: Object): TimeLuxon; | ||
wrap(fn: (dateTime: DateTime) => DateTime): TimeLuxon; | ||
toJSON(): string; | ||
} |
@@ -39,5 +39,11 @@ "use strict"; | ||
} | ||
static fromISO(value) { | ||
return new DateLuxon(luxon_1.DateTime.fromISO(value)); | ||
static fromISO(value, options) { | ||
return new DateLuxon(luxon_1.DateTime.fromISO(value, options)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
normalize(dateTime) { | ||
@@ -59,5 +65,11 @@ return dateTime.startOf('day'); | ||
} | ||
static fromISO(value) { | ||
return new DateUtcLuxon(luxon_1.DateTime.fromISO(value)); | ||
static fromISO(value, options) { | ||
return new DateUtcLuxon(luxon_1.DateTime.fromISO(value, options)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateUtcLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateUtcLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
normalize(dateTime) { | ||
@@ -78,5 +90,11 @@ return luxon_1.DateTime.utc(dateTime.year, dateTime.month, dateTime.day, 0, 0, 0); | ||
} | ||
static fromISO(value) { | ||
return new DateTimeLuxon(luxon_1.DateTime.fromISO(value)); | ||
static fromISO(value, options) { | ||
return new DateTimeLuxon(luxon_1.DateTime.fromISO(value, options)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateTimeLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateTimeLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
wrap(fn) { | ||
@@ -103,2 +121,8 @@ return new DateTimeLuxon(fn(this.dateTime)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateTimeUtcLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateTimeUtcLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
normalize(dateTime) { | ||
@@ -122,2 +146,8 @@ return dateTime.toUTC(); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateTimeMillisLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateTimeMillisLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
wrap(fn) { | ||
@@ -141,5 +171,11 @@ return new DateTimeMillisLuxon(fn(this.dateTime)); | ||
} | ||
static fromISO(value) { | ||
return new DateTimeMillisUtcLuxon(luxon_1.DateTime.fromISO(value)); | ||
static fromISO(value, options) { | ||
return new DateTimeMillisUtcLuxon(luxon_1.DateTime.fromISO(value, options)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new DateTimeMillisUtcLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new DateTimeMillisUtcLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
normalize(dateTime) { | ||
@@ -160,5 +196,11 @@ return dateTime.toUTC(); | ||
} | ||
static fromISO(value) { | ||
return new TimeLuxon(luxon_1.DateTime.fromISO(value)); | ||
static fromISO(value, options) { | ||
return new TimeLuxon(luxon_1.DateTime.fromISO(value, options)); | ||
} | ||
static fromJSDate(date, options) { | ||
return new TimeLuxon(luxon_1.DateTime.fromJSDate(date, options)); | ||
} | ||
static fromMillis(milliseconds, options) { | ||
return new TimeLuxon(luxon_1.DateTime.fromMillis(milliseconds, options)); | ||
} | ||
wrap(fn) { | ||
@@ -165,0 +207,0 @@ return new TimeLuxon(fn(this.dateTime)); |
{ | ||
"name": "@finnair/v-validation-luxon", | ||
"version": "1.1.0-alpha.2", | ||
"version": "1.1.0-alpha.3", | ||
"private": false, | ||
@@ -35,3 +35,3 @@ "description": "Luxon validators", | ||
}, | ||
"gitHead": "731e1d36f0d34f911edb74d3cfa3e726f55057a3" | ||
"gitHead": "43c45eb094c963918a9dee423abde9090632a595" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23875
490