@hastehaul/common 1.0.24 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/build/utils/utils.d.ts +1 -0
- package/build/utils/utils.js +5 -1
- package/package.json +1 -1
package/build/utils/utils.d.ts
CHANGED
package/build/utils/utils.js
CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.colorize = exports.hasElapsed = void 0;
|
6
|
+
exports.formatDatetimeToHumanReadable = exports.colorize = exports.hasElapsed = void 0;
|
7
7
|
const moment_1 = __importDefault(require("moment"));
|
8
8
|
function hasElapsed(expirationDate) {
|
9
9
|
const currentDate = (0, moment_1.default)();
|
@@ -16,3 +16,7 @@ function colorize(text, colorCode) {
|
|
16
16
|
return `\x1b[${colorCode}m${text}\x1b[0m`;
|
17
17
|
}
|
18
18
|
exports.colorize = colorize;
|
19
|
+
function formatDatetimeToHumanReadable(datetime, format) {
|
20
|
+
return (0, moment_1.default)(datetime).format(format || 'MMMM D, YYYY h:mm A');
|
21
|
+
}
|
22
|
+
exports.formatDatetimeToHumanReadable = formatDatetimeToHumanReadable;
|