Created
October 24, 2014 20:26
-
-
Save infurno/6122e9be5ea9c7f00c6b to your computer and use it in GitHub Desktop.
filter to convert string date to pretty date in Angularjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.filter('dateFormat', function($filter) | |
| { | |
| return function(input) | |
| { | |
| if(input == null){ return ""; } | |
| var _date = $filter('date')(new Date(input), 'MMM dd yyyy'); | |
| return _date.toUpperCase(); | |
| }; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment