mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #12748 - Use charAt instead of array-like access to format string to please IE. Thanks, yedpodtrzitko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f5ee28931d
commit
fdb9f83253
1 changed files with 3 additions and 3 deletions
|
@ -174,12 +174,12 @@ Date.prototype.strftime = function(format) {
|
||||||
};
|
};
|
||||||
var result = '', i = 0;
|
var result = '', i = 0;
|
||||||
while (i < format.length) {
|
while (i < format.length) {
|
||||||
if (format[i] === '%') {
|
if (format.charAt(i) === '%') {
|
||||||
result = result + fields[format[i + 1]];
|
result = result + fields[format.charAt(i + 1)];
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = result + format[i];
|
result = result + format.charAt(i);
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue