aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/date
diff options
context:
space:
mode:
authorIrvin <irvinfly@gmail.com>2022-02-16 02:07:31 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitd9e9adb5f80a819fe46349bcf6d1faec734b09cd (patch)
treee856dc5e31aad0a7d5e8c2f98c9ee139d9569a86 /files/zh-cn/web/javascript/reference/global_objects/date
parent7c2556fe79c44d7c31108b8c8b048d2b7704a95e (diff)
downloadtranslated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.tar.gz
translated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.tar.bz2
translated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.zip
remove span tag in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/date')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/date/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getday/index.html8
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/gethours/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getmilliseconds/index.html6
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getminutes/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/getseconds/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/now/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/parse/index.html24
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/setfullyear/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/setutcfullyear/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/tolocaledatestring/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/tolocalestring/index.html4
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/date/tolocaletimestring/index.html4
15 files changed, 42 insertions, 42 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/date/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/date/index.html
index 2b1e77c4b3..f97d377482 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/date/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/date/index.html
@@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/Date
---
<div>{{JSRef}}</div>
-<p><span class="seoSummary">Creates a JavaScript <strong><code>Date</code></strong> instance that represents a single moment in time in a platform-independent format.</span> <code>Date</code> objects contain a <code>Number</code> that represents milliseconds since 1 January 1970 UTC.</p>
+<p>Creates a JavaScript <strong><code>Date</code></strong> instance that represents a single moment in time in a platform-independent format. <code>Date</code> objects contain a <code>Number</code> that represents milliseconds since 1 January 1970 UTC.</p>
<div>{{EmbedInteractiveExample("pages/js/date-constructor.html")}}</div>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html
index 17608a744f..4bbfc8ad23 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/getdate/index.html
@@ -27,12 +27,12 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDate
<h3 id="Example:_Using_getDate" name="Example:_Using_getDate">例子: 使用getDate()<code>方法</code></h3>
-<p>下面第二条语句将值25赋给 day 变量,该值<span style="line-height: 1.5;">基于日期对象 </span><code style="font-style: normal; line-height: 1.5;">Xmax95</code><span style="line-height: 1.5;">的值。</span></p>
+<p>下面第二条语句将值25赋给 day 变量,该值基于日期对象 <code style="font-style: normal; line-height: 1.5;">Xmax95</code>的值。</p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:00"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-<span class="keyword token" style="color: #0077aa;">var</span> day <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getDate<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:00");
+var day = Xmas95.getDate();
-<span class="function token">alert<span class="punctuation token" style="color: #999999;">(</span></span>day<span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span><span class="comment token" style="color: #708090; display: inherit;"> // 25</span></code></pre>
+alert(day); // 25</code></pre>
<h2 id="规范" style="margin-bottom: 20px; line-height: 30px;">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getday/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getday/index.html
index 86badcff49..e9b18b852e 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/getday/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/getday/index.html
@@ -26,10 +26,10 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay
<p>下面第二条语句,基于{{jsxref("Date")}}对象 <code>Xmas95</code> 的值,把 1 赋值给 <code>weekday</code>。也就是说1995年12月25日是星期一。</p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:30"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-<span class="keyword token" style="color: #0077aa;">var</span> weekday <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getDay<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:30");
+var weekday = Xmas95.getDay();
-<span class="function token">console.log<span class="punctuation token" style="color: #999999;">(</span></span>weekday<span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span><span class="comment token" style="color: #708090; display: inherit;"> // 1</span></code></pre>
+console.log(weekday); // 1</code></pre>
<div class="blockIndicator note">
<p dir="ltr">注意:如果需要,可以使用{{jsxref("DateTimeFormat", "Intl.DateTimeFormat")}}与一个额外的<code>options</code> 参数,从而返回这天的全称(如<code>"Monday"</code>).使用此方法,结果会更加国际化:</p>
@@ -51,7 +51,7 @@ console.log(new Intl.DateTimeFormat('de-DE', options).format(Xmas95));
<th scope="col">注解</th>
</tr>
<tr>
- <td>{{SpecName('ESDraft', '#sec-date.prototype.getday', 'Date.prototype.getDay')}}<span class="hidden"> </span><span class="hidden"> </span></td>
+ <td>{{SpecName('ESDraft', '#sec-date.prototype.getday', 'Date.prototype.getDay')}}  </td>
<td>{{Spec2('ESDraft')}}  </td>
<td></td>
</tr>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/gethours/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/gethours/index.html
index c15bc0f6cf..eb8ad854e1 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/gethours/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/gethours/index.html
@@ -29,10 +29,10 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getHours
<p>下面第二条语句,基于日期对象 <code>Xmas95 </code>的值,把 23 赋值给了变量 <code>hours。</code></p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:00"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-<span class="keyword token" style="color: #0077aa;">var</span> hours <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getHours<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:00");
+var hours = Xmas95.getHours();
-<span class="function token">alert<span class="punctuation token" style="color: #999999;">(</span></span>hours<span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span><span class="comment token" style="color: #708090; display: inherit;"> // 23</span></code></pre>
+alert(hours); // 23</code></pre>
<h2 id="规范" style="margin-bottom: 20px; line-height: 30px;">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getmilliseconds/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getmilliseconds/index.html
index db20141cc4..15d556779d 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/getmilliseconds/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/getmilliseconds/index.html
@@ -29,9 +29,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds
<p>下例中,将当前时间的毫秒数赋值给变量 <code>ms</code>。</p>
-<pre class="brush: js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> ms<span class="punctuation token" style="color: #999999;">;</span>
-Today <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-ms <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Today<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getMilliseconds<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span></code></pre>
+<pre class="brush: js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var ms;
+Today = new Date();
+ms = Today.getMilliseconds();</code></pre>
<h2 id="规范" style="margin-bottom: 20px; line-height: 30px;">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getminutes/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getminutes/index.html
index 5bcbcfc724..7a1fd0f433 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/getminutes/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/getminutes/index.html
@@ -27,8 +27,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMinutes
<p>下例中,第二行语句运行过后,变量 <code>minutes </code>的值为15,也就是说 <code>Xmas95 </code>这个日期对象的值为某时15分某秒。</p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:00"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-<span class="keyword token" style="color: #0077aa;">var</span> minutes <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getMinutes<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span></code></pre>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:00");
+var minutes = Xmas95.getMinutes();</code></pre>
<p dir="ltr"><strong style="font-size: 2.142857142857143rem; font-weight: 700; letter-spacing: -1px; line-height: 30px;">规范</strong></p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/getseconds/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/getseconds/index.html
index 83a899886e..457f166047 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/getseconds/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/getseconds/index.html
@@ -29,8 +29,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getSeconds
<p>下面第二条语句,基于日期对象 <code>Xmas95</code> 的值,把 30 赋值给变量 <code>secs</code>。</p>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> Xmas95 <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="string token" style="color: #669900;">"December 25, 1995 23:15:30"</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-<span class="keyword token" style="color: #0077aa;">var</span> secs <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> Xmas95<span class="punctuation token" style="color: #999999;">.</span><span class="function token">getSeconds<span class="punctuation token" style="color: #999999;">(</span></span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span></code></pre>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var Xmas95 = new Date("December 25, 1995 23:15:30");
+var secs = Xmas95.getSeconds();</code></pre>
<div class="line-number" style="margin-top: 1em; position: absolute; left: 0px; right: 0px; line-height: inherit; top: 0px; background: transparent;"> </div>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/now/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/now/index.html
index b7153612a2..fd0c8dd482 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/now/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/now/index.html
@@ -30,9 +30,9 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/now
<p>因为 <code>now()</code> 是 {{jsxref("Date")}} 的一个静态函数,所以必须以 <code>Date.now()</code> 的形式来使用。</p>
-<h2 id="时间精度被降低"><span class="tlid-translation translation" lang="zh-CN"><span title="">时间精度被降低</span></span></h2>
+<h2 id="时间精度被降低">时间精度被降低</h2>
-<p><span class="tlid-translation translation" lang="zh-CN"><span title="">为了提供针对定时攻击和指纹追踪的保护,</span></span><code>Date.now()</code> <span class="tlid-translation translation" lang="zh-CN"><span title="">的精度可能会根据浏览器的高级设置项目而被取整。</span></span><br>
+<p>为了提供针对定时攻击和指纹追踪的保护,<code>Date.now()</code> 的精度可能会根据浏览器的高级设置项目而被取整。<br>
在 Firefox 中,默认启用 <code>privacy.reduceTimerPrecision</code> 设置项,在 Firefox 59 中,默认被取整至 20 微秒;在 Firefox 60 中,则被取整至 2 毫秒。</p>
<pre class="brush: js">// reduced time precision (2ms) in Firefox 60
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/parse/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/parse/index.html
index 701f6fc103..9646b069da 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/parse/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/parse/index.html
@@ -52,7 +52,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/parse
<p>由于在解析日期字符串时存在偏差会导致结果不一致,因此推荐始终手动解析日期字符串,特别是不同的ECMAScript实现会把诸如“2015-10-12 12:00:00”的字符串解析为NaN,UTC或者本地时间。</p>
-<h3 id="ECMAScript_5_ISO-8601_日期格式支持">ECMAScript 5 <span class="caps">ISO</span>-8601 日期格式支持</h3>
+<h3 id="ECMAScript_5_ISO-8601_日期格式支持">ECMAScript 5 ISO-8601 日期格式支持</h3>
<p>另外,日期时间字符串也可以使用 <a href="http://www.w3.org/TR/NOTE-datetime" title="http://www.w3.org/TR/NOTE-datetime">ISO 8601</a> 格式。例如,"<code>2011-10-10</code>" (仅日期)或 "<code>2011-10-10T14:48:00</code>" (日期和时间)能够作为参数被传递和解析。 如果参数字符串只包含日期格式,那么将会使用UTC时区来解析该参数。而如果是<a href="http://www.w3.org/TR/NOTE-datetime" title="http://www.w3.org/TR/NOTE-datetime">ISO 8601</a> 格式中规定的时间加日期的格式,则将会被作为本地时区处理。</p>
@@ -70,26 +70,26 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/parse
<p>但是, 在如 ECMA-262 规范中定义的情况,如果因为无效值而导致日期字符串不能被识别为 ISO 格式时,根据浏览器和给定的值不同,返回值可以是,也可以不是 {{jsxref("NaN")}} 。比如:</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="comment token">// 包含无效值的非 ISO 格式字符串</span>
-<span class="keyword token">new</span> <span class="class-name token">Date</span><span class="punctuation token">(</span><span class="string token">'23/25/2014'</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre>
+<pre class="brush: js line-numbers language-js"><code class="language-js">// 包含无效值的非 ISO 格式字符串
+new Date('23/25/2014');</code></pre>
<p>在 Firefox 30 中会被识别为本地时区的2015年12月25日,而在 Safari 7 中则是无效日期。但是,如果字符串被识别为 ISO 格式并且包含无效值,则在所有遵循 ES5 或者更新标准的浏览器中都会返回 {{jsxref("NaN")}} 。</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="comment token">// 包含无效值的 ISO 格式字符串</span>
-<span class="keyword token">new</span> <span class="class-name token">Date</span><span class="punctuation token">(</span><span class="string token">'2014-25-23'</span><span class="punctuation token">)</span><span class="punctuation token">.</span><span class="function token">toISOString</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
-<span class="comment token">// 在所有遵循 ES5的浏览器中返回 "RangeError: invalid date"</span></code></pre>
+<pre class="brush: js line-numbers language-js"><code class="language-js">// 包含无效值的 ISO 格式字符串
+new Date('2014-25-23').toISOString();
+// 在所有遵循 ES5的浏览器中返回 "RangeError: invalid date"</code></pre>
<p>SpiderMonkey 的引擎策略可以在 <a href="http://mxr.mozilla.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889"><code>jsdate.cpp</code></a>  中找到。字符串 <code>"10 06 2014"</code>  可以作为非 ISO 格式字符串使用自定义处理方式的例子。参见这篇关于解析如何进行的<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6">粗略纲要</a>。</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">new</span> <span class="class-name token">Date</span><span class="punctuation token">(</span><span class="string token">'10 06 2014'</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre>
+<pre class="brush: js line-numbers language-js"><code class="language-js">new Date('10 06 2014');</code></pre>
<p>将会被解析为本地时间 2014年10月6日,而不是6月10日。另一个例子</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">new</span> <span class="class-name token">Date</span><span class="punctuation token">(</span><span class="string token">'foo-bar 2014'</span><span class="punctuation token">)</span><span class="punctuation token">.</span><span class="function token">toString</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
-<span class="comment token">// 返回: "Invalid Date"</span>
+<pre class="brush: js line-numbers language-js"><code class="language-js">new Date('foo-bar 2014').toString();
+// 返回: "Invalid Date"
-Date<span class="punctuation token">.</span><span class="function token">parse</span><span class="punctuation token">(</span><span class="string token">'foo-bar 2014'</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
-<span class="comment token">// 返回: NaN</span></code></pre>
+Date.parse('foo-bar 2014');
+// 返回: NaN</code></pre>
<h2 id="Examples" name="Examples">例子</h2>
@@ -97,7 +97,7 @@ Date<span class="punctuation token">.</span><span class="function token">parse</
<p>如果 <code>IPOdate</code> 是一个已经存在的 {{jsxref("Date")}} 对象,则可以把其设置为本地时间 1995年8月9日。如下:</p>
-<pre class="brush: js line-numbers language-js"><code class="language-js">IPOdate<span class="punctuation token">.</span><span class="function token">setTime</span><span class="punctuation token">(</span>Date<span class="punctuation token">.</span><span class="function token">parse</span><span class="punctuation token">(</span><span class="string token">'Aug 9, 1995'</span><span class="punctuation token">)</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre>
+<pre class="brush: js line-numbers language-js"><code class="language-js">IPOdate.setTime(Date.parse('Aug 9, 1995'));</code></pre>
<p>其他一些解析非标准格式日期的例子:</p>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/setfullyear/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/setfullyear/index.html
index 72a0583a2d..ad8ffc0c33 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/setfullyear/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/setfullyear/index.html
@@ -36,8 +36,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setFullYear
<h3 id="Example:_Using_setFullYear" name="Example:_Using_setFullYear">例子:使用<code>setFullYear</code>方法</h3>
-<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;"><span class="keyword token" style="color: #0077aa;">var</span> theBigDay <span class="operator token" style="background: rgba(255, 255, 255, 0.498039); color: #a67f59;">=</span> <span class="keyword token" style="color: #0077aa;">new</span> <span class="class-name token">Date</span><span class="punctuation token" style="color: #999999;">(</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span>
-theBigDay<span class="punctuation token" style="color: #999999;">.</span><span class="function token">setFullYear<span class="punctuation token" style="color: #999999;">(</span></span><span class="number token" style="color: #990055;">1997</span><span class="punctuation token" style="color: #999999;">)</span><span class="punctuation token" style="color: #999999;">;</span></code></pre>
+<pre class="brush:js language-js" style="padding: 1em 0px 1em 30px; border-left-width: 6px; border-left-style: solid; font-family: Consolas, Monaco, 'Andale Mono', monospace; font-size: 14px; text-shadow: none; direction: ltr; white-space: normal; background-color: rgba(234, 239, 242, 0.247059);"><code class="language-js" style="font-family: Consolas, Monaco, 'Andale Mono', monospace; color: inherit; text-shadow: none; direction: ltr; white-space: pre;">var theBigDay = new Date();
+theBigDay.setFullYear(1997);</code></pre>
<h2 id="规范">规范</h2>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
index 5b0315f92d..43786dadd9 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/sethours/index.html
@@ -13,7 +13,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/setHours
<h2 id="Syntax" name="Syntax">语法</h2>
-<pre class="syntaxbox">dateObj.setHours(<em>hoursValue</em>[, <em>minutesValue</em>[, <em>secondsValue</em><span style="line-height: normal;">[</span><span style="line-height: normal;">, </span><em>msValue</em><span style="line-height: normal;">]]])</span>
+<pre class="syntaxbox">dateObj.setHours(<em>hoursValue</em>[, <em>minutesValue</em>[, <em>secondsValue</em>[, <em>msValue</em>]]])
</pre>
<h3 id="Versions_prior_to_JavaScript_1.3" name="Versions_prior_to_JavaScript_1.3">JavaScript 1.3版本之前</h3>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/setutcfullyear/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/setutcfullyear/index.html
index 9d448b59df..fd83af1c4e 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/setutcfullyear/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/setutcfullyear/index.html
@@ -84,7 +84,7 @@ theBigDay.setUTCFullYear(1997);
<p>{{Compat("javascript.builtins.Date.setUTCFullYear")}}</p>
</div>
-<p><span style="font-size: 30.002px; letter-spacing: -1px; line-height: 30.002px;"><strong>相关连接</strong></span></p>
+<p><strong>相关连接</strong></p>
<ul>
<li>{{jsxref("Date.prototype.getUTCFullYear()")}}</li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/tolocaledatestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/tolocaledatestring/index.html
index 3089a5fb63..407050f518 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/tolocaledatestring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/tolocaledatestring/index.html
@@ -73,7 +73,7 @@ alert(date.toLocaleDateString("ko-KR"));
// Arabic in most Arabic speaking countries uses real Arabic digits
alert(date.toLocaleDateString("ar-EG"));
-// → "<span dir="rtl">٢٠‏/١٢‏/٢٠١٢</span>"
+// → "٢٠‏/١٢‏/٢٠١٢"
// for Japanese, applications may want to use the Japanese calendar,
// where 2012 was the year 24 of the Heisei era
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/tolocalestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/tolocalestring/index.html
index be2e721ee2..3c9ecb2a58 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/tolocalestring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/tolocalestring/index.html
@@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/toLocaleString
---
<div>{{JSRef("Global_Objects", "Date")}}</div>
-<p><code><strong>toLocaleString()</strong></code> <span style="line-height: 1.5;">方法返回该日期对象的字符串,该字符串格式因不同语言而不同。新增的参数 </span><code style="font-style: normal; line-height: 1.5;">locales</code><span style="line-height: 1.5;"> 和 </span><code style="font-style: normal; line-height: 1.5;">options</code><span style="line-height: 1.5;"> 使程序能够指定使用哪种语言格式化规则,允许定制该方法的表现(behavior)。在旧版本浏览器中, </span><code style="font-style: normal; line-height: 1.5;">locales</code><span style="line-height: 1.5;"> 和 </span><code style="font-style: normal; line-height: 1.5;">options</code><span style="line-height: 1.5;"> 参数被忽略,使用的语言环境和返回的字符串格式是各自独立实现的。</span></p>
+<p><code><strong>toLocaleString()</strong></code> 方法返回该日期对象的字符串,该字符串格式因不同语言而不同。新增的参数 <code style="font-style: normal; line-height: 1.5;">locales</code> 和 <code style="font-style: normal; line-height: 1.5;">options</code> 使程序能够指定使用哪种语言格式化规则,允许定制该方法的表现(behavior)。在旧版本浏览器中, <code style="font-style: normal; line-height: 1.5;">locales</code> 和 <code style="font-style: normal; line-height: 1.5;">options</code> 参数被忽略,使用的语言环境和返回的字符串格式是各自独立实现的。</p>
<div>{{EmbedInteractiveExample("pages/js/date-tolocalestring.html")}}</div>
@@ -75,7 +75,7 @@ alert(date.toLocaleString("ko-KR"));
// 大多数阿拉伯语国家的阿拉伯语使用阿拉伯数字
alert(date.toLocaleString("ar-EG"));
-// → "<span dir="rtl">٢٠‏/١٢‏/٢٠١٢ ٥:٠٠:٠٠ ص</span>"
+// → "٢٠‏/١٢‏/٢٠١٢ ٥:٠٠:٠٠ ص"
//在日本,应用可能想要使用日本日历,
//2012 是平成24年(平成是是日本天皇明仁的年号,由1989年1月8日起开始计算直至现在)
diff --git a/files/zh-cn/web/javascript/reference/global_objects/date/tolocaletimestring/index.html b/files/zh-cn/web/javascript/reference/global_objects/date/tolocaletimestring/index.html
index c19d137c7a..2f31d53e2d 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/date/tolocaletimestring/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/date/tolocaletimestring/index.html
@@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString
---
<div>{{JSRef("Global_Objects", "Date")}}</div>
-<p>The <code><strong>toLocaleTimeString()</strong></code> <span style="line-height: 1.5;">方法返回该日期对象时间部分的字符串,该字符串格式因不同语言而不同。新增的参数 </span><code style="font-style: normal; line-height: 1.5;">locales</code><span style="line-height: 1.5;"> 和 </span><code style="font-style: normal; line-height: 1.5;">options</code><span style="line-height: 1.5;"> 使程序能够指定使用哪种语言格式化规则,允许定制该方法的表现(behavior)。在旧版本浏览器中, </span><code style="font-style: normal; line-height: 1.5;">locales</code><span style="line-height: 1.5;"> 和 </span><code style="font-style: normal; line-height: 1.5;">options</code><span style="line-height: 1.5;"> 参数被忽略,使用的语言环境和返回的字符串格式是各自独立实现的。</span></p>
+<p>The <code><strong>toLocaleTimeString()</strong></code> 方法返回该日期对象时间部分的字符串,该字符串格式因不同语言而不同。新增的参数 <code style="font-style: normal; line-height: 1.5;">locales</code> 和 <code style="font-style: normal; line-height: 1.5;">options</code> 使程序能够指定使用哪种语言格式化规则,允许定制该方法的表现(behavior)。在旧版本浏览器中, <code style="font-style: normal; line-height: 1.5;">locales</code> 和 <code style="font-style: normal; line-height: 1.5;">options</code> 参数被忽略,使用的语言环境和返回的字符串格式是各自独立实现的。</p>
<div>{{EmbedInteractiveExample("pages/js/date-tolocaletimestring.html")}}</div>
@@ -73,7 +73,7 @@ alert(date.toLocaleTimeString("ko-KR"));
// Arabic in most Arabic speaking countries uses real Arabic digits
alert(date.toLocaleTimeString("ar-EG"));
-// → "<span dir="rtl">٧:٠٠:٠٠ م</span>"
+// → "٧:٠٠:٠٠ م"
// when requesting a language that may not be supported, such as
// Balinese, include a fallback language, in this case Indonesian