Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN years ago on all IE versions #35

Closed
xcellenceit opened this issue Mar 10, 2011 · 3 comments
Closed

NaN years ago on all IE versions #35

xcellenceit opened this issue Mar 10, 2011 · 3 comments

Comments

@xcellenceit
Copy link

I'm using your script for displaying time ago for latest tweet.

It works like charm on all browsers except IE. It doesn't work on any version of IE. On IE, it is displayed NaN years ago.

Here is the URL, I'm waiting for your reply on how to fix this.

http://projects.xcellence-it.com/HotHouse/

Thanks in advance,
Xcellence-IT
http://www.xcellence-it.com/

@rmm5t
Copy link
Owner

rmm5t commented Mar 10, 2011

This has nothing to do with Timeago. It has to do with the fact that IE
sucks at parsing Dates. Hell, javascript in general stinks at parsing
Dates. You're passing a Date object to timeago. You need to make sure it's
valid first.

For example, try this in IE:

alert(new Date("Tue Mar 01 16:25:52 +0000 2011"))

IE just doesn't understand the Date format that Twitter passes back. You
might want to try stripping out the timezone offset first. IE should be able
to parse a date without that.

@rmm5t
Copy link
Owner

rmm5t commented Mar 10, 2011

Closing as a non-issue with timeago.

@xcellenceit
Copy link
Author

Thank you, it helped me to solve the issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants