--- id: 587d778c367417b2b2512aa9 title: Standardize Times with the HTML5 datetime Attribute challengeType: 0 videoUrl: '' localeTitle: 使用HTML5 datetime属性标准化Times --- ## Description
继续使用日期主题,HTML5还引入了time元素和datetime属性来标准化时间。这是一个可以在页面上包装日期或时间的内联元素。该日期的有效格式由datetime属性保存。这是辅助设备访问的值。它通过陈述标准化版本的时间来避免混淆,即使它是在文本中以非正式或口语方式编写的。以下是一个例子: <p>Master Camper Cat officiated the cage match between Goro and Scorpion <time datetime="2013-02-13">last Wednesday</time>, which ended in a draw.</p>
## Instructions
露营猫的真人快打调查结果在!在文本“9月15日星期四<sup> th </ sup>”周围包装一个time标记,并为其设置“2016-09-15”添加datetime属性。
## Tests
```yml tests: - text: 你的time标签应该包含“9月15日星期四<sup> th </ sup>”的文字。 testString: 'assert($("time").text().match(/Thursday, September 15th/g), "Your time tags should wrap around the text "Thursday, September 15<sup>th</sup>".");' - text: 您的time标记应具有非空的datetime属性。 testString: 'assert($("time").attr("datetime"), "Your time tag should have a datetime attribute that is not empty.");' - text: 您的datetime属性应设置为2016-09-15的值。 testString: 'assert($("time").attr("datetime") === "2016-09-15", "Your datetime attribute should be set to a value of 2016-09-15.");' - text: 确保您的time元素具有结束标记。 testString: 'assert(code.match(/<\/time>/g) && code.match(/<\/time>/g).length === 4, "Make sure your time element has a closing tag.");' ```
## Challenge Seed
```html

Tournaments

Mortal Kombat Tournament Survey Results

Thank you to everyone for responding to Master Camper Cat's survey. The best day to host the vaunted Mortal Kombat tournament is Thursday, September 15th. May the best ninja win!

Comments:

Posted by: Sub-Zero on

Johnny Cage better be there, I'll finish him!

Posted by: Doge on

Wow, much combat, so mortal.

Posted by: The Grim Reaper on

Looks like I'll be busy that day.

```
## Solution
```js // solution required ```