Fixing dates: Stop all dates from appearing as the current date/time. Fixes #820

This commit is contained in:
Dan Cryer 2015-02-25 10:33:11 +00:00
parent db90f2ea11
commit 18ff21174e

View file

@ -9,8 +9,9 @@ var PHPCI = {
$(document).ready(function () {
// Format datetimes
$('time[datetime]').each(function() {
var $this = $(this);
$this.text(moment(this.dateTime).format($this.data('format') || 'lll'));
var thisDate = $(this).attr('datetime');
var formattedDate = moment(thisDate).format($(this).data('format') || 'lll');
$(this).text(formattedDate);
});
// Update latest builds every 5 seconds: