(function (app) {
	'use strict';
	app.directive('date', function () {
		return {
			restrict: 'E',
			templateUrl: 'app/directives/date/dateTmpl.html',
			scope: {},
			replace: true,
			terminal: false,
			controller: function ($scope,$timeout) {
				var updateTime=function () {
					var d = new Date();
					$scope.time = d.getTime();
					$scope.day = d.getDay();
					$timeout(updateTime,1000,true);
				};
				updateTime();
			}
		};
	});
})(personalPageApp);
