@bbn/bbn 2.0.15 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bbn.js +1 -1
- package/dist/bbn.js.map +1 -1
- package/dist/date.js +4 -2
- package/dist/fn/datetime/fdate.js +1 -1
- package/package.json +1 -1
package/dist/date.js
CHANGED
|
@@ -787,7 +787,9 @@ class bbnDateTool {
|
|
|
787
787
|
__classPrivateFieldSet(this, _bbnDateTool_value, new Date(), "f");
|
|
788
788
|
}
|
|
789
789
|
else if (inputFormat) {
|
|
790
|
-
|
|
790
|
+
if (this.matchFormat(value, inputFormat)) {
|
|
791
|
+
__classPrivateFieldSet(this, _bbnDateTool_value, bbnDateTool.parse(value, inputFormat), "f");
|
|
792
|
+
}
|
|
791
793
|
}
|
|
792
794
|
else {
|
|
793
795
|
if (t === 'number' || (isNumber(value) && value !== '')) {
|
|
@@ -1076,7 +1078,7 @@ class bbnDateTool {
|
|
|
1076
1078
|
if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
|
|
1077
1079
|
return '';
|
|
1078
1080
|
}
|
|
1079
|
-
const opt = Object.assign(Object.assign({ year: 'numeric', month: long ? 'long' : '
|
|
1081
|
+
const opt = Object.assign(Object.assign({ year: 'numeric', month: long ? 'long' : 'numeric', day: 'numeric' }, (weekday ? { weekday: (long ? 'long' : 'short') } : {})), (withTime ? { hour: (long ? '2-digit' : 'numeric'), minute: '2-digit' } : {}));
|
|
1080
1082
|
const d = new Intl.DateTimeFormat([bbn.env.lang, ...navigator.languages], opt);
|
|
1081
1083
|
return d.format(__classPrivateFieldGet(this, _bbnDateTool_value, "f"));
|
|
1082
1084
|
}
|