dynamit-cli
Version:
The DynamoDB migrations tool CLI
18 lines (17 loc) • 520 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function format(i) {
return parseInt(i, 10) < 10 ? '0' + i : i;
}
function getCurrentYYYYMMDDHHmms() {
const date = new Date();
return [
date.getUTCFullYear(),
format(date.getUTCMonth() + 1),
format(date.getUTCDate()),
format(date.getUTCHours()),
format(date.getUTCMinutes()),
format(date.getUTCSeconds())
].join('');
}
exports.getCurrentYYYYMMDDHHmms = getCurrentYYYYMMDDHHmms;