@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.esm.js
CHANGED
|
@@ -2897,7 +2897,7 @@ var formatDateElement = function formatDateElement(date, element, option) {
|
|
|
2897
2897
|
var format = typeof option === 'string' ? option : defaultOptions[element];
|
|
2898
2898
|
var result = date.toLocaleString('default', (_date$toLocaleString = {}, _date$toLocaleString[element] = format, _date$toLocaleString));
|
|
2899
2899
|
|
|
2900
|
-
if (format === 'numeric' &&
|
|
2900
|
+
if (format === 'numeric' && ['day', 'month'].includes(element)) {
|
|
2901
2901
|
return result.padStart(2, '0');
|
|
2902
2902
|
} else {
|
|
2903
2903
|
return result;
|