Permalink
Browse files

use the users browser to localise the 'last updated' field

  • Loading branch information...
1 parent fced3af commit 913652c2ba000f9e0eee334c7ff3843b1ec79394 @stevenwilkin committed Sep 1, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 public/js/trends.js
View
@@ -1,4 +1,14 @@
/**
+ * use the users browser to localise the 'last updated' field from UTC
+ */
+function localiseTimestamp(){
+ var d = new Date($('#trends span').attr('title'));
+ var pd = d.getHours() + ':' + d.getMinutes();
+ $('#trends span').html(pd);
+}
+
+
+/**
* jCarousel
*/
function itemVisibleIn(carousel, item, i, state, evt){
@@ -28,5 +38,6 @@ function initCarousel(){
$(document).ready(function(){
+ localiseTimestamp();
initCarousel();
});

0 comments on commit 913652c

Please sign in to comment.