I'd like to loop through the elements of a table and change certain elements CSS if they are say 5 days old. The date column will be a string in the format Thu May 04 13:44:23 EDT 2017
I've gathered it should be something along these lines (for simplicity let's say if the date is before today) however I've played around a bit and can't get anything to go. jQueryUI library is available.
$(".t-data-grid").find('td').each (function() {
if(Date.parse($(this).text()) < $.datepicker.formatDate('DD, d MM, yy', new Date())) {
$(this).css('color', 'red');
}
});