tweetWidget : format the tweet date according to the locale.
--- a/src/js/widgets/tweetsWidget.js Tue Nov 29 13:49:19 2011 +0100
+++ b/src/js/widgets/tweetsWidget.js Tue Nov 29 14:34:30 2011 +0100
@@ -29,7 +29,8 @@
imageMarkup = Mustache.to_html("<a href='http://twitter.com/{{creator}}'><img src='{{src}}' alt='user image'></img></a>",
{src : img, creator: creator});
- title = Mustache.to_html(IriSP.rich_tweet_template, {contents : title, date : tweetContents.created_at});
+ var formatted_date = new Date(tweetContents.created_at).toLocaleDateString();
+ title = Mustache.to_html(IriSP.rich_tweet_template, {contents : title, date : formatted_date});
}
this.selector.find(".Ldt-tweetContents").html(title);
@@ -95,4 +96,4 @@
this.displayTweet(annotation);
return;
-};
\ No newline at end of file
+};