Bug 1497352 - Port
Bug 1428172 [Align mozIntl with Intl when working with constructors] to ChatZilla. r=gijs
--- a/xul/content/static.js
+++ b/xul/content/static.js
@@ -269,18 +269,24 @@ function initStatic()
this.getFullYear(), this.getMonth() + 1,
this.getDate(), this.getHours(),
this.getMinutes(), this.getSeconds()
);
}
}
else
{
- client.dtFormatter = Services.intl.createDateTimeFormat(
- undefined, { dateStyle: "full", timeStyle: "long" });
+ if (Services.vc.compare(Services.appinfo.platformVersion, "59.0") < 0) {
+ client.dtFormatter = Services.intl.createDateTimeFormat(
+ undefined, { dateStyle: "full", timeStyle: "long" });
+ }
+ else {
+ client.dtFormatter = new Services.intl.DateTimeFormat(
+ undefined, { dateStyle: "full", timeStyle: "long" });
+ }
// Mmmm, fun. This ONLY affects the ChatZilla window, don't worry!
Date.prototype.toStringInt = Date.prototype.toString;
Date.prototype.toString = function() {
return client.dtFormatter.format(this);
}
}
}