日付を文字列に変換して返します.
dateObject.toDateString()
toDateStringメソッドは日付を文字列に変換して返します. 文字列の具体的な内容は実装に依存します.
以下にtoDateStringメソッドを使用したサンプルコードを示します.
<html>
<head>
<title>toDateStringメソッドのサンプルコード</title>
</head>
<body>
<script type="text/javascript" language="javascript">
/* 本日日付を取得する */
var now = new Date();
document.write(now.toDateString() + "<br />");
</script>
</body>
</html>
サンプルコードの実行結果は以下のようになります.
Mon Dec 14 2009
スポンサード リンク