I have a table that is statically generated similar to below:
<table>
<tr><td> Thing 1 </td><td> 2021-06-01 </td></tr>
<tr><td> Thing 2 </td><td> 2021-06-01 </td></tr>
<tr><td> Thing 3 </td><td> 2021-06-01 </td></tr>
</table>
I would like to highlight any date that is 'today' or potentially alter the text to say 'Today' or 'n Days Ago'. I'm assuming I need a function that iterates through the dates and alters/highlights them in some way.
The HTML is generated every 3 days so I cannot generate the 'today' value but I do control this generation. I do not know when users will look at the page so it might be day 3 for example so the JS needs to do the work.
Any tips? This is my first post so apologies for any mistakes in posting. I am not using JQuery but am using Bootstrap 4 and the popper.js. I am a relative noob to JS.