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:54:38 -0400
commitc1470492bd902738a54b994ee29ff4eecedae855 (patch)
tree4403697ad18300aadfefa14ab68a480289e46d65 /ui/jquery.ui.datepicker.js
parent18669056957c49d5b72693a1d61d47f041d6e5ff (diff)
downloadjquery-ui-c1470492bd902738a54b994ee29ff4eecedae855.tar.gz
jquery-ui-c1470492bd902738a54b994ee29ff4eecedae855.zip
Datepicker: Made the day of year calculator be more accurate. Fixes #6827 - Datepicker: Incorrect value for "oo" during Daylight Saving Time.
(cherry picked from commit 41205cef4b23749592c832605452af6575970623)
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 93d468c36..e6ca5d984 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1181,7 +1181,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);