improve dateFormat a bit, and fix some buttons
Some checks failed
Build Docker and Deploy / Build Docker Container (push) Successful in 49s
Build Docker and Deploy / Run Unit-Tests (push) Failing after 11m13s
Build Docker and Deploy / Deploy to Server (push) Has been skipped

This commit is contained in:
2025-04-22 00:35:32 +02:00
parent b91ddc172d
commit d5e9c6ecc3
7 changed files with 20 additions and 9 deletions

View File

@@ -30,6 +30,17 @@ enum AppSettingsDateFormat {
}
}
DateFormat dateOnlyFormat() {
switch (this) {
case AppSettingsDateFormat.ISO:
return DateFormat('yyyy-MM-dd');
case AppSettingsDateFormat.German:
return DateFormat('dd.MM.yyyy');
case AppSettingsDateFormat.US:
return DateFormat('MM/dd/yyyy');
}
}
static AppSettingsDateFormat? parse(String? string) {
if (string == null) return null;
return values.firstWhere((e) => e.key == string, orElse: null);