pavelk2 / social-feed

JavaScript plugin that shows a user feed from the most popular social networks
http://pavelk2.github.io/social-feed-example/
MIT License
962 stars 304 forks source link

Fixed Twitter date parsing in IE. #212

Closed martijngastkemper closed 8 years ago

martijngastkemper commented 8 years ago

Created a pull request for the solution proposed by @HartLarsson in #207. It a easier solution then proposed in #204.

HartLarsson commented 8 years ago

in a recent fix i've removed the 'en' localization to let people load the language they need

post.dt_create = moment(element.created_at, 'dd MMM DD HH:mm:ss ZZ YYYY');

martijngastkemper commented 8 years ago

Doesn't that change affect the parsing? I though it is necessary to detect the right language the date uses. Apparently it's not.

The locale is also defined when parsing RSS dates (https://github.com/pavelk2/social-feed/blob/gh-pages/js/jquery.socialfeed.js#L753). That would mean it can be removed there to.

HartLarsson commented 8 years ago

i've in my version removed the 'en' and works good:

post.dt_create = moment(item.published, 'YYYY-MM-DDTHH:mm:ssZ');

martijngastkemper commented 8 years ago

@HartLarsson I've removed the locale. English is the default locale so it doesn't make a difference.