MonthName

Returns the month name in one of 5 formats
1: Returns full English month name, March
2: Returns short English, Mar
3: Arabic month name full, تشرين الأول
4: أكتوبر
5: ت2

Function MonthName(DateSe , En1En2Ar3Ar4Ar5)
 MonthID  = Month(DateSe)
 If En1En2Ar3Ar4Ar5 = 1 Then
  Select case MonthID
  Case 1: MonthName  = "January"
  Case 2: MonthName  = "February"
  Case 3: MonthName  = "March"
  Case 4: MonthName  = "April"
  Case 5: MonthName  = "May"
  Case 6: MonthName  = "June"
  Case 7: MonthName  = "July"
  Case 8: MonthName  = "August"
  Case 9: MonthName  = "September"
  Case 10: MonthName = "October"
  Case 11: MonthName = "November"
  Case 12: MonthName = "December"
  End Select
 ElseIf En1En2Ar3Ar4Ar5 = 2 Then
  Select case MonthID
  Case 1: MonthName  = "Jan"
  Case 2: MonthName  = "Feb"
  Case 3: MonthName  = "Mar"
  Case 4: MonthName  = "Apr"
  Case 5: MonthName  = "May"
  Case 6: MonthName  = "Jun"
  Case 7: MonthName  = "Jul"
  Case 8: MonthName  = "Aug"
  Case 9: MonthName  = "Sep"
  Case 10: MonthName = "Oct"
  Case 11: MonthName = "Nov"
  Case 12: MonthName = "Dec"
  End Select
 ElseIf En1En2Ar3Ar4Ar5 = 3 Then
  Select case MonthID
  Case 1: MonthName  ="كانون الثاني"
  Case 2: MonthName  ="شباط"
  Case 3: MonthName  ="آذار"
  Case 4: MonthName  ="نيسان"
  Case 5: MonthName  ="أيــار"
  Case 6: MonthName  ="حزيران"
  Case 7: MonthName  ="تموز"
  Case 8: MonthName  ="آب"
  Case 9: MonthName  ="أيلول"
  Case 10: MonthName ="تشرين الأول"
  Case 11: MonthName ="تشرين الثاني"
  Case 12: MonthName ="كانون الأول"
  End Select
 ElseIf En1En2Ar3Ar4Ar5 = 4 Then
  Select case MonthID
  Case 1: MonthName  ="يناير"
  Case 2: MonthName  ="فبراير"
  Case 3: MonthName  ="مارس"
  Case 4: MonthName  ="ابريل"
  Case 5: MonthName  ="مايو"
  Case 6: MonthName  ="يونيو"
  Case 7: MonthName  ="يوليو"
  Case 8: MonthName  ="أغسطس"
  Case 9: MonthName  ="سبتمبر"
  Case 10: MonthName ="اكتوبر"
  Case 11: MonthName ="نوفمبر"
  Case 12: MonthName ="ديسمبر"
  End Select
 ElseIf En1En2Ar3Ar4Ar5 = 5 Then
  Select case MonthID
  Case 1: MonthName  ="ك2"
  Case 2: MonthName  ="شباط"
  Case 3: MonthName  ="آذار"
  Case 4: MonthName  ="نيسان"
  Case 5: MonthName  ="أيار"
  Case 6: MonthName  ="حزيران"
  Case 7: MonthName  ="تموز"
  Case 8: MonthName  ="آب"
  Case 9: MonthName  ="أيلول"
  Case 10: MonthName ="ت1"
  Case 11: MonthName ="ت2"
  Case 12: MonthName ="ك1"
  End Select
 End If
End Function

DateSe
En1EN2Ar3Ar4Ar5

Views 316 Downloads 121

'Arabic', 'date', 'month', 'monthname', 'days', 'convert', 'replace'

ANmarAmdeen
313
Date+Time Classic ASP
Revisions

v1.0