@megha-ui/react 1.2.102 → 1.2.104
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.
|
@@ -23,9 +23,10 @@ const formatValue = (value, type = "number", locale = "sv-SE", options = {
|
|
|
23
23
|
if (type === "number") {
|
|
24
24
|
const num = parseFloat(value.toString());
|
|
25
25
|
return formatNumber(num, locale, options);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
}
|
|
27
|
+
else if (type === "date") {
|
|
28
|
+
const date = new Date(value);
|
|
29
|
+
return formatDate(date, locale, options);
|
|
29
30
|
}
|
|
30
31
|
else if (type === "currency") {
|
|
31
32
|
const num = parseFloat(value.toString());
|
package/package.json
CHANGED