export const adjustPrecision = ({ amount, scale }: { amount: number; scale: number }) => { const factor = 10 ** scale; return Number(amount) / factor; }; export const formatDateToYYYYMMDD = (date: Date): string => { const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); // Los meses van de 0 a 11, por lo que sumamos 1 const day = String(date.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; };