function moveToOld(currentTasks, newid) {
    var now = new Date().getTime();
    var spendedTime = now - currentTasks.current.date;
    var moveToOld = {
      id : currentTasks.current.id,
      name : currentTasks.current.name,
      date : currentTasks.current.date,
      totalSpended : spendedTime,
      removed: false
    }
    currentTasks.oldTasks.push(moveToOld);
    currentTasks.lastTaskId = newid;
    chrome.storage.local.set({'tasks': currentTasks});
    sendBadge();
  }
/**
   * move task to old task
   * @function moveToOld
   * @memberof popupjs
   */
move task to old task
@function moveToOld
@memberof popupjs
move task to old task @function moveToOld @memberof popupjs
function moveToOld(currentTasks, newid) {
    var now = new Date().getTime();
    var spendedTime = now - currentTasks.current.date;
    var moveToOld = {
      id : currentTasks.current.id,
      name : currentTasks.current.name,
      date : currentTasks.current.date,
      totalSpended : spendedTime,
      removed: false
    }
    currentTasks.oldTasks.push(moveToOld);
    currentTasks.lastTaskId = newid;
    chrome.storage.local.set({'tasks': currentTasks});
    sendBadge();
  }
function moveToOld ( currentTasks , newid ) { var now = new Date ( ) . getTime ( ) ; var spendedTime = now - currentTasks . current . date ; var moveToOld = { id : currentTasks . current . id , name : currentTasks . current . name , date : currentTasks . current . date , totalSpended : spendedTime , removed : false } currentTasks . oldTasks . push ( moveToOld ) ; currentTasks . lastTaskId = newid ; chrome . storage . local . set ( { 'tasks' : currentTasks } ) ; sendBadge ( ) ; }
move task to old task
 @function moveToOld
 @memberof popupjs
move task to old task @function moveToOld @memberof popupjs