MCPcopy
hub / github.com/microsoft/SandDance / timestamp

Function timestamp

docs/tests/v2/es6/js/sanddance.js:8219–8223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8217var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // 26 Feb 16:19:34
8218
8219function timestamp() {
8220 var d = new Date();
8221 var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':');
8222 return [d.getDate(), months[d.getMonth()], time].join(' ');
8223} // log is just a thin wrapper to console.log that prepends a timestamp
8224
8225
8226exports.log = function () {

Callers 1

sanddance.jsFile · 0.85

Calls 1

padFunction · 0.70

Tested by

no test coverage detected