Last active
August 29, 2015 14:07
-
-
Save dam1/e36accb1a92be1cf39e1 to your computer and use it in GitHub Desktop.
This file contains 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
// custom filter to convert a number to a Day of Week String | |
angular.module('filters', []). | |
filter('toDateString', function() { | |
return function (day) { | |
var str = dayOfWeekAsString(day); | |
return str; | |
} | |
function dayOfWeekAsString(dayIndex) { | |
return ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"][dayIndex]; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment