diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-08-16 11:19:49 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-08-16 11:19:49 +0200 |
| commit | 00bf8823311c067f5b0e9a785a5048e6bd8ad122 (patch) | |
| tree | ba2d727345038b7da2ea628e5e865572033df8e7 /lib/utils | |
ok
Diffstat (limited to 'lib/utils')
| -rw-r--r-- | lib/utils/date.dart | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/utils/date.dart b/lib/utils/date.dart new file mode 100644 index 0000000..7a66c03 --- /dev/null +++ b/lib/utils/date.dart @@ -0,0 +1,51 @@ +class DateHelper { + static String getWeekdayName(int nr) { + switch (nr) { + case DateTime.monday: + return 'Ma'; + case DateTime.tuesday: + return 'Di'; + case DateTime.wednesday: + return 'Wo'; + case DateTime.thursday: + return 'Do'; + case DateTime.friday: + return 'Vr'; + case DateTime.saturday: + return 'Za'; + case DateTime.sunday: + return 'Zo'; + } + return ''; + } + + static String getMonthName(int nr) { + switch (nr) { + case 1: + return 'Jan'; + case 2: + return 'Feb'; + case 3: + return 'Maa'; + case 4: + return 'Apr'; + case 5: + return 'Mei'; + case 6: + return 'Jun'; + case 7: + return 'Jul'; + case 8: + return 'Aug'; + case 9: + return 'Sep'; + case 10: + return 'Okt'; + case 11: + return 'Nov'; + case 12: + return 'Dec'; + } + return ''; + } +} |
