Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
case "%b":
case "%B":
for (j = 0; j < 12; ++j) {
if (localStrings.months[j].substr(0, a[i].length).toLowerCase() === a[i].toLowerCase()) {
if (localStrings.months[j].substring(0, a[i].length).toLowerCase() === a[i].toLowerCase()) {
m = j;
break;
}
Expand Down Expand Up @@ -319,7 +319,7 @@
if (a[i].search(/[a-zA-Z]+/) != -1) {
var t = -1;
for (j = 0; j < 12; ++j) {
if (localStrings.months[j].substr(0, a[i].length).toLowerCase() === a[i].toLowerCase()) {
if (localStrings.months[j].substring(0, a[i].length).toLowerCase() === a[i].toLowerCase()) {
t = j;
break;
}
Expand Down Expand Up @@ -402,7 +402,7 @@
s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN)
// FIXME: %x : preferred date representation for the current locale without the time
// FIXME: %X : preferred time representation for the current locale without the date
s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
s["%y"] = ('' + y).substring(2); // year without the century (range 00 to 99)
s["%Y"] = y; // year with the century
s["%%"] = "%"; // a literal '%' character

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ Date.prototype.print = function (str, dateType, translate, localStrings) {
s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN)
// FIXME: %x : preferred date representation for the current locale without the time
// FIXME: %X : preferred time representation for the current locale without the date
s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
s["%y"] = ('' + y).substring(2); // year without the century (range 00 to 99)
s["%Y"] = y; // year with the century
s["%%"] = "%"; // a literal '%' character

Expand Down Expand Up @@ -405,7 +405,7 @@ Date.parseFieldDate = function(str, fmt, dateType, localStrings) {
case "%b":
case "%B":
for (j = 0; j < 12; ++j) {
if (localStrings.months[j].substr(0, a[i].length).toLowerCase() === a[i].toLowerCase()) { m = j; break; }
if (localStrings.months[j].substring(0, a[i].length).toLowerCase() === a[i].toLowerCase()) { m = j; break; }
}
break;

Expand Down Expand Up @@ -444,7 +444,7 @@ Date.parseFieldDate = function(str, fmt, dateType, localStrings) {
if (a[i].search(/[a-zA-Z]+/) != -1) {
var t = -1;
for (j = 0; j < 12; ++j) {
if (localStrings.months[j].substr(0, a[i].length).toLowerCase() === a[i].toLowerCase()) { t = j; break; }
if (localStrings.months[j].substring(0, a[i].length).toLowerCase() === a[i].toLowerCase()) { t = j; break; }
}
if (t != -1) {
if (m != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
this.icon.setAttribute('class', clss);
}

const uniqueId = `simple-color-${Math.random().toString(36).substr(2, 10)}`;
const uniqueId = `simple-color-${Math.random().toString(36).substring(2, 12)}`;
this.icon.setAttribute('type', 'button');
this.icon.setAttribute('tabindex', '0');
this.icon.style.backgroundColor = color;
Expand Down
2 changes: 1 addition & 1 deletion build/media_source/system/js/inlinehelp.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Joomla.toggleInlineHelp = (toggleClass) => {
// The ID of the description whose visibility is toggled.
const myId = elDiv.id;
// The ID of the control described by this node (same ID, minus the '-desc' suffix).
const controlId = myId ? myId.substr(0, myId.length - 5) : null;
const controlId = myId ? myId.substring(0, myId.length - 5) : null;
// Get the control described by this node.
const elControl = controlId ? document.getElementById(controlId) : null;
// Is this node hidden?
Expand Down