@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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shorthand to get the current date.
3
+ */
4
+ declare const getTodayYmd: () => string;
5
+ export 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 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,5 @@
1
+ /**
2
+ * Shorthand to get the current timestamp.
3
+ */
4
+ declare const getTodayYmdhis: () => string;
5
+ export default getTodayYmdhis;
@@ -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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "1.1.84",
4
+ "version": "1.1.85",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"