Google Script to hide rows by 2 conditions, One word and one date

Since nobody dares to dive deep into this problem (me included) for now, here is the partial solution.

This function returns true if a given date doesn't belong to current quarter:

function is_the_date_old_enough(checked_date) {

  // which quarter the date belongs
  const get_quarter_of = date => Math.ceil((date.getMonth()+1)/3); 

  // number of quarters in current date
  var cur_date = new Date();
  var cur_date_years = cur_date.getFullYear();
  var cur_date_quarts = cur_date_years * 4 + get_quarter_of(cur_date);

  // number of quarters in checked date
  var checked_date_years = checked_date.getFullYear();
  var checked_date_quarts = checked_date_years * 4 + get_quarter_of(checked_date);

  // if the difference bigger than zero
  return (cur_date_quarts - checked_date_quarts) > 0;
}

// tests  (current date: 2022-01-14)
console.log(is_the_date_old_enough(new Date()));             // false always
console.log(is_the_date_old_enough(new Date('2021-12-20'))); // true
console.log(is_the_date_old_enough(new Date('2021-09-05'))); // true
console.log(is_the_date_old_enough(new Date('2022-01-05'))); // false
console.log(is_the_date_old_enough(new Date('2000-01-05'))); // true
console.log(is_the_date_old_enough(new Date('2030-01-05'))); // false

Beware, the timezones can get you a headache for dates around first and last days of month. If you need to handle timezones it may require a more complicated solution. I suspect the variable cur_date should be defined with '00:00:00.00' time or something like that.