Sha256: 225b3f8dbc1e39df2a483e733cd8f75ca48b3156cbf0297fddca096651eafb76

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

module Calrom
  module Formatter
    # Prints (only) date of Easter for the specified year.
    class Easter
      def call(calendar, date_range)
        unless date_range.is_a?(Year) || date_range.is_a?(Month)
          raise 'unexpected date range, expected a year'
        end

        puts CR::Temporale::Dates
               .easter_sunday(date_range.first.year - 1)
               .strftime('%D')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
calrom-0.3.0 lib/calrom/formatter/easter.rb