Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to master to publish v14.15.1 #396

Merged
merged 14 commits into from
Sep 21, 2022
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version=14.15.0
version=14.15.1
7 changes: 7 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Release Notes for Version 14
============================

Build 024
-------
Published as version 14.15.1
New Features:

Bug Fixes:
* Fixed isomorphic test failures by adding a value check

Build 023
-------
Expand Down
1 change: 1 addition & 0 deletions js/lib/IString.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ IString.prototype = {
if (typeof(Intl) !== 'undefined') {
if (ilib._getPlatform() === 'nodejs') {
var version = process.versions["node"];
if (!version) return false;
var majorVersion = version.split(".")[0];
if (Number(majorVersion) >= 10 && (Intl.PluralRules.supportedLocalesOf(locale.getSpec()).length > 0)) {
return true;
Expand Down
12 changes: 8 additions & 4 deletions js/test/date/testdatefmt.js
Original file line number Diff line number Diff line change
Expand Up @@ -3998,10 +3998,14 @@ module.exports.testdatefmt = {
var result = DateFmt.isIntlDateTimeAvailable("ko-KR");

if(ilib._getPlatform() === "nodejs") {
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10" || majorVersion == "12") {
test.equal(result, false);
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(result, true);
} else {
test.equal(result, false);
}
} else {
test.equal(result, true);
}
Expand Down
97 changes: 62 additions & 35 deletions js/test/date/testdatefmt_en_GB.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,20 @@ module.exports.testdatefmt_en_GB = {
});

if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10") {
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "9/29/11");
} else if (cldrVersion < 38) {
/*
* Both node v12.16.1 and v14.16.1 say the cldr version is 37.0.
* But it returns a different result.
*/
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "29/09/2011");
} else {
test.equal(fmt.format(date), "9/29/11");
}
} else {
test.equal(fmt.format(date), "29/09/2011");
}
Expand Down Expand Up @@ -181,20 +189,23 @@ module.exports.testdatefmt_en_GB = {
});

if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
//console.log("version: " + version + " majorVersion: " + majorVersion);
if (majorVersion == "8" || majorVersion == "10") {
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "Sep 29, 2011");
} else if (version == "14.18.2"){
} else if(cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "29 Sep 2011");
} else {
test.equal(fmt.format(date), "Sep 29, 2011");
}
} else if(cldrVersion < 39){
test.equal(fmt.format(date), "29 Sept 2011");
}
else if (majorVersion == "16"){
} else if(cldrVersion < 41){
test.equal(fmt.format(date), "29 Sept 2011");
} else {
test.equal(fmt.format(date), "29 Sep 2011");
test.equal(fmt.format(date), "29 Sep 2011");
}
} else {
test.equal(fmt.format(date), "29 Sept 2011");
Expand Down Expand Up @@ -222,12 +233,17 @@ module.exports.testdatefmt_en_GB = {
});

if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10") {
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "September 29, 2011");
} else if (cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "29 September 2011");
} else {
test.equal(fmt.format(date), "September 29, 2011");
}

} else {
test.equal(fmt.format(date), "29 September 2011");
}
Expand Down Expand Up @@ -283,12 +299,16 @@ module.exports.testdatefmt_en_GB = {


if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10") {
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "Thursday, September 29, 2011");
} else if (cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "Thursday, 29 September 2011");
} else {
test.equal(fmt.format(date), "Thursday, September 29, 2011");
}
} else {
test.equal(fmt.format(date), "Thursday, 29 September 2011");
}
Expand Down Expand Up @@ -1294,12 +1314,16 @@ module.exports.testdatefmt_en_GB = {
});

if(ilib._getPlatform() === "nodejs") {
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10") {
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "1:45 PM");
} else if (cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "13:45");
} else {
test.equal(fmt.format(date), "1:45 PM");
}
} else {
test.equal(fmt.format(date), "13:45");
}
Expand Down Expand Up @@ -1329,19 +1353,22 @@ module.exports.testdatefmt_en_GB = {
});

if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == "8" || majorVersion == "10") {
var cldrVersion = Number(process.versions["cldr"]);
var nodeMajorVersion = process.versions["node"].split(".")[0];
if (cldrVersion < 36) {
test.equal(fmt.format(date), "9/29/2011");
} else if (majorVersion == "12") {
test.equal(fmt.format(date), "1:45:10 PM");
} else if (cldrVersion < 38) {
if (nodeMajorVersion === "14") {
test.equal(fmt.format(date), "13:45:10");
} else {
test.equal(fmt.format(date), "1:45:10 PM");
}
} else {
test.equal(fmt.format(date), "13:45:10");
}
} else {
test.equal(fmt.format(date), "13:45:10");
}

test.done();
},

Expand Down
12 changes: 4 additions & 8 deletions js/test/date/testdatefmtasync.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,8 @@ module.exports.testdatefmtasync = {
var date = new Date(2022, 4, 29);

if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
if (majorVersion == 8 || majorVersion == 10){
var cldrVersion = Number(process.versions["cldr"]);
if (cldrVersion < 36){
test.equal(fmt.format(date), "5/29/2022");
} else {
test.equal(fmt.format(date), "May 29, 2022");
Expand Down Expand Up @@ -420,15 +419,12 @@ module.exports.testdatefmtasync = {
sync: false,
onLoad: function(fmt){
if(ilib._getPlatform() === "nodejs"){
var version = process.versions["node"];
var majorVersion = version.split(".")[0];
//console.log("version: " + version);
if(majorVersion == "8" || majorVersion == "10"){
var cldrVersion = Number(process.versions["cldr"]);
if(cldrVersion < 36){
test.equal(fmt.format(date), "9/29/2022");
} else {
test.equal(fmt.format(date), "September 29, 2022");
}

} else {
test.equal(fmt.format(date), "September 29, 2022");
}
Expand Down
Loading