MCPcopy Create free account
hub / github.com/Rfym21/Qwen2API / _formatDateKey

Function _formatDateKey

src/utils/account.js:51–58  ·  view source on GitHub ↗
(offsetDays)

Source from the content-addressed store, hash-verified

49 }
50 if (!account.stats.cli || typeof account.stats.cli !== 'object') {
51 account.stats.cli = { calls: 0, input: 0, output: 0 }
52 } else {
53 account.stats.cli.calls = Number(account.stats.cli.calls) || 0
54 account.stats.cli.input = Number(account.stats.cli.input) || 0
55 account.stats.cli.output = Number(account.stats.cli.output) || 0
56 }
57 }
58 // statsHistory: { 'YYYY-MM-DD': { chat:{input,output}, cli:{calls,input,output} } }
59 // Backward-compat: legacy records without the field — initialize to {}
60 if (!account.statsHistory || typeof account.statsHistory !== 'object') {
61 account.statsHistory = {}

Callers 3

_getTodayKeyFunction · 0.85
_getYesterdayKeyFunction · 0.85
_dateKeyDaysAgoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected