Killsoft Sugdok


Join the forum, it's quick and easy

Killsoft Sugdok
Killsoft Sugdok
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Computing Easter Date - VB Function

Go down

Computing Easter Date - VB Function Empty Computing Easter Date - VB Function

Post by giovhz Sat Mar 23, 2013 1:33 pm

Function F_easter_date(Year_of_easter as integer)
Dim y as integer = Year_of_easter
Dim d As Integer = (((255 - 11 * (y Mod 19)) - 21) Mod 30) + 21
Dim easter_date = New DateTime(y, 3, 1)
easter_date = easter_date.AddDays(+ d + (d > 48) + 6 - ((y + y \ 4 + d + (d > 48) + 1) Mod 7))
return(easter_date)
End function


Sub ex()
Dim Date_AshWednesday as DateTime = F_easter_date("str_Year").AddDays(-47)
Dim Date_CorpusChristy as DateTime = F_easter_date("str_Year").AddDays(60)
End Sub
giovhz
giovhz
Newbie
Newbie

Posts : 41
Join date : 2013-03-09

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum