2020/09/13 に実行した場合
example.js
var today = new Date();//現在のdateオブジェクト
var year = today.getFullYear();//2020
var month = today.getMonth() + 1;//09 (getMonth()は1月を0とした値を返す)
var day = today.getDate();//13
Go to list of users who liked
More than 3 years have passed since last update.
2020/09/13 に実行した場合
var today = new Date();//現在のdateオブジェクト
var year = today.getFullYear();//2020
var month = today.getMonth() + 1;//09 (getMonth()は1月を0とした値を返す)
var day = today.getDate();//13
Register as a new user and use Qiita more conveniently
Go to list of users who liked