[DRE-commits] [SCM] wheezy-transition-tracker.git branch, master, updated. a98fef790a81d5a715c25a801d62dd54e4945d8f
Antonio Terceiro
terceiro at softwarelivre.org
Wed Jun 29 00:46:40 UTC 2011
The following commit has been merged in the master branch:
commit ab8e0a94ef1c193cb16d7bbea79c3206c24c48ae
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Tue Jun 28 17:14:28 2011 -0700
Fix construction and display of date objects
Javascript Date object already returns, and expects, the month as 0-11
diff --git a/chart.js b/chart.js
index 125ef08..1e57a8f 100644
--- a/chart.js
+++ b/chart.js
@@ -1,5 +1,5 @@
function to_date_string(date) {
- return date.getFullYear() + "/" + date.getMonth() + "/" + date.getDate();
+ return date.getFullYear() + "/" + (date.getMonth()+1) + "/" + date.getDate();
}
function to_proper_date(date_as_number) {
@@ -65,7 +65,7 @@ $(function() {
$("#tooltip").remove();
var date = new Date(item.datapoint[0]);
- var tooltip = months[date.getMonth() - 1] + ' ' + date.getDate() + ', ' + date.getFullYear() + ': <strong>' + item.datapoint[1] + '</strong>';
+ var tooltip = months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear() + ': <strong>' + item.datapoint[1] + '</strong>';
showTooltip(item.pageX, item.pageY, tooltip)
}
}
--
wheezy-transition-tracker.git
More information about the Pkg-ruby-extras-commits
mailing list