feat: enhance date handling and formatting in quotes and belo features

This commit is contained in:
Jose Selesan
2026-06-04 11:32:38 -03:00
parent 7c864053bb
commit 0915ad1223
7 changed files with 29 additions and 26 deletions

View File

@@ -28,11 +28,8 @@ function formatDate(d: Date): string {
}
function formatShortDate(iso: string): string {
const d = new Date(iso);
return d.toLocaleDateString("es-AR", {
day: "2-digit",
month: "2-digit",
});
const [, m, d] = iso.split("-");
return `${d}/${m}`;
}
export function BeloAnalysisPage() {
@@ -315,7 +312,7 @@ export function BeloAnalysisPage() {
}}
/>
<Line
type="monotone"
type="linear"
dataKey="buy"
name="Compra"
stroke="var(--chart-1)"

View File

@@ -46,11 +46,8 @@ function formatTime(iso: string): string {
}
function formatShortDate(iso: string): string {
const d = new Date(iso);
return d.toLocaleDateString("es-AR", {
day: "2-digit",
month: "2-digit",
});
const [, m, d] = iso.split("-");
return `${d}/${m}`;
}
function getGaugeColor(percentage: number | null): string {
@@ -395,7 +392,7 @@ export function BeloPage() {
}}
/>
<Line
type="monotone"
type="linear"
dataKey="buy"
name="Compra"
stroke="var(--chart-1)"
@@ -405,7 +402,7 @@ export function BeloPage() {
isAnimationActive={false}
/>
<Line
type="monotone"
type="linear"
dataKey="sell"
name="Venta"
stroke="var(--chart-2)"