<!DOCTYPE html>
<html>
<body>
<h2>JSON.stringify()は日付オブジェクトを文字列に変換します。</h2>
<p id="demo"></p>
<script>
const obj = {name: "John", today: new Date(), city: "New York"};
const myJSON = JSON.stringify(obj);
document.getElementById("demo").innerHTML = myJSON;
</script>
</body>
</html>