輸入數字返回多少天前或多少天后

Vue.prototype.$getFutureDate = function (val) { var now = new Date() var nowMs = now.getTime() var beforeMs = nowMs + 1000 * 60 * 60 * 24 * parseInt(val) var beforeDate = new Date().setTime(beforeMs)
相關文章
相關標籤/搜索