How to get total days of a month of a year.

How to get total days of a month of a year via angularjs.

 $scope.month = 10;  
 $scope.year = 2015;  
 // Get total days of Oct 2015  
 $scope.totalDays = new Date($scope.year, $scope.month, 0).getDate();  

totalDays = 31;


No comments:

Post a Comment

Popular Posts