Sha256: 04db9223f4f4d325469992b7711d82e49b2d6d6d865ee3dcc43cf918e3247c56
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
require_relative "null_contribution_calculator" module SingaporeCPFCalculator # Residency module for Singaporean Permanent Residents before theirs status effectivity. module BeforeSPR class << self # @param [String] status: ["citizen", "permanent_resident", "foreigner"] # @param [Date] current_date: current date used to determine permanent residency's duration # @param [Date] spr_start_date: date when the permanent residency started # @return [true, false] def applies_to?( status:, current_date:, spr_start_date:, ** ) status == "permanent_resident" && ( spr_start_date.year > current_date.year || (spr_start_date.year == current_date.year && spr_start_date.month > current_date.month) ) end # @param [Object] current_date # @param [Object] birthdate # @return [#calculator] returns the CPF calculator that matches the age. def calculator_for(current_date, birthdate:) NullContributionCalculator end end end end
Version data entries
6 entries across 6 versions & 1 rubygems