Sha256: 1948c8af03cfda57737127783ff1fca8d33f2502cd5f6399a36aa42fad8e319f

Contents?: true

Size: 431 Bytes

Versions: 2

Compression:

Stored size: 431 Bytes

Contents

# frozen_string_literal: true

require_relative 'term'

module UKAcademicCalendar
  # Concrete class allowing instantiation of instances of an spring term, for a given academic year
  class SpringTerm < Term
    # @return [Date] Jan 1st
    def nominal_start_date
      nominal_end_date.beginning_of_year
    end

    # @return [Date] Easter Sunday
    def nominal_end_date
      Easter.easter(academic_year + 1)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uk_academic_calendar-1.0.1 lib/uk_academic_calendar/spring_term.rb
uk_academic_calendar-1.0.0 lib/uk_academic_calendar/spring_term.rb