Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #13486 -- Corrected handling of %I in admin javascript version …
…of strftime. Thanks to Bufke for the report, and jmil for the solution.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed May 12, 2010
1 parent b6f0fa5 commit 23976fa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions django/contrib/admin/media/js/core.js
Expand Up @@ -78,7 +78,7 @@ function findPosX(obj) {
curleft += obj.offsetLeft - ((isOpera) ? 0 : obj.scrollLeft);
obj = obj.offsetParent;
}
// IE offsetParent does not include the top-level
// IE offsetParent does not include the top-level
if (isIE && obj.parentElement){
curleft += obj.offsetLeft - obj.scrollLeft;
}
Expand All @@ -95,7 +95,7 @@ function findPosY(obj) {
curtop += obj.offsetTop - ((isOpera) ? 0 : obj.scrollTop);
obj = obj.offsetParent;
}
// IE offsetParent does not include the top-level
// IE offsetParent does not include the top-level
if (isIE && obj.parentElement){
curtop += obj.offsetTop - obj.scrollTop;
}
Expand All @@ -116,7 +116,13 @@ Date.prototype.getCorrectYear = function() {
}

Date.prototype.getTwelveHours = function() {
return (this.getHours() <= 12) ? this.getHours() : 24 - this.getHours();
hours = this.getHours();
if (hours == 0) {
return 12;
}
else {
return hours <= 12 ? hours : hours-12
}
}

Date.prototype.getTwoDigitMonth = function() {
Expand Down

0 comments on commit 23976fa

Please sign in to comment.