Files
freeCodeCamp/guide/chinese/javascript/standard-objects/date/date-now/index.md
2018-10-16 21:32:40 +05:30

24 lines
379 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Date Now
localeTitle: 现在日期
---
## 现在日期
Date.now方法返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
### 句法
```js
var timeInMs = Date.now();
```
### 例
```js
Date.now();
// 1508783660969
```
#### 更多信息:
[MDN文档](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now)