Use m/d/yy h.nnp date format on perf dashboard
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e92b2a4833
commit
60de16437b
1 changed files with 4 additions and 1 deletions
|
|
@ -134,7 +134,10 @@ function fmtDate(s) {
|
|||
if (!s || s === 'none') return 'none';
|
||||
var d = new Date(s.replace(' ', 'T'));
|
||||
if (isNaN(d)) return s;
|
||||
return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }) + ', ' + d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit', hour12: true });
|
||||
var mo = d.getMonth() + 1, dy = d.getDate(), yr = String(d.getFullYear()).slice(-2);
|
||||
var h = d.getHours(), mi = String(d.getMinutes()).padStart(2, '0'), ap = h >= 12 ? 'p' : 'a';
|
||||
h = h % 12 || 12;
|
||||
return mo + '/' + dy + '/' + yr + ' ' + h + '.' + mi + ap;
|
||||
}
|
||||
function fmtMs(n) {
|
||||
if (n == null) return '-';
|
||||
|
|
|
|||
Reference in a new issue