Created
July 20, 2010 02:30
-
-
Save kyo-ago/482393 to your computer and use it in GitHub Desktop.
日付を固定長に変換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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