You can use angular filter concept , you can modify this to further to achieve your goal
angular.module('yourmodule').filter('hbdate', function($filter)
{
return function(input)
{
if(input == null){ return ""; }
var _date = $filter('date')(new Date(input), 'MMM dd yyyy');
if{
your condition
}
return _date.toUpperCase();
};
});