# Date



<table><thead><tr><th width="179">Method</th><th width="107">Description</th><th></th></tr></thead><tbody><tr><td>new Date()</td><td>現在時間</td><td><code>new Date(); // Tue Jun 04 2024 10:52:23 GMT+0800 (Taipei Standard Time)</code><br><code>new Date("2014-02-01");</code></td></tr><tr><td>new Date().getTime()</td><td>轉成數字，從 1970 開始算</td><td><code>new Date("1970-01-01").getTime() // 0</code><br><code>new Date("1970-01-02").getTime() // 86400000</code><br><br><code>24 hour * 60 min *60 sec * 1000 ms = 86400000</code></td></tr><tr><td></td><td></td><td></td></tr></tbody></table>
