With Angular's date filter, I can easily retrieve the current day, year, and month using $filter.
However, is there a way to access the next and previous days, years, and months as well?
I attempted to write this code but I'm unsure of how to proceed:
$scope.month = $filter('date')(date, 'MMMM');//Returns December or November
$scope.day = $filter('date')(date, 'dd'); //Returns 01-31 respectively
$scope.year = $filter('date')(date,'yyyy');//Returns 2014
$scope.nextYear = Number($scope.year) + 1;
$scope.prevYear = Number($scope.year) - 1;
$scope.nextDay = ?
etc...
Any suggestions on how to achieve this functionality?