mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Show absolute date in Budget Reset column
Relative labels ("today", "in 2 days", "on May 12, 2026") mixed three
shapes in one column, breaking scannability. Always render MMM D, YYYY
for consistency and easier at-a-glance comparison across members.
This commit is contained in:
parent
6be8313147
commit
1f6e01802d
1 changed files with 1 additions and 6 deletions
|
|
@ -4,10 +4,5 @@ export function formatBudgetReset(iso: string | null | undefined): string | null
|
|||
if (!iso) return null;
|
||||
const resetDate = dayjs(iso);
|
||||
if (!resetDate.isValid()) return null;
|
||||
|
||||
const days = resetDate.diff(dayjs(), "day");
|
||||
if (days < 0) return `on ${resetDate.format("MMM D, YYYY")}`;
|
||||
if (days === 0) return "today";
|
||||
if (days < 7) return `in ${days} day${days === 1 ? "" : "s"}`;
|
||||
return `on ${resetDate.format("MMM D, YYYY")}`;
|
||||
return resetDate.format("MMM D, YYYY");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue