aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorJay Merrifield <fracmak@gmail.com>2011-05-14 18:20:06 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-16 07:52:01 -0400
commit41205cef4b23749592c832605452af6575970623 (patch)
tree1c2989fd3372ed7be4d47e6285f45e9ace8c7509 /ui/jquery.ui.datepicker.js
parent463849e4c35c64634f8f6d6dc876ef6774165542 (diff)
downloadjquery-ui-41205cef4b23749592c832605452af6575970623.tar.gz
jquery-ui-41205cef4b23749592c832605452af6575970623.zip
Datepicker: Made the day of year calculator be more accurate. Fixes #6827 - Datepicker: Incorrect value for "oo" during Daylight Saving Time.
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 5b1dad684..519d4dfdb 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1185,7 +1185,7 @@ $.extend(Datepicker.prototype, {
break;
case 'o':
output += formatNumber('o',
- (date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
+ Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
break;
case 'm':
output += formatNumber('m', date.getMonth() + 1, 2);