molstar
Version:
A comprehensive macromolecular library.
24 lines • 854 B
JavaScript
/**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFormattedTime = exports.dateToUtcString = void 0;
function dateToUtcString(date) {
return date.toISOString().replace(/T/, ' ').replace(/\..+/, '');
}
exports.dateToUtcString = dateToUtcString;
function getFormattedTime() {
var today = new Date();
var y = today.getFullYear();
var m = today.getMonth() + 1;
var d = today.getDate();
var h = today.getHours();
var mi = today.getMinutes();
var s = today.getSeconds();
return y + '-' + m + '-' + d + '-' + h + '-' + mi + '-' + s;
}
exports.getFormattedTime = getFormattedTime;
//# sourceMappingURL=date.js.map
;