opencode-statboard 2.10.22 → 2.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +2 -2
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -277,8 +277,8 @@ function refreshTrend(days) {
|
|
|
277
277
|
return { trend: hit ? Object.assign({}, hit, { stale: true }) : null, pending };
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
function localDayKey(d) { return `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`; }
|
|
281
|
-
function dateOfKey(k) { const [y, m, d] = k.split('-').map(Number); return new Date(y, m, d); }
|
|
280
|
+
function localDayKey(d) { const p = (n) => String(n).padStart(2, '0'); return `${d.getFullYear()}-${p(d.getMonth() + 1)}-${p(d.getDate())}`; }
|
|
281
|
+
function dateOfKey(k) { const [y, m, d] = k.split('-').map(Number); return new Date(y, m - 1, d); }
|
|
282
282
|
function modelNameOf(provider, model) { return `${provider || 'unknown'}/${model || 'unknown'}`; }
|
|
283
283
|
function splitModelName(name) {
|
|
284
284
|
const i = String(name).indexOf('/');
|