jquery-rss icon indicating copy to clipboard operation
jquery-rss copied to clipboard

"Invalid date" in IE8

Open faeldray opened this issue 9 years ago • 7 comments

I would really like to ignore IE8 but unfortunately I'm working on a corporate site and IE8 is still in use in that sector.

The issue is that when viewing this script in IE8, the date appears as "Invalid date" instead of the formatted date that it's suppose to be. You can replicate this issue by viewing the demo page (http://sdepold.github.io/jquery-rss/) in IE8 or using the IE developer tools to emulate IE8. In IE9+, the date works fine.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

faeldray avatar Dec 09 '15 21:12 faeldray

Thx for Letting me know! Will try to tackle it asap!

sdepold avatar Dec 09 '15 22:12 sdepold

Hm works for me? image

sdepold avatar Dec 10 '15 05:12 sdepold

But your screenshot shows the dates as "Invalid date" too.

faeldray avatar Dec 10 '15 06:12 faeldray

Aaah! I thought it would print errors in the console :D

sdepold avatar Dec 10 '15 06:12 sdepold

If only! That would probably make it easier to fix. :)

faeldray avatar Dec 10 '15 06:12 faeldray

Related comment about #57 @Aurif3x This is weird. It seems that the moment API is not entirely deprecated but only under certain circumstances? If we revert the change from #57 it seems to work nicely and also parses dates properly in IE8. Any opinion about this?

sdepold avatar Dec 10 '15 06:12 sdepold

So the issue @faeldray is experiencing is the due to new Date(entry.publishedAt) is NaN.

sdepold avatar Dec 10 '15 06:12 sdepold