Greetings!

Anybody know how to set or get the value of hijri calendar. Like for example I set the date in the form of mm/dd/yyyy gregorian calendar the value is 12/22/2007. I want to get the equivalend value in hijri calendar which is 12/12/1428. Then If i set the date again in other value like 10/10/2007 the hijri date value also change in equivalent value.

The main purpose of mine is to set the gregorian date and get the equivalent hijri date or the arabic date.

Thank you in advance.

Hello friend.. this is an VB5-6 code to convert Gregorian calendar to Hijri Calendar.. Enjoy
from SoulSoft@mailmeasap.com .

this is a corrupted file

I could not Open.. this is a corrupted file

Dear Friends.. Please use the following code


Public Function HijraDate(DateEntry As Date)
HijraDate = HijriUmmulQura(DateEntry)
Dim TDAYS As String
Exit Function
Dim diff As Long, dy As Integer
TDAYS = "Saturday Sunday Monday Tuesday WednesdayThursday Friday "
diff = DateDiff("d", "15/02/1592", DateEntry)
Dim ADJ_DAYS As Integer
Dim X As Integer
Dim d As Integer
Dim M As Integer
Dim XDate1 As Variant
Dim XDate2 As Variant
Dim XDate3 As Variant

ADJ_DAYS = (Int(((diff - 145322) + 950 / 2) / 950)) * -1
ADJ_DAYS = ADJ_DAYS + prgSetup.ADayDiff
dy = diff - Int(diff / 7) * 7
X = diff + ADJ_DAYS
d = Int(((X / 29.5) - Int(X / 29.5)) * 29.5)
M = Int((((X / 354) - Int(X / 354)) * 354) / 29.5)
XDate1 = Right(Str(100 + d + IIf(d = 0, 30, 0)), 2)
XDate2 = Right(Str(100 + M + IIf(M = 0, 12, 0) - IIf(d = 0, 1, 0)), 2)
XDate3 = Str(1000 + Int(X / 354) - IIf(M = 0, 1, 0))
If XDate2 = "00" Then XDate3 = Str(Val(XDate3) - 1)
If XDate2 = "00" Then XDate2 = "12"
If XDate2 = "02" And XDate1 = "29" Then XDate1 = "28"
If XDate2 = "02" And XDate1 = "30" Then XDate1 = "28"
HijraDate = XDate1 + "/" + XDate2 + "/" + Trim(XDate3)

End Function

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.