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 jsonData = {from: Dateオブジェクト, to:Dateオブジェクト} | |
var res = JSON.stringify(jsonData, function(key, val){ | |
if (key === "from" || key === "to") { | |
return moment(new Date(val)).format('YYYY/MM/DD HH:mm:ss'); | |
} | |
return val; | |
}, "\t"); | |
※5行目のformatで時間の部分は"HH"大文字2桁にすることで24時間形式になります |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment