Skip to content

Instantly share code, notes, and snippets.

@igneus
Last active December 19, 2021 20:26
Show Gist options
  • Save igneus/27d0d71735fcbab64abd7965dd29ab26 to your computer and use it in GitHub Desktop.
Save igneus/27d0d71735fcbab64abd7965dd29ab26 to your computer and use it in GitHub Desktop.
In which years is the Second Sunday of Christmas celebrated?
require 'calendarium-romanum'
dates = CalendariumRomanum::Temporale::Dates
years = (1969..3000)
has_second_sunday_of_xmas = proc do |year|
dates.octave_of(dates.sunday_after(dates.nativity(year))) <
dates.epiphany(year)
end
p years.select(&has_second_sunday_of_xmas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment