Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: JavaScript を使用して DateTime に日数を追加する
今日の日付が 2012 年 5 月 12 日の場合、翌日の 2012 年 6 月 12 日の日付を表示します。それはjavascriptでどのようにコーディングされていますか?
var date = "5-12-2012"; var datum = new Date(date); datum.setDate(datum.getDate() + 1); date = datum.getDate() + "-" + (datum.getMonth() + 1) + "-" + datum.getFullYear();