@naturalcycles/js-lib 14.99.4 → 14.100.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.
|
@@ -31,6 +31,10 @@ export declare class LocalTime {
|
|
|
31
31
|
* Input can already be a LocalDate - it is returned as-is in that case.
|
|
32
32
|
*/
|
|
33
33
|
static of(d: LocalTimeConfig): LocalTime;
|
|
34
|
+
/**
|
|
35
|
+
* Create LocalTime from unixTimestamp in milliseconds (not in seconds).
|
|
36
|
+
*/
|
|
37
|
+
static ofMillis(millis: number): LocalTime;
|
|
34
38
|
/**
|
|
35
39
|
* Returns null if invalid
|
|
36
40
|
*/
|
|
@@ -36,6 +36,12 @@ export class LocalTime {
|
|
|
36
36
|
}
|
|
37
37
|
return t;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Create LocalTime from unixTimestamp in milliseconds (not in seconds).
|
|
41
|
+
*/
|
|
42
|
+
static ofMillis(millis) {
|
|
43
|
+
return LocalTime.of(new Date(millis));
|
|
44
|
+
}
|
|
39
45
|
/**
|
|
40
46
|
* Returns null if invalid
|
|
41
47
|
*/
|
package/package.json
CHANGED
|
@@ -56,6 +56,13 @@ export class LocalTime {
|
|
|
56
56
|
return t
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Create LocalTime from unixTimestamp in milliseconds (not in seconds).
|
|
61
|
+
*/
|
|
62
|
+
static ofMillis(millis: number): LocalTime {
|
|
63
|
+
return LocalTime.of(new Date(millis))
|
|
64
|
+
}
|
|
65
|
+
|
|
59
66
|
/**
|
|
60
67
|
* Returns null if invalid
|
|
61
68
|
*/
|