No commit activity in last 3 years
No release in over 3 years
Returns the dates for Epiphany, St David's Day, Ash Wednesday, Mothering Sunday, St Patrick's Day, Palm Sunday, Good Friday, Easter Sunday, Whit Sunday, Trinity Sunday, Ascension Day, Pentecost Sunday, St Andrews Day, Advent Sunday, and Christmas day
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.10, >= 0.10.2
~> 0.1, >= 0.1.2
 Project Readme

Introducing the Christian Calendar gem

require 'christian_calendar'

# 2014
cc = ChristianCalendar.new

cc.mothering_sunday #=> 2014-03-30 13:00:00 +0100 
cc.easter_sunday    #=> #<DateTime: 2014-04-20T00:00:00+00:00 (...)> 
cc.st_andrews_day   #=> 2014-11-30 00:00:00 +0000

puts cc.to_h.map {|k,v| "%+16s: %s" % [k,v.strftime("%d-%b")]}.join("\n")

output:

        epiphany: 06-Jan
   st_davids_day: 01-Mar
   ash_wednesday: 05-Mar
mothering_sunday: 30-Mar
 st_patricks_day: 17-Mar
     palm_sunday: 13-Apr
     good_friday: 18-Apr
   easter_sunday: 20-Apr
     whit_sunday: 18-May
  trinity_sunday: 15-Jun
   ascension_day: 12-Mar
       pentecost: 08-Jun
  st_andrews_day: 30-Nov
   advent_sunday: 30-Nov
       christmas: 25-Dec
# 2015
cc = ChristianCalendar.new 2015
puts cc.to_h.map {|k,v| "%+16s: %s" % [k,v.strftime("%d-%b")]}.join("\n")

# sorting the dates and making the names look presentable
#
a = cc.to_h.sort_by{|k, v| v.to_datetime}.map do |k,v| 
  label = k.to_s.sub(/s(?=_)/,"'s").gsub('_', ' ').split.map(&:capitalize).join(' ')
  "%+16s: %s" % [label,v.strftime("%d-%b-%Y")]
end
puts a.join("\n")

output:

        Epiphany: 06-Jan-2015
   Ash Wednesday: 18-Feb-2015
   Ascension Day: 25-Feb-2015
  St David's Day: 01-Mar-2015
Mothering Sunday: 15-Mar-2015
St Patrick's Day: 17-Mar-2015
     Palm Sunday: 29-Mar-2015
     Good Friday: 03-Apr-2015
   Easter Sunday: 05-Apr-2015
     Whit Sunday: 17-May-2015
       Pentecost: 24-May-2015
  Trinity Sunday: 31-May-2015
   Advent Sunday: 29-Nov-2015
 St Andrew's Day: 30-Nov-2015
       Christmas: 25-Dec-2015

Resources