@finnair/v-validation-luxon 3.1.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/luxon.d.ts +5 -0
- package/dist/luxon.js +15 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0](https://github.com/finnair/v-validation/compare/v3.2.0...v4.0.0) (2022-11-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @finnair/v-validation-luxon
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.2.0](https://github.com/finnair/v-validation/compare/v3.1.0...v3.2.0) (2022-10-25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* setZone method for date-time types ([#84](https://github.com/finnair/v-validation/issues/84)) ([2c01855](https://github.com/finnair/v-validation/commit/2c01855c1541ecd7ad7ea5f8174b2d757400bd15))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [3.1.0](https://github.com/finnair/v-validation/compare/v3.0.0...v3.1.0) (2022-10-24)
|
|
7
26
|
|
|
8
27
|
|
package/dist/luxon.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare class LocalTimeLuxon extends LuxonDateTime {
|
|
|
47
47
|
export declare class LocalDateTimeLuxon extends LuxonDateTime {
|
|
48
48
|
static readonly format = "yyyy-MM-dd'T'HH:mm:ss";
|
|
49
49
|
constructor(input: LuxonDateTimeInput);
|
|
50
|
+
setZone(zone: Zone): DateTimeLuxon;
|
|
50
51
|
static nowLocal(options?: DateTimeJSOptions): LocalDateTimeLuxon;
|
|
51
52
|
static nowUtc(): LocalDateTimeLuxon;
|
|
52
53
|
static fromISO(value: string, options?: DateTimeOptions): LocalDateTimeLuxon;
|
|
@@ -63,6 +64,7 @@ export declare class DateTimeLuxon extends LuxonDateTime {
|
|
|
63
64
|
static readonly format = "yyyy-MM-dd'T'HH:mm:ss";
|
|
64
65
|
static readonly formatTz: string;
|
|
65
66
|
constructor(input: LuxonDateTimeInput);
|
|
67
|
+
setZone(zone: Zone): DateTimeLuxon;
|
|
66
68
|
static now(options?: DateTimeJSOptions): DateTimeLuxon;
|
|
67
69
|
static fromISO(value: string, options?: DateTimeOptions): DateTimeLuxon;
|
|
68
70
|
static fromFormat(value: string, format: string, options?: DateTimeOptions): DateTimeLuxon;
|
|
@@ -76,6 +78,7 @@ export declare class DateTimeLuxon extends LuxonDateTime {
|
|
|
76
78
|
}
|
|
77
79
|
export declare class DateTimeUtcLuxon extends LuxonDateTime {
|
|
78
80
|
constructor(input: LuxonDateTimeInput);
|
|
81
|
+
setZone(zone: Zone): DateTimeLuxon;
|
|
79
82
|
static now(): DateTimeUtcLuxon;
|
|
80
83
|
static fromISO(value: string, options?: DateTimeOptions): DateTimeUtcLuxon;
|
|
81
84
|
static fromFormat(value: string, format: string, options?: DateTimeOptions): DateTimeUtcLuxon;
|
|
@@ -91,6 +94,7 @@ export declare class DateTimeMillisLuxon extends LuxonDateTime {
|
|
|
91
94
|
static readonly format = "yyyy-MM-dd'T'HH:mm:ss.SSS";
|
|
92
95
|
static readonly formatTz: string;
|
|
93
96
|
constructor(input: LuxonDateTimeInput);
|
|
97
|
+
setZone(zone: Zone): DateTimeMillisLuxon;
|
|
94
98
|
static now(options?: DateTimeJSOptions): DateTimeMillisLuxon;
|
|
95
99
|
static fromISO(value: string, options?: DateTimeOptions): DateTimeMillisLuxon;
|
|
96
100
|
static fromFormat(value: string, format: string, options?: DateTimeOptions): DateTimeMillisLuxon;
|
|
@@ -104,6 +108,7 @@ export declare class DateTimeMillisLuxon extends LuxonDateTime {
|
|
|
104
108
|
}
|
|
105
109
|
export declare class DateTimeMillisUtcLuxon extends LuxonDateTime {
|
|
106
110
|
constructor(input: LuxonDateTimeInput);
|
|
111
|
+
setZone(zone: Zone): DateTimeMillisLuxon;
|
|
107
112
|
static now(): DateTimeMillisUtcLuxon;
|
|
108
113
|
static fromISO(value: string, options?: DateTimeOptions): DateTimeMillisUtcLuxon;
|
|
109
114
|
static fromFormat(value: string, format: string, options?: DateTimeOptions): DateTimeMillisUtcLuxon;
|
package/dist/luxon.js
CHANGED
|
@@ -117,6 +117,9 @@ class LocalDateTimeLuxon extends LuxonDateTime {
|
|
|
117
117
|
constructor(input) {
|
|
118
118
|
super(input);
|
|
119
119
|
}
|
|
120
|
+
setZone(zone) {
|
|
121
|
+
return new DateTimeLuxon(this.dateTime.setZone(zone, { keepLocalTime: true }));
|
|
122
|
+
}
|
|
120
123
|
static nowLocal(options) {
|
|
121
124
|
return new LocalDateTimeLuxon(luxon_1.DateTime.local(options));
|
|
122
125
|
}
|
|
@@ -151,6 +154,9 @@ class DateTimeLuxon extends LuxonDateTime {
|
|
|
151
154
|
constructor(input) {
|
|
152
155
|
super(input);
|
|
153
156
|
}
|
|
157
|
+
setZone(zone) {
|
|
158
|
+
return new DateTimeLuxon(this.dateTime.setZone(zone, { keepLocalTime: false }));
|
|
159
|
+
}
|
|
154
160
|
static now(options) {
|
|
155
161
|
return new DateTimeLuxon(luxon_1.DateTime.local(options));
|
|
156
162
|
}
|
|
@@ -187,6 +193,9 @@ class DateTimeUtcLuxon extends LuxonDateTime {
|
|
|
187
193
|
constructor(input) {
|
|
188
194
|
super(input);
|
|
189
195
|
}
|
|
196
|
+
setZone(zone) {
|
|
197
|
+
return new DateTimeLuxon(this.dateTime.setZone(zone, { keepLocalTime: false }));
|
|
198
|
+
}
|
|
190
199
|
static now() {
|
|
191
200
|
return new DateTimeUtcLuxon(luxon_1.DateTime.utc());
|
|
192
201
|
}
|
|
@@ -217,6 +226,9 @@ class DateTimeMillisLuxon extends LuxonDateTime {
|
|
|
217
226
|
constructor(input) {
|
|
218
227
|
super(input);
|
|
219
228
|
}
|
|
229
|
+
setZone(zone) {
|
|
230
|
+
return new DateTimeMillisLuxon(this.dateTime.setZone(zone, { keepLocalTime: false }));
|
|
231
|
+
}
|
|
220
232
|
static now(options) {
|
|
221
233
|
return new DateTimeMillisLuxon(luxon_1.DateTime.local(options));
|
|
222
234
|
}
|
|
@@ -253,6 +265,9 @@ class DateTimeMillisUtcLuxon extends LuxonDateTime {
|
|
|
253
265
|
constructor(input) {
|
|
254
266
|
super(input);
|
|
255
267
|
}
|
|
268
|
+
setZone(zone) {
|
|
269
|
+
return new DateTimeMillisLuxon(this.dateTime.setZone(zone, { keepLocalTime: false }));
|
|
270
|
+
}
|
|
256
271
|
static now() {
|
|
257
272
|
return new DateTimeMillisUtcLuxon(luxon_1.DateTime.utc());
|
|
258
273
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finnair/v-validation-luxon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Luxon validators",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"build": "tsc -b ."
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@finnair/path": "^
|
|
29
|
-
"@finnair/v-validation": "^
|
|
28
|
+
"@finnair/path": "^4.0.0",
|
|
29
|
+
"@finnair/v-validation": "^4.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"luxon": "^3.0.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d6540b51c4f1c57563602f66bd3157637703529b"
|
|
35
35
|
}
|