Sha256: 87357f078089a5371579713d4cae66fef5505640ad2215c2d73cc64ff164b52e

Contents?: true

Size: 839 Bytes

Versions: 1

Compression:

Stored size: 839 Bytes

Contents

require_relative "year_2016/base"
require_relative "year_2022/citizen_or_spr_3"
require_relative "year_2022/spr_2_gg"
require_relative "year_2022/spr_2_fg"
require_relative "year_2022/spr_1_gg"
require_relative "year_2022/spr_1_fg"

module SingaporeCPFCalculator
  # Contains the calculators that are used for determining CPF contribution for 2022.
  module Year2022
    class << self
      include YearCommon

      # @param [Date] date when the CPF contribution is to be calculated for.
      # @return [true, false] true when the date's year is 2022 and later
      def applies_to?(date)
        date.year >= 2022
      end

      private

       def residency_modules
        [
          CitizenOrSPR3,
          SPR2GG,
          SPR2FG,
          SPR1GG,
          SPR1FG,
          BeforeSPR,
        ]
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
singapore_cpf_calculator-1.4.0 lib/singapore_cpf_calculator/year_2022.rb