@docaohuynh/ielts-api-utils 1.0.10 → 1.0.11
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/dist/index.js +665 -425
- package/dist/src/utils/date/index.d.ts +1 -0
- package/dist/src/utils/date/year-range.util.d.ts +14 -0
- package/package.json +5 -5
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the start of the year (first millisecond of January 1st) for a given date.
|
|
3
|
+
* If no date is provided, uses the current date.
|
|
4
|
+
* @param dateOrTimestamp - A Date object, timestamp, or ISO string representing the date. If null/undefined, uses current date.
|
|
5
|
+
* @returns A Date object representing the start of the year
|
|
6
|
+
*/
|
|
7
|
+
export declare function getStartOfYear(dateOrTimestamp?: Date | number | string | null): Date;
|
|
8
|
+
/**
|
|
9
|
+
* Gets the end of the year (last millisecond of December 31st) for a given date.
|
|
10
|
+
* If no date is provided, uses the current date.
|
|
11
|
+
* @param dateOrTimestamp - A Date object, timestamp, or ISO string representing the date. If null/undefined, uses current date.
|
|
12
|
+
* @returns A Date object representing the end of the year
|
|
13
|
+
*/
|
|
14
|
+
export declare function getEndOfYear(dateOrTimestamp?: Date | number | string | null): Date;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docaohuynh/ielts-api-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Utilities for IELTS API",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/bun": "latest",
|
|
15
15
|
"mockdate": "^3.0.5",
|
|
16
|
-
"vitest": "^
|
|
16
|
+
"vitest": "^4.0.18"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"typescript": "^5.9.2"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sindresorhus/slugify": "^
|
|
22
|
+
"@sindresorhus/slugify": "^3.0.0",
|
|
23
23
|
"@types/luxon": "^3.7.1",
|
|
24
|
-
"luxon": "^3.7.
|
|
25
|
-
"transliteration": "^2.
|
|
24
|
+
"luxon": "^3.7.2",
|
|
25
|
+
"transliteration": "^2.6.1"
|
|
26
26
|
}
|
|
27
27
|
}
|