Skip to content

Commit c8bdd33

Browse files
committed
🚀 Release 5.13.1
1 parent 639cd79 commit c8bdd33

20 files changed

Lines changed: 66 additions & 24 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ DataFormsJS uses [Semantic Versioning](https://docs.npmjs.com/about-semantic-ver
44

55
Overall the core Framework files, React Components, and Web Components and API are expected to remain stable however the version number is expected to increase to much larger numbers in the future due to the changes to smaller scripts and components. This change log includes all npm release history and new website features or major changes.
66

7+
## 5.13.1 (May 2, 2022)
8+
9+
* Update Code Comments on React Component `<JsonData>`
10+
* Previously `@license` was included in the main comment which resulted in [Vite](https://vitejs.dev/) including about 5 kB (uncompressed) and about 1.5 kB of extra code on the build process.
11+
* Comments were updated so that they are not included on build resulting in smaller files.
12+
* Update Framework, React, and Web Components for Date/Time formatting:
13+
* Update for `en-US` to use format `{date} {time}` instead of `{date}, {time}` because most people in the US (and software programs) do not use the comma while Chrome uses the comma.
14+
715
## 5.13.0 (February 25, 2022)
816

917
* DataFormsJS App Object

js/DataFormsJS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3391,7 +3391,7 @@
33913391

33923392
// Add Build Version
33933393
// For new releases this gets updated automatically by [scripts/build.js].
3394-
Object.defineProperty(app, 'version', { value: '5.13.0', enumerable: true });
3394+
Object.defineProperty(app, 'version', { value: '5.13.1', enumerable: true });
33953395

33963396
// Assign [DataFormsJS] and [app] to the global variable space
33973397
window.DataFormsJS = app;

js/DataFormsJS.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/extensions/handlebars-helpers.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@
6464
// In the future a new Temporal may be used instead:
6565
// https://tc39.es/proposal-temporal/docs/
6666
var localDate = new Date(dateTime);
67-
return new Intl.DateTimeFormat(navigator.language, options).format(localDate);
67+
var value = Intl.DateTimeFormat(navigator.language, options).format(localDate);
68+
if (navigator.language === 'en-US') {
69+
// Chrome returns "{date}, {time}" but most people in the US
70+
// use "{date} {time}" without the comma.
71+
return value.toLocaleString().replace(', ', ' ');
72+
}
73+
return value.toLocaleString();
6874
}
6975
} catch (e) {
7076
// If Error log to console and return 'Error' text

js/extensions/handlebars-helpers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/react/es5/DataFormsJS.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @link https://www.dataformsjs.com
2-
// @version 5.13.0
2+
// @version 5.13.1
33
// @author Conrad Sollitt (https://conradsollitt.com)
44
// @license MIT
55
(function () {
@@ -249,7 +249,14 @@ var Format = function () {
249249
return new Intl.DateTimeFormat(navigator.language, options).format(date);
250250
} else {
251251
var localDate = new Date(dateTime);
252-
return new Intl.DateTimeFormat(navigator.language, options).format(localDate);
252+
253+
var _date = Intl.DateTimeFormat(navigator.language, options).format(localDate);
254+
255+
if (navigator.language === 'en-US') {
256+
return _date.toLocaleString().replace(', ', ' ');
257+
}
258+
259+
return _date.toLocaleString();
253260
}
254261
} catch (e) {
255262
console.warn('Error formatting Date/Time Value:');

js/react/es5/DataFormsJS.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/react/es5/Format.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,14 @@ var Format = function () {
106106
return new Intl.DateTimeFormat(navigator.language, options).format(date);
107107
} else {
108108
var localDate = new Date(dateTime);
109-
return new Intl.DateTimeFormat(navigator.language, options).format(localDate);
109+
110+
var _date = Intl.DateTimeFormat(navigator.language, options).format(localDate);
111+
112+
if (navigator.language === 'en-US') {
113+
return _date.toLocaleString().replace(', ', ' ');
114+
}
115+
116+
return _date.toLocaleString();
110117
}
111118
} catch (e) {
112119
console.warn('Error formatting Date/Time Value:');

0 commit comments

Comments
 (0)