Created
October 21, 2020 08:30
-
-
Save shikumiya-hata/e0763ba107180f3caa9b153eeb039537 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1年半後を取得 | |
var dt = new Date() | |
dt.setMonth(dt.getMonth() + 18) | |
// YYYY/MM/DDで出力 | |
var ymd = dt.getFullYear() + '/' + (('0' + (dt.getMonth() + 1)).slice(-2)) + '/' + (('0' + dt.getDate()).slice(-2)) | |
console.log(ymd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment