anchor.diff:              var shiftedDate = new Date();
               var timeShifted =  dateToShiftInMilliseconds + (parseInt(numberOfDaysToShift, 10)*24*60*60*1000)
               shiftedDate.setTime(timeShifted)
  -            return shiftedDate.toString();
  +
  +            var year = shiftedDate.getFullYear()
  +            var day = shiftedDate.getDate()
  +            var month = shiftedDate.getMonth()+1
  +
  +            day = (day < 10 ) ? ("0" + day) : day
  +            month = (month < 10) ? ("0" + month): month
  +            return year+"-" + month+ "-" + day;
           }
   
           function executeDelayAdvancePost() {
               var arrayOfActivities='';
  -            var mapOfParameters='';
  +            var mapOfParameters={};
               var shiftOptionForwardOrBackward = $('delayAdvanceSelector').value
               var reason = $('reason').value
               var toDate = shiftOptionForwardOrBackward*$('toDate').value
  
positive.code:                         <c:if test="${not empty day.activities}">
                              <c:forEach items="${day.activities}" var="sa">
                                  arrayOfActivities = arrayOfActivities+'${sa.gridId}'+';';
                                  var mapOfParametersForOne={
                                      '${sa.gridId}': {
                                          "reason": reason,
                                          "date": shiftedDate,
                                          "state" : '${sa.currentState}'
                                      }
                                  };
                                  mapOfParameters = mapOfParameters + mapOfParametersForOne
                              </c:forEach>
                          </c:if>
                      </c:if>
  
negative.code:             SC.asyncRequest('${collectionResource}'+'/' + arrayOfActivities, Object.extend({
                  method: 'POST',
                  contentType: 'application/json',
                  postBody: parameters
              }))
          }
  
  