extracted reusable helper methods into global extensions.

This commit is contained in:
Faris Armoush
2025-04-30 15:02:22 +03:00
parent 63718185e7
commit 9431dd4500
3 changed files with 33 additions and 30 deletions

View File

@ -0,0 +1,19 @@
extension GetMonthNameFromNumber on num {
String get getMonthName {
return switch (this) {
1 => 'JAN',
2 => 'FEB',
3 => 'MAR',
4 => 'APR',
5 => 'MAY',
6 => 'JUN',
7 => 'JUL',
8 => 'AUG',
9 => 'SEP',
10 => 'OCT',
11 => 'NOV',
12 => 'DEC',
_ => 'N/A'
};
}
}