anchor.diff:              return new Date(year, month.toString(), day);
           }
   
  -        function shiftDateByNumberOfDays(dateToShift, numberOfDaysToShift) {
  +        function shiftDateByNumberOfDays(dateToShiftInMilliseconds, numberOfDaysToShift) {
               var shiftedDate = new Date();
  -            var timeShifted =  dateToShift + (parseInt(numberOfDaysToShift, 10)*24*60*60*1000)
  +            var timeShifted =  dateToShiftInMilliseconds + (parseInt(numberOfDaysToShift, 10)*24*60*60*1000)
               shiftedDate.setTime(timeShifted)
               return shiftedDate.toString();
           }
  
positive.code:                 reason = $$('#new-reason-input-group input')[0].value
              }
  
              var params= {
                  "reason": reason,
                  "date": toDate,
                  "currentDate": "",
                  "state" : state
              }
              return Object.toJSON(params)
          }
  
          function executeMarkPost() {
              var arrayOfActivities='';
              var events = $$('.event')
              for(var i = 0; i< events.length; i++ ){
                  if (events[i].checked){
                      arrayOfActivities = arrayOfActivities+events[i].value+';'
                  }
              }
              post(arrayOfActivities, gatherDataFromMarkForm())
          }
  
          function post(arrayOfActivities, parameters) {
  
negative.code:                                 <ul>
                                      <c:forEach items="${day.activities}" var="sa">
                                          <c:set var="study" value="${sa.scheduledStudySegment.scheduledCalendar.assignment.studySite.study}"/>
                                          <li class="${sa.currentState.mode.displayName}">
                                              <input type="checkbox" value="${sa.gridId}" name="events" class="event <c:if test="${sa.conditionalState}">conditional-event</c:if>
                                              <c:if test="${(sa.conditionalState || sa.scheduledState) && day.date < sa.scheduledStudySegment.todayDate}">past-due-event</c:if>"/>
                                              <img src="<c:url value="/images/${sa.currentState.mode.name}.png"/>" alt="Status: ${sa.currentState.mode.name}"/>
  