Skip to content

Instantly share code, notes, and snippets.

Created February 14, 2017 12:53
What would you like to do?
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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment