@naturalcycles/js-lib 14.271.1 → 14.271.2
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IsoDate } from '../types';
|
|
1
2
|
import { DateTimeObject } from './localTime';
|
|
2
3
|
/**
|
|
3
4
|
* Representation of a "time on the wall clock",
|
|
@@ -25,7 +26,7 @@ export declare class WallTime implements DateTimeObject {
|
|
|
25
26
|
/**
|
|
26
27
|
* Returns e.g: `1984-06-21`, only the date part of DateTime
|
|
27
28
|
*/
|
|
28
|
-
toISODate():
|
|
29
|
+
toISODate(): IsoDate;
|
|
29
30
|
/**
|
|
30
31
|
* Returns e.g: `17:03:15` (or `17:03` with seconds=false)
|
|
31
32
|
*/
|
package/package.json
CHANGED
package/src/datetime/wallTime.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IsoDate } from '../types'
|
|
1
2
|
import { DateTimeObject } from './localTime'
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -33,12 +34,12 @@ export class WallTime implements DateTimeObject {
|
|
|
33
34
|
/**
|
|
34
35
|
* Returns e.g: `1984-06-21`, only the date part of DateTime
|
|
35
36
|
*/
|
|
36
|
-
toISODate():
|
|
37
|
+
toISODate(): IsoDate {
|
|
37
38
|
return [
|
|
38
39
|
String(this.year).padStart(4, '0'),
|
|
39
40
|
String(this.month).padStart(2, '0'),
|
|
40
41
|
String(this.day).padStart(2, '0'),
|
|
41
|
-
].join('-')
|
|
42
|
+
].join('-') as IsoDate
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|