How to calculate Good Friday in Ruby
Does anyone know how to calculate the date of Good Friday in 开发者_开发问答Ruby? Thanks.
You may use a gem.
I use http://rubygems.org/gems/holidays (calculates also national holidays) Really a nice gem.
There are also:
- http://rubygems.org/gems/greek_easter
- http://rubygems.org/gems/date_easter
- http://rubygems.org/gems/when_easter
Yes - this has been the most important algorithm of the Western civilization for several centuries. See e.g. Wikipedia's article on computus (calculation of the date of Easter): http://en.wikipedia.org/wiki/Computus#Algorithms . Should be trivially portable to most languages.
精彩评论