We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c1f76e + 884edf5 commit 0439148Copy full SHA for 0439148
docs/stdlib/date.md
@@ -327,6 +327,18 @@ d.toLocaleTimeString()
327
// 英文版浏览器为"12:00:00 AM"
328
```
329
330
+**(9)Date.prototype.toLocaleString()**
331
+
332
+`toLocaleString`方法返回一个字符串,代表时间的当地写法。
333
334
+```javascript
335
+var d = new Date(2013, 0, 1);
336
337
+d.toLocaleString()
338
+// 中文版浏览器为"2013年1月1日 上午12:00:00"
339
+// 英文版浏览器为"1/1/2013 12:00:00 AM"
340
+```
341
342
### get 类方法
343
344
`Date`对象提供了一系列`get*`方法,用来获取实例对象某个方面的值。
0 commit comments