getPersianMonthLetter static method
بدست اوردن نام ماه شمسی
Implementation
static String getPersianMonthLetter(
String monthNumber, {
bool useAfghaniMonthName = false,
}) {
monthNumber = changeDigit(monthNumber, NumStrLanguage.English);
String outputText = "";
if (monthNumber.startsWith('0')) {
monthNumber = monthNumber.replaceAll("0", "");
}
switch (monthNumber) {
case "1":
{
outputText = useAfghaniMonthName ? "حمل" : "فروردین";
break;
}
case "2":
{
outputText = useAfghaniMonthName ? "ثور" : "اردیبهشت";
break;
}
case "3":
{
outputText = useAfghaniMonthName ? "جوزا" : "خرداد";
break;
}
case "4":
{
outputText = useAfghaniMonthName ? "سرطان" : "تیر";
break;
}
case "5":
{
outputText = useAfghaniMonthName ? "اسد" : "مرداد";
break;
}
case "6":
{
outputText = useAfghaniMonthName ? "سنبله" : "شهریور";
break;
}
case "7":
{
outputText = useAfghaniMonthName ? "میزان" : "مهر";
break;
}
case "8":
{
outputText = useAfghaniMonthName ? "عقرب" : "ابان";
break;
}
case "9":
{
outputText = useAfghaniMonthName ? "قوس" : "اذر";
break;
}
case "10":
{
outputText = useAfghaniMonthName ? "جدی" : "دی";
break;
}
case "11":
{
outputText = useAfghaniMonthName ? "دلو" : "بهمن";
break;
}
case "12":
{
outputText = useAfghaniMonthName ? "حوت" : "اسفند";
break;
}
}
return outputText;
}