Skip to content

Instantly share code, notes, and snippets.

@y16ra
Created January 30, 2015 03:49
Show Gist options
  • Save y16ra/0e8e22a6f97df4fdc003 to your computer and use it in GitHub Desktop.
Save y16ra/0e8e22a6f97df4fdc003 to your computer and use it in GitHub Desktop.
Javascriptで月末日を取得するサンプル
var today = new Date();
new Date(today.getFullYear(), today.getMonth() + 1, 0);
// error
dt.setFullYear(today.getFullYear());
dt.setMonth(today.getMonth()+1);
dt.setDate(0);
dt.getDate();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment