time directive for AngularJS