LoginSignup
1
0

More than 3 years have passed since last update.

JavaScript 現在の日付の取得

Posted at

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
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0