View Full Version : Persian .Net (Convert DateTime to Arabic And Persian)



mahdiit
8th July 2006, 21:02
This dll can use in ASP .Net 2.0 application also C# or other Visual Studio Applications, But how to use?

Here are VB .Net samples:
dim newDate as Persia.SunDate
//Persian Date
newDate = Persia.Calendar.ConvertToPersian(DateTime.Now)
dim year,month,day as integer

//There are an array that contian informations:

year = newDate.ArrayType[0]
month = newDate.ArrayType[1]
day = newDate.ArrayType[3]

//Also there are there format for viewing Date
dim persianDateFormat as string
//Simple: ۱۳۸۴/۳/۱۸
persianDateFormat = newDate.Simple

//Persian:هجدهم خرداد ۱۳۸۴
persianDateFormat = newDate.Persian

//Weekday:چهارشنبه ۱۸ خرداد ۱۳۸۴
persianDateFormat = newDate.Weekday

//Other useful class: (Please declear them your self)
dayOfWeek = newDate.DayOfWeek
isLeapYear = newDate.IsLeapYear

In Arabic also we need Hijri Calendar use this class to find this date:
dim newDate as Persia.MoonDate
//Persian Date
newDate = Persia.Calendar.ConvertToIslamic(DateTime.Now)

and there is two format for this "newDate"
newDate.Simple :[۱۴۲۶/۵/۱]
newDate.Formal :[لأَربِعا ۱ جمادي الاولي ۱۴۲۶]

this dll can also convert:
Islamic to Persian or Gerigorian
Perian to Islamic or Gerigorian
There are also guide in farsi(Persian) in this site:

[Only registered and activated users can see links]

You can find more information if you want in this mail address:
[Only registered and activated users can see links]

masternew
10th July 2006, 15:16
good dll but dont know alot in ASP
do you have this in PHP