RSS Forums RSS
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 2178 | Replies: 4 | Thread Tools  Display Modes
Reply
Join Date: Aug 2007
Posts: 44
Reputation: locsin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
locsin locsin is offline Offline
Light Poster

Hijri Calendar value in visual basic

  #1  
Oct 23rd, 2007
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 1
Reputation: soulsoft is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
soulsoft soulsoft is offline Offline
Newbie Poster

Solution Re: Hijri Calendar value in visual basic

  #2  
Oct 25th, 2007
Hello friend.. this is an VB5-6 code to convert Gregorian calendar to Hijri Calendar.. Enjoy
from SoulSoft@mailmeasap.com .
Attached Files
File Type: zip HijriConverter.zip (2.2 KB, 88 views)
Reply With Quote  
Join Date: Dec 2007
Posts: 1
Reputation: sarra235 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sarra235 sarra235 is offline Offline
Newbie Poster

Re: Hijri Calendar value in visual basic

  #3  
Dec 26th, 2007
this is a corrupted file
Reply With Quote  
Join Date: Jan 2008
Posts: 2
Reputation: abutty is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abutty abutty is offline Offline
Newbie Poster

Re: Hijri Calendar value in visual basic

  #4  
Jan 11th, 2008
I could not Open.. this is a corrupted file
Reply With Quote  
Join Date: Jan 2008
Posts: 2
Reputation: abutty is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
abutty abutty is offline Offline
Newbie Poster

Re: Hijri Calendar value in visual basic

  #5  
Jan 11th, 2008
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:03 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC