Skip to content

Instantly share code, notes, and snippets.

@shikumiya-hata
Created October 21, 2020 08:32
Show Gist options
  • Save shikumiya-hata/c070ba4f4c26ae43ebec9805b933b605 to your computer and use it in GitHub Desktop.
Save shikumiya-hata/c070ba4f4c26ae43ebec9805b933b605 to your computer and use it in GitHub Desktop.
// 1年半後を取得
var dt = moment().add(18, 'months')
// 1年半後をYYYY/MM/DDで出力
var ymd = dt.format("YYYY/MM/DD")
console.log(ymd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment