@pallasoft/ps-utilities 1.0.3 → 1.0.5
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.
|
@@ -7,6 +7,7 @@ export declare class DateService {
|
|
|
7
7
|
static calculateTimeRemaining(date: string | number, placeholder: string): string;
|
|
8
8
|
static getNextWeek(): string;
|
|
9
9
|
static getNextMonth(): string;
|
|
10
|
+
static formatDate(date: string | number, format: string): string;
|
|
10
11
|
static formatDateToString(date: string | number, short?: boolean): string;
|
|
11
12
|
static formatTimeToString(date: string | number, short?: boolean): string;
|
|
12
13
|
static diffInMins(startDate: string | number, endDate: string | number): number;
|
|
@@ -59,6 +59,9 @@ var DateService = /** @class */ (function () {
|
|
|
59
59
|
DateService.getNextMonth = function () {
|
|
60
60
|
return (0, dayjs_1.default)().add(1, 'month').toISOString();
|
|
61
61
|
};
|
|
62
|
+
DateService.formatDate = function (date, format) {
|
|
63
|
+
return (0, dayjs_1.default)(date).format(format);
|
|
64
|
+
};
|
|
62
65
|
DateService.formatDateToString = function (date, short) {
|
|
63
66
|
return (0, dayjs_1.default)(date).format(short ? 'DD MMM, YYYY' : 'DD MMMM, YYYY');
|
|
64
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pallasoft/ps-utilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"private": false,
|
|
5
6
|
"main": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
@@ -23,26 +24,26 @@
|
|
|
23
24
|
"lint:eslint:fix": "npx eslint --fix \"**/*.{js,ts}\""
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@commitlint/cli": "^
|
|
27
|
-
"@commitlint/config-conventional": "^
|
|
28
|
-
"@eslint/compat": "^
|
|
29
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
31
|
-
"@typescript-eslint/parser": "^8.
|
|
32
|
-
"commitlint": "^
|
|
33
|
-
"eslint": "^9.
|
|
34
|
-
"eslint-config-prettier": "^
|
|
35
|
-
"eslint-plugin-import": "^2.
|
|
36
|
-
"eslint-plugin-prettier": "^5.
|
|
27
|
+
"@commitlint/cli": "^20.1.0",
|
|
28
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
29
|
+
"@eslint/compat": "^2.0.0",
|
|
30
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
32
|
+
"@typescript-eslint/parser": "^8.48.0",
|
|
33
|
+
"commitlint": "^20.1.0",
|
|
34
|
+
"eslint": "^9.39.1",
|
|
35
|
+
"eslint-config-prettier": "^10.1.8",
|
|
36
|
+
"eslint-plugin-import": "^2.32.0",
|
|
37
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
37
38
|
"husky": "^9.1.7",
|
|
38
|
-
"lint-staged": "^
|
|
39
|
-
"prettier": "^3.
|
|
39
|
+
"lint-staged": "^16.2.7",
|
|
40
|
+
"prettier": "^3.6.2",
|
|
40
41
|
"ts-node": "^10.9.2",
|
|
41
|
-
"typescript": "^5.
|
|
42
|
+
"typescript": "^5.9.3"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@esbuild-plugins/tsconfig-paths": "^0.1.2",
|
|
45
|
-
"dayjs": "^1.11.
|
|
46
|
-
"esbuild": "^0.
|
|
46
|
+
"dayjs": "^1.11.19",
|
|
47
|
+
"esbuild": "^0.27.0"
|
|
47
48
|
}
|
|
48
49
|
}
|