mirror of
https://github.com/correl/melpa.git
synced 2024-12-23 19:19:51 +00:00
Fix display of build timestamp ("44 years ago"...)
This commit is contained in:
parent
f76802440d
commit
054de9860a
2 changed files with 5 additions and 3 deletions
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="alert alert-success">
|
||||
<strong>Latest build:</strong> <span ng-controller="BuildStatusCtrl">{{buildStatus.completed | relativeTime}}</span>
|
||||
<strong>Latest build:</strong> <span ng-controller="BuildStatusCtrl">{{completionTime | relativeTime}}</span>
|
||||
</div>
|
||||
<a class="twitter-timeline" data-dnt="true" data-related="milkypostman,sanityinc" href="https://twitter.com/melpa_emacs" data-widget-id="311867756586864640">Tweets by @melpa_emacs</a>
|
||||
</div>
|
||||
|
|
|
@ -137,7 +137,9 @@
|
|||
};
|
||||
|
||||
app.controller('BuildStatusCtrl', function($scope, packageService) {
|
||||
$scope.buildStatus = packageService.buildStatus();
|
||||
packageService.buildStatus().then(function(status) {
|
||||
$scope.completionTime = new Date(status.completed * 1000);
|
||||
});
|
||||
});
|
||||
|
||||
app.controller('AppCtrl', function($scope, $rootScope, $route) {
|
||||
|
@ -220,7 +222,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
app.filter('relativeTime', function() {
|
||||
return function(val) {
|
||||
return val && moment(new Date(val)).fromNow();
|
||||
return val && moment(val).fromNow();
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue