@carbonplan/components 11.1.0 → 11.1.1
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/dst/index.esm.js +1 -1
- package/dst/index.esm.js.map +1 -1
- package/dst/index.js +1 -1
- package/dst/index.js.map +1 -1
- package/dst/index.modern.js +1 -1
- package/dst/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dst/index.js
CHANGED
|
@@ -2903,7 +2903,7 @@ var formatDateElement = function formatDateElement(date, element, option) {
|
|
|
2903
2903
|
var format = typeof option === 'string' ? option : defaultOptions[element];
|
|
2904
2904
|
var result = date.toLocaleString('default', (_date$toLocaleString = {}, _date$toLocaleString[element] = format, _date$toLocaleString));
|
|
2905
2905
|
|
|
2906
|
-
if (format === 'numeric' &&
|
|
2906
|
+
if (format === 'numeric' && ['day', 'month'].includes(element)) {
|
|
2907
2907
|
return result.padStart(2, '0');
|
|
2908
2908
|
} else {
|
|
2909
2909
|
return result;
|