开发者

How to calculate Good Friday in Ruby

开发者 https://www.devze.com 2023-03-21 16:20 出处:网络
Does anyone know how to calculate the date of Good Friday in 开发者_开发问答Ruby? Thanks.You may use a gem.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消