Get Today Date and Last Week date from current date in angularJs

0
353
    $scope.today_date = new Date().toISOString().slice(0,10); 
    $scope.lastWeek = new Date();
    $scope.lastWeek = 
    $scope.lastWeek.setDate($scope.lastWeek.getDate()-7);
    $scope.lastWeek = moment($scope.lastWeek).format('YYYY-MM-DD');

LEAVE A REPLY

Please enter your comment!
Please enter your name here