我要在从Google表格的单元格中提取的日期加上3年。我的编码当前如下所示:
var courseDate = values[row][col];
var courseDay = courseDate.getMonth();
var courseMonth = courseDate.getMonth();
var courseYear = courseDate.getYear();
var renewalDate = new Date(courseYear + 3, courseMonth, courseDay);
答案 0 :(得分:0)
var d = new Date();
var year = d.getFullYear();
var month = d.getMonth();
var day = d.getDate();
var c = new Date(year + 3, month, day)