@carbonplan/components 11.0.6 → 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 +4 -2
- package/dst/index.esm.js.map +1 -1
- package/dst/index.js +4 -2
- package/dst/index.js.map +1 -1
- package/dst/index.modern.js +4 -2
- package/dst/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dst/index.modern.js
CHANGED
|
@@ -2850,7 +2850,7 @@ const formatDateElement = (date, element, option) => {
|
|
|
2850
2850
|
[element]: format
|
|
2851
2851
|
});
|
|
2852
2852
|
|
|
2853
|
-
if (format === 'numeric' &&
|
|
2853
|
+
if (format === 'numeric' && ['day', 'month'].includes(element)) {
|
|
2854
2854
|
return result.padStart(2, '0');
|
|
2855
2855
|
} else {
|
|
2856
2856
|
return result;
|
|
@@ -2858,11 +2858,13 @@ const formatDateElement = (date, element, option) => {
|
|
|
2858
2858
|
};
|
|
2859
2859
|
|
|
2860
2860
|
const formatDate = (date, options = defaultOptions) => {
|
|
2861
|
+
var _options$separator;
|
|
2862
|
+
|
|
2861
2863
|
const d = new Date(date.replace(/-/g, '/'));
|
|
2862
2864
|
const month = formatDateElement(d, 'month', options.month);
|
|
2863
2865
|
const day = formatDateElement(d, 'day', options.day);
|
|
2864
2866
|
const year = formatDateElement(d, 'year', options.year);
|
|
2865
|
-
return [month, day, year].filter(Boolean).join(' ');
|
|
2867
|
+
return [month, day, year].filter(Boolean).join((_options$separator = options.separator) != null ? _options$separator : ' ');
|
|
2866
2868
|
};
|
|
2867
2869
|
|
|
2868
2870
|
export { Badge, button as Button, callout as Callout, Colorbar, Column, Custom404, Dimmer, Expander, FadeIn, Filter, Footer, Group, Guide, Header, input as Input, Layout, Link$1 as Link, Logo, Menu, Meta, Monogram, Row, Scrollbar, Select, Settings, slider as Slider, Table, Tag, toggle as Toggle, Tracking, Tray, formatDate, getScrollbarWidth };
|