ok for now

This commit is contained in:
davmar
2026-09-06 21:58:59 +02:00
parent 773187f0af
commit 87afe271b7
20 changed files with 2271 additions and 377 deletions
+19
View File
@@ -78,6 +78,25 @@ String formatMoney(double amount, String currency) {
return '$sign${buffer.toString()},$fraction $currency';
}
/// Formats [date] as `MMMM y`, e.g. `September 2026`.
String formatMonthYear(DateTime date) {
const months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
];
return '${months[date.month - 1]} ${date.year}';
}
/// Formats an ISO date string (`yyyy-MM-dd` or full ISO) for list rows.
String formatIsoDate(String raw) {
if (raw.isEmpty) return '';