destus,
Спасибо за помощь. Вот код. Посоветуй пожалуйста, как можно сделать его более красивым.
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script>
</head>
<body>
<style>
td {
border: 1px solid black;
}
</style>
<table>
<tr>
<td>Lorem ipsum dolor sit amet</td>
<td>Velit nesciunt explicabo nam</td>
<td>19 March 2016 10:10:10 UTC</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit amet</td>
<td>Velit nesciunt explicabo nam</td>
<td>1 March 2016 10:10:10 UTC</td>
</tr>
<tr>
<td>Lorem ipsum dolor sit amet</td>
<td>Velit nesciunt explicabo nam</td>
<td>30 January 2016 10:10:10 UTC</td>
</tr>
</table>
<script>
var localTime = new Date();
alert(localTime);
$('tr td:last-child').each(function() {
var days15 = 15;
var days30 = 30;
var jj = Date.parse($(this).text());
if (Math.round((localTime-jj)/(1000 * 60 * 60 * 24) < days15)) {
$(this).css({'background-color':'green'});
}
if (Math.round((localTime-jj)/(1000 * 60 * 60 * 24) > days15)) {
$(this).css({'background-color':'yellow'});
}
if (Math.round((localTime-jj)/(1000 * 60 * 60 * 24) > days30)) {
$(this).css({'background-color':'red'});
}
});
</script>
</body>
</html>