Why won't howOld() function work?

So I swear that I completed this JavaScript code challenge and yet it won’t accept my code. I even had my code peer reviewed. What am I doing wrong with this code? Is it doing something other than what codeacademy wants?

var date = new Date();
var currentYear = date.getFullYear();
function howOld(age, year) {
  if (year > currentYear) {
      var ageAtYear = year - (currentYear - age);
      return `You will be ${ageAtYear} in the year ${year}`; 
  } else if (year < currentYear && (currentYear - age) > year) { 
      var yearsBeforeBorn = (currentYear - age) - year;
      return `The year ${year} was ${yearsBeforeBorn} years before you were born`;
  } else {
    return `You were ${age} in the year ${year}.`;

What is it about my code that code academy doesn’t want to accept? Doesn’t that technically complete the code challenge? If it doesn’t, just let me know what I’m doing wrong or don’t get but I revised my code A LOT to get to this so clearly I am not getting something if this doesn’t work.

You’re not accomplishing the task correctly. I modified your code a little and it is accepted by codecademy. Make sure to follow the hints that you get.