Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

milliseconds should be optional #17

Merged
merged 1 commit into from

2 participants

@jmosbech

Nice and useful plugin. However, it outputs NaN on timestamps that doesn't have three millisecond digits. This pull request will fix that.

Thanks
Jonas

@poshboytl poshboytl merged commit 667da82 into pragmaticly:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 22, 2013
  1. @jmosbech
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/timeago.coffee
View
2  src/timeago.coffee
@@ -69,7 +69,7 @@ class TimeAgo
parse: (iso8601) ->
timeStr = $.trim(iso8601)
- timeStr = timeStr.replace(/\.\d\d\d+/,"")
+ timeStr = timeStr.replace(/\.\d+/,"")
timeStr = timeStr.replace(/-/,"/").replace(/-/,"/")
timeStr = timeStr.replace(/T/," ").replace(/Z/," UTC")
timeStr = timeStr.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2")
Something went wrong with that request. Please try again.