mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2025-02-16 16:10:54 -05:00
fix for micro second precision timestamps
timeago is now able to parse timestamps wth micro-second precision. Before timestamps like "2010-08-29 09:24:52.556066Z" resutled in an parsing error / invalid datetime object.
This commit is contained in:
parent
925b5e7041
commit
05abe2b454
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@
|
|||
},
|
||||
parse: function(iso8601) {
|
||||
var s = $.trim(iso8601);
|
||||
s = s.replace(/\.\d\d\d/,""); // remove milliseconds
|
||||
s = s.replace(/\.\d\d\d+/,""); // remove milliseconds
|
||||
s = s.replace(/-/,"/").replace(/-/,"/");
|
||||
s = s.replace(/T/," ").replace(/Z/," UTC");
|
||||
s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
|
||||
|
|
Loading…
Reference in a new issue