mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-02-17 00:20:32 -05:00
parent
c4a132d6b2
commit
500b808f7b
2 changed files with 7 additions and 0 deletions
|
@ -107,6 +107,7 @@
|
|||
s = s.replace(/-/,"/").replace(/-/,"/");
|
||||
s = s.replace(/T/," ").replace(/Z/," UTC");
|
||||
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
|
||||
s = s.replace(/([\+\-]\d\d)$/," $100"); // +09 -> +0900
|
||||
return new Date(s);
|
||||
},
|
||||
datetime: function(elem) {
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
<li><abbr id="testParsing9" class="todate" title="1978-12-18 17:17:00.021432Z"></abbr> [from Z with microseconds]</li>
|
||||
<li><abbr id="testParsing10" class="todate" title="1978-12-18 17:17:00.0Z"></abbr> [from Z with tenths of a second]</li>
|
||||
<li><abbr id="testParsing11" class="todate" title="1978-12-18 17:17:00.02Z"></abbr> [from Z with hundreths of a second]</li>
|
||||
<li><abbr id="testParsing12" class="todate" title="1978-12-19T02:17:00+09"></abbr> [from +09]</li>
|
||||
</ul>
|
||||
|
||||
<h2>Wording</h2>
|
||||
|
@ -400,6 +401,11 @@
|
|||
ok((time.html().match(correctMatch)), "Incorrectly parsed " + time.attr("title"));
|
||||
});
|
||||
|
||||
test("From +09", function () {
|
||||
var time = $("#testParsing12");
|
||||
ok((time.html().match(correctMatch)), "Incorrectly parsed " + time.attr("title"));
|
||||
});
|
||||
|
||||
module("Wording");
|
||||
|
||||
test("-120 min", function () {
|
||||
|
|
Loading…
Reference in a new issue