title: Highlight a datatable row if its less than current year
body: <p>Currently, working on datatables but I need to highlight a row if its less than the current year for example &lt; 2021 or the next year &lt; 2022.
  I was able to make it work inputting the exact year inside the code but I need it to be dynamic. Like if its already 2022 I want it to be  &quot;&lt; 2022&quot; so on and so forth.</p>
  <p>Here's my code:</p>
  <pre><code>&quot;rowCallback&quot;: function(row, data, dataIndex ) {
          var y = new Date();
          if(data[&quot;or_number&quot;] == &quot;0&quot;){
              $('td', row).css('background-color', 'red');
          }
          if(data[&quot;year&quot;] &lt; &quot;2021&quot;){
              $('td', row).css('background-color', 'red');
          }
      },
  </code></pre>
  <p>Output:</p>
  <p><a href="https://i.stack.imgur.com/xiISL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xiISL.png" alt="year &lt; 2021" /></a></p>