mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
12 lines
No EOL
403 B
JavaScript
12 lines
No EOL
403 B
JavaScript
'use strict';
|
|
|
|
function timestampAt() {
|
|
const date = new Date(),
|
|
string = date.toLocaleTimeString("UTC", {"day": "numeric", "month": "2-digit", "year": "2-digit", "hour12": true}),
|
|
ampm = string.slice(string.length - 3),
|
|
miliseconds = date.getUTCMilliseconds(),
|
|
result = string.slice(0, -3) + "." + miliseconds + ampm;
|
|
return "At: " + result;
|
|
};
|
|
|
|
module.exports = { timestampAt } |