esday 0.0.2 → 0.0.3
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/index-BTR52rAY.d.ts +37 -0
- package/index.d.ts +6 -0
- package/package.json +4 -2
- package/plugins/isToday/index.d.ts +10 -0
- package/plugins/isToday/index.js +8 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare class EsDay {
|
|
2
|
+
private $d;
|
|
3
|
+
private $y;
|
|
4
|
+
private $M;
|
|
5
|
+
private $D;
|
|
6
|
+
private $W;
|
|
7
|
+
private $H;
|
|
8
|
+
private $m;
|
|
9
|
+
private $s;
|
|
10
|
+
private $ms;
|
|
11
|
+
private $u;
|
|
12
|
+
constructor(cfg: {
|
|
13
|
+
d: Date;
|
|
14
|
+
utc: boolean;
|
|
15
|
+
});
|
|
16
|
+
init(): void;
|
|
17
|
+
utc(): EsDay;
|
|
18
|
+
valueOf(): number;
|
|
19
|
+
unix(): number;
|
|
20
|
+
clone(): EsDay;
|
|
21
|
+
format(formatStr: string): string;
|
|
22
|
+
startOf(units: UnitType): EsDay;
|
|
23
|
+
endOf(units: UnitType): EsDay;
|
|
24
|
+
set(units: UnitType, value: number): EsDay;
|
|
25
|
+
private $set;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type DateType = Date | string | number | EsDay;
|
|
29
|
+
type PrettyUnitType = 'date' | 'day' | 'week' | 'month' | 'year' | 'hour' | 'minute' | 'second' | 'millisecond';
|
|
30
|
+
type UnitType = 'y' | 'M' | 'D' | 'W' | 'H' | 'm' | 's' | 'ms' | PrettyUnitType;
|
|
31
|
+
interface EsDayFactory {
|
|
32
|
+
(d?: DateType): EsDay;
|
|
33
|
+
extend: (plugin: EsDayPlugin, option?: any) => EsDayFactory;
|
|
34
|
+
}
|
|
35
|
+
type EsDayPlugin = (option: any, dayTsClass: typeof EsDay, esday: EsDayFactory) => void;
|
|
36
|
+
|
|
37
|
+
export { type DateType as D, type EsDayFactory as E, type PrettyUnitType as P, type UnitType as U, EsDay as a, type EsDayPlugin as b };
|
package/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "esday",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"description": "A simple date library fully written in TypeScript",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"module": "index.js",
|
|
20
20
|
"types": "index.d.ts",
|
|
21
21
|
"typesVersions": {},
|
|
22
|
-
"files": [
|
|
22
|
+
"files": [
|
|
23
|
+
"*"
|
|
24
|
+
],
|
|
23
25
|
"dependencies": {
|
|
24
26
|
"radash": "^12.1.0"
|
|
25
27
|
},
|