Created
June 9, 2015 14:44
-
-
Save chuck0523/792d78548ac8ec05b32c 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
var time = moment(); //これで現在の時間を取得できます。 | |
time.get('year'); //今年が何年か取得 | |
time.get('y'); //これでもイケる! | |
//2015/06/09 | |
console.log(time.format('YYYY/MM/DD')); | |
//11:44:16 | |
console.log(time.format('hh:mm:ss')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment