ok for now
This commit is contained in:
@@ -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 '';
|
||||
|
||||
Reference in New Issue
Block a user