If you are going to use AngularJS, it will be much simpler and easier to convert from 1408648665 to Thu, 21 Aug 2014 19:17:45 GMT
//html <div ng-controller="TimeCtrl"> Date: {{timeStamp + '000' | date: 'medium'}} </div> //js var app = angular.module('myApp', []); app.controller('TimeCtrl', function time($scope) { $scope.timeStamp = 1408648665; console.log("hello"); });
Fiddle: http://jsfiddle.net/hq0ry1vm/2/
admix source share