@8ms/helpers 1.1.84 → 1.1.85
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/date/getTodayYmd.d.ts +5 -0
- package/date/getTodayYmd.js +20 -0
- package/date/getTodayYmdhis.d.ts +5 -0
- package/date/getTodayYmdhis.js +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const format_1 = __importDefault(require("./format"));
|
|
7
|
+
const getToday_1 = __importDefault(require("./getToday"));
|
|
8
|
+
/**
|
|
9
|
+
* Shorthand to get the current date.
|
|
10
|
+
*/
|
|
11
|
+
const getTodayYmd = () => {
|
|
12
|
+
const today = (0, getToday_1.default)({ setMidnight: false });
|
|
13
|
+
const todayYmd = (0, format_1.default)({
|
|
14
|
+
input: today,
|
|
15
|
+
dateFormat: 'yyyy-MM-dd',
|
|
16
|
+
setMidnight: false,
|
|
17
|
+
});
|
|
18
|
+
return todayYmd;
|
|
19
|
+
};
|
|
20
|
+
exports.default = getTodayYmd;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const format_1 = __importDefault(require("./format"));
|
|
7
|
+
const getToday_1 = __importDefault(require("./getToday"));
|
|
8
|
+
/**
|
|
9
|
+
* Shorthand to get the current timestamp.
|
|
10
|
+
*/
|
|
11
|
+
const getTodayYmdhis = () => {
|
|
12
|
+
const today = (0, getToday_1.default)({ setMidnight: false });
|
|
13
|
+
const todayYmdhis = (0, format_1.default)({
|
|
14
|
+
input: today,
|
|
15
|
+
dateFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
16
|
+
setMidnight: false,
|
|
17
|
+
});
|
|
18
|
+
return todayYmdhis;
|
|
19
|
+
};
|
|
20
|
+
exports.default = getTodayYmdhis;
|