Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
日付を固定長に変換
function YYYYMMDD (d) { return [d.getFullYear(), '0' + (d.getMonth() + 1), '0' + d.getDate()].join('-').replace(/-\d(\d\d)/g, '-$1'); };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment