feat: enhance date handling and formatting in quotes and belo features
This commit is contained in:
@@ -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)"
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user