@finnair/v-validation-luxon 1.1.0-alpha.3 → 1.1.0-alpha.4

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 CHANGED
@@ -3,6 +3,14 @@
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
+ # [1.1.0-alpha.4](https://github.com/finnair/v-validation/compare/v1.1.0-alpha.3...v1.1.0-alpha.4) (2022-08-15)
7
+
8
+ **Note:** Version bump only for package @finnair/v-validation-luxon
9
+
10
+
11
+
12
+
13
+
6
14
  # [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)
7
15
 
8
16
  **Note:** Version bump only for package @finnair/v-validation-luxon
package/dist/luxon.d.ts CHANGED
@@ -13,6 +13,7 @@ export declare abstract class LuxonDateTime {
13
13
  export declare class DateLuxon extends LuxonDateTime {
14
14
  static readonly format = "yyyy-MM-dd";
15
15
  constructor(input: LuxonDateTimeInput);
16
+ static now(): DateLuxon;
16
17
  static fromISO(value: string, options?: Object): DateLuxon;
17
18
  static fromJSDate(date: Date, options?: Object): DateLuxon;
18
19
  static fromMillis(milliseconds: number, options?: Object): DateLuxon;
@@ -22,6 +23,7 @@ export declare class DateLuxon extends LuxonDateTime {
22
23
  }
23
24
  export declare class DateUtcLuxon extends LuxonDateTime {
24
25
  constructor(input: LuxonDateTimeInput);
26
+ static now(): DateUtcLuxon;
25
27
  static fromISO(value: string, options?: Object): DateUtcLuxon;
26
28
  static fromJSDate(date: Date, options?: Object): DateUtcLuxon;
27
29
  static fromMillis(milliseconds: number, options?: Object): DateUtcLuxon;
@@ -33,6 +35,7 @@ export declare class DateTimeLuxon extends LuxonDateTime {
33
35
  static readonly format = "yyyy-MM-dd'T'HH:mm:ss";
34
36
  static readonly formatTz: string;
35
37
  constructor(input: LuxonDateTimeInput);
38
+ static now(): DateTimeLuxon;
36
39
  static fromISO(value: string, options?: Object): DateTimeLuxon;
37
40
  static fromJSDate(date: Date, options?: Object): DateTimeLuxon;
38
41
  static fromMillis(milliseconds: number, options?: Object): DateTimeLuxon;
@@ -41,6 +44,7 @@ export declare class DateTimeLuxon extends LuxonDateTime {
41
44
  }
42
45
  export declare class DateTimeUtcLuxon extends LuxonDateTime {
43
46
  constructor(input: LuxonDateTimeInput);
47
+ static now(): DateTimeUtcLuxon;
44
48
  static fromISO(value: string): DateTimeUtcLuxon;
45
49
  static fromJSDate(date: Date, options?: Object): DateTimeUtcLuxon;
46
50
  static fromMillis(milliseconds: number, options?: Object): DateTimeUtcLuxon;
@@ -52,6 +56,7 @@ export declare class DateTimeMillisLuxon extends LuxonDateTime {
52
56
  static readonly format = "yyyy-MM-dd'T'HH:mm:ss.SSS";
53
57
  static readonly formatTz: string;
54
58
  constructor(input: LuxonDateTimeInput);
59
+ static now(): DateTimeMillisLuxon;
55
60
  static fromISO(value: string): DateTimeMillisLuxon;
56
61
  static fromJSDate(date: Date, options?: Object): DateTimeMillisLuxon;
57
62
  static fromMillis(milliseconds: number, options?: Object): DateTimeMillisLuxon;
@@ -60,6 +65,7 @@ export declare class DateTimeMillisLuxon extends LuxonDateTime {
60
65
  }
61
66
  export declare class DateTimeMillisUtcLuxon extends LuxonDateTime {
62
67
  constructor(input: LuxonDateTimeInput);
68
+ static now(): DateTimeMillisUtcLuxon;
63
69
  static fromISO(value: string, options?: Object): DateTimeMillisUtcLuxon;
64
70
  static fromJSDate(date: Date, options?: Object): DateTimeMillisUtcLuxon;
65
71
  static fromMillis(milliseconds: number, options?: Object): DateTimeMillisUtcLuxon;
@@ -70,6 +76,7 @@ export declare class DateTimeMillisUtcLuxon extends LuxonDateTime {
70
76
  export declare class TimeLuxon extends LuxonDateTime {
71
77
  static readonly format = "HH:mm:ss";
72
78
  constructor(input: LuxonDateTimeInput);
79
+ static now(): TimeLuxon;
73
80
  static fromISO(value: string, options?: Object): TimeLuxon;
74
81
  static fromJSDate(date: Date, options?: Object): TimeLuxon;
75
82
  static fromMillis(milliseconds: number, options?: Object): TimeLuxon;
package/dist/luxon.js CHANGED
@@ -36,6 +36,9 @@ class DateLuxon extends LuxonDateTime {
36
36
  constructor(input) {
37
37
  super(input);
38
38
  }
39
+ static now() {
40
+ return new DateLuxon(luxon_1.DateTime.now());
41
+ }
39
42
  static fromISO(value, options) {
40
43
  return new DateLuxon(luxon_1.DateTime.fromISO(value, options));
41
44
  }
@@ -61,6 +64,9 @@ class DateUtcLuxon extends LuxonDateTime {
61
64
  constructor(input) {
62
65
  super(input);
63
66
  }
67
+ static now() {
68
+ return new DateUtcLuxon(luxon_1.DateTime.now());
69
+ }
64
70
  static fromISO(value, options) {
65
71
  return new DateUtcLuxon(luxon_1.DateTime.fromISO(value, options));
66
72
  }
@@ -85,6 +91,9 @@ class DateTimeLuxon extends LuxonDateTime {
85
91
  constructor(input) {
86
92
  super(input);
87
93
  }
94
+ static now() {
95
+ return new DateTimeLuxon(luxon_1.DateTime.now());
96
+ }
88
97
  static fromISO(value, options) {
89
98
  return new DateTimeLuxon(luxon_1.DateTime.fromISO(value, options));
90
99
  }
@@ -112,6 +121,9 @@ class DateTimeUtcLuxon extends LuxonDateTime {
112
121
  constructor(input) {
113
122
  super(input);
114
123
  }
124
+ static now() {
125
+ return new DateTimeUtcLuxon(luxon_1.DateTime.now());
126
+ }
115
127
  static fromISO(value) {
116
128
  return new DateTimeUtcLuxon(luxon_1.DateTime.fromISO(value));
117
129
  }
@@ -136,6 +148,9 @@ class DateTimeMillisLuxon extends LuxonDateTime {
136
148
  constructor(input) {
137
149
  super(input);
138
150
  }
151
+ static now() {
152
+ return new DateTimeMillisLuxon(luxon_1.DateTime.now());
153
+ }
139
154
  static fromISO(value) {
140
155
  return new DateTimeMillisLuxon(luxon_1.DateTime.fromISO(value));
141
156
  }
@@ -163,6 +178,9 @@ class DateTimeMillisUtcLuxon extends LuxonDateTime {
163
178
  constructor(input) {
164
179
  super(input);
165
180
  }
181
+ static now() {
182
+ return new DateTimeMillisUtcLuxon(luxon_1.DateTime.now());
183
+ }
166
184
  static fromISO(value, options) {
167
185
  return new DateTimeMillisUtcLuxon(luxon_1.DateTime.fromISO(value, options));
168
186
  }
@@ -187,6 +205,9 @@ class TimeLuxon extends LuxonDateTime {
187
205
  constructor(input) {
188
206
  super(input);
189
207
  }
208
+ static now() {
209
+ return new TimeLuxon(luxon_1.DateTime.now());
210
+ }
190
211
  static fromISO(value, options) {
191
212
  return new TimeLuxon(luxon_1.DateTime.fromISO(value, options));
192
213
  }
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const luxon_1 = require("luxon");
4
- console.log(luxon_1.Duration.fromISO('P3Y6M1W4DT12H30M5S').toJSON());
4
+ console.log(luxon_1.DateTime.now().toFormat('yyyy-MM-dd HH:mm:ss ZZZ'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finnair/v-validation-luxon",
3
- "version": "1.1.0-alpha.3",
3
+ "version": "1.1.0-alpha.4",
4
4
  "private": false,
5
5
  "description": "Luxon validators",
6
6
  "main": "dist/index.js",
@@ -32,5 +32,5 @@
32
32
  "devDependencies": {
33
33
  "@types/luxon": "3.0.0"
34
34
  },
35
- "gitHead": "43c45eb094c963918a9dee423abde9090632a595"
35
+ "gitHead": "d2478122e33d247af89e16c84e8093b5f9bee294"
36
36
  }