Comparing version 2.0.15 to 2.0.16
@@ -23,3 +23,3 @@ export var Date; | ||
function localize(value, locale, timezone) { | ||
return (is(value) ? parse(value) : value) | ||
return ((is(value) ? parse(value) : value) | ||
.toLocaleString(locale ? locale : Intl.DateTimeFormat().resolvedOptions().locale, { | ||
@@ -31,3 +31,4 @@ year: "numeric", | ||
}) | ||
.substring(0, 10); | ||
.substring(0, 10) | ||
.replaceAll(" ", " ")); | ||
} | ||
@@ -34,0 +35,0 @@ Date.localize = localize; |
@@ -69,3 +69,5 @@ import { Date } from "./Date"; | ||
const localeString = timeZone ? timeZone : Intl.DateTimeFormat().resolvedOptions().locale; | ||
result = (is(value) ? parse(value) : value).toLocaleString(localeString, locale); | ||
result = (is(value) ? parse(value) : value) | ||
.toLocaleString(localeString, locale) | ||
.replaceAll(" ", " "); | ||
} | ||
@@ -72,0 +74,0 @@ else { |
{ | ||
"name": "isoly", | ||
"version": "2.0.15", | ||
"version": "2.0.16", | ||
"description": "Datatypes and functions specified by ISO-standards.", | ||
@@ -5,0 +5,0 @@ "author": "Utily Contributors", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
923153
18972