|
|
|
Click here to copy the following block |
Public Function GetRoshHashanah(iYear As Integer) As Date Dim dDate As Single, iDate As Integer, iDayOfWeek As Integer Dim JY As Integer, JtoG As Integer, iMonth As Integer Const F1 As Single = 765433 / 492480 Const F2 As Single = 23269 / 25920 Const F3 As Single = 765433 / 492480 JY = (12 * ((iYear Mod 19) + 1)) Mod 19 JtoG = iYear \ 100 - iYear \ 400 - 2 dDate = JtoG + F1 * JY + (iYear Mod 4) / 4 - (313 * CLng(iYear) + 89081) / _ 98496 iDate = Int(dDate) dDate = dDate - iDate If iDate > 30 Then iDate = iDate - 30 iMonth = 10 ElseIf iDate < 1 Then iDate = iDate + 31 iMonth = 8 Else iMonth = 9 End If iDayOfWeek = Weekday(DateSerial(iYear, iMonth, iDate)) If iDayOfWeek = 1 Or iDayOfWeek = 4 Or iDayOfWeek = 6 Then iDate = iDate + 1 ElseIf iDayOfWeek = 2 And dDate > F1 And JY > 11 Then iDate = iDate + 1 ElseIf iDayOfWeek = 3 And dDate >= F2 And JY > 6 Then iDate = iDate + 2 End If If iDate > 30 Then iDate = iDate - 30 iMonth = 10 ElseIf iDate < 1 Then iDate = iDate + 31 iMonth = 8 Else iMonth = 9 End If GetRoshHashanah = DateSerial(iYear, iMonth, iDate) End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|