Is html5 <time> tag well supported by browsers? (What browsers)
Any Javascript function to convert “yyyy-MM-ddTHH:mm:ss” format to date object?
<time id="tt" datetime="2012-03-04T15:06:17Z">The time</time>
<script type="text/javascript">
window.onload = function() {
var tt = document.getElementById("tt");
var d = tt.datatime; //This is undefined
var s = tt.getAttribute("datetime"); //ok, return string
};
See this for a browser support table. You can use the following constructor to get a
Dateobject:See this fiddle which converts a string to date and back.