lib/data/state_pension_query.rb
# Handle the case where the person's d.o.b. is 29th Feb
# on a leap year and that the pension elligibility date falls
# on a non-leap year. ActiveSupport will helpfully adjust the 
# date back to 28th Feb, but the calculation should forward to
# the 1st March according to DWP rules.
#
Handle the case where the person's d.o.b. is 29th Feb
on a leap year and that the pension elligibility date falls
on a non-leap year. ActiveSupport will helpfully adjust the
date back to 28th Feb, but the calculation should forward to
the 1st March according to DWP rules.
Handle the case where the person ' s d . o . b . is 29th Feb on a leap year and that the pension elligibility date falls on a non - leap year . ActiveSupport will helpfully adjust the date back to 28th Feb but the calculation should forward to the 1st March according to DWP rules .
def account_for_leap_year(date)
    if leap_year_date?(dob) and !leap_year_date?(date) 
      date += 1
    end
    date
  end
def account_for_leap_year ( date ) if leap_year_date? ( dob ) and ! leap_year_date? ( date ) date += 1 end date end
Handle the case where the person's d.o.b.
Handle the case where the person ' s d . o . b .
date
<not_specific>