The best way would be to use the javascript date object. The date object in javascirpt is initialized as mm/dd/yyyy or as Date(year,month-1, date). That is,
dateString = "31.07.2012"
dateSplit = dateString.split('.')
date = new Date(dateSplit[2], dateSplit[1]-1, dateSplit[0])
date.setDate(date.getDate()+2)
newDateString = ((date.getDate() > 10) ? date.getDate() : ("0" + date.getDate())) + "." + ((date.getMonth()+1 > 10) ? date.getMonth()+1 : ("0" + (date.getMonth()+1))) + "." + (date.getFullYear())
month-1 is used in Date(year,month-1, date) because months start with 0
The result will be
"02.08.2012"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…