Files
evidencija-rezija/app/lib/format.ts

7 lines
191 B
TypeScript

export const formatYearMonth = (yearMonth: number): string => {
const year = Math.floor(yearMonth / 100);
const month = yearMonth % 100;
return `${year}-${month<10?"0":""}${month}`;
}