@native-systems/utility 2.3.0 → 2.3.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/dist/index.cjs +30 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.esm.js +30 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1312,7 +1312,16 @@ _define_property(
|
|
|
1312
1312
|
DateFormatter,
|
|
1313
1313
|
'getZoneAdjustedWeekday',
|
|
1314
1314
|
function (dateString, options) {
|
|
1315
|
-
var
|
|
1315
|
+
var defaultTimeZone =
|
|
1316
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1317
|
+
? arguments[2]
|
|
1318
|
+
: 'Europe/Berlin';
|
|
1319
|
+
var _options_timezone;
|
|
1320
|
+
var timezone =
|
|
1321
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1322
|
+
_options_timezone !== void 0
|
|
1323
|
+
? _options_timezone
|
|
1324
|
+
: defaultTimeZone;
|
|
1316
1325
|
return new Date(dateString).toLocaleDateString(options.locale, {
|
|
1317
1326
|
weekday: 'long',
|
|
1318
1327
|
timeZone: timezone,
|
|
@@ -1323,7 +1332,16 @@ _define_property(
|
|
|
1323
1332
|
DateFormatter,
|
|
1324
1333
|
'getZoneAdjustedDate',
|
|
1325
1334
|
function (dateString, options) {
|
|
1326
|
-
var
|
|
1335
|
+
var defaultTimeZone =
|
|
1336
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1337
|
+
? arguments[2]
|
|
1338
|
+
: 'Europe/Berlin';
|
|
1339
|
+
var _options_timezone;
|
|
1340
|
+
var timezone =
|
|
1341
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1342
|
+
_options_timezone !== void 0
|
|
1343
|
+
? _options_timezone
|
|
1344
|
+
: defaultTimeZone;
|
|
1327
1345
|
return new Date(dateString).toLocaleDateString(options.locale, {
|
|
1328
1346
|
month: 'long',
|
|
1329
1347
|
day: 'numeric',
|
|
@@ -1335,7 +1353,16 @@ _define_property(
|
|
|
1335
1353
|
DateFormatter,
|
|
1336
1354
|
'getZoneAdjustedTime',
|
|
1337
1355
|
function (dateString, options) {
|
|
1338
|
-
var
|
|
1356
|
+
var defaultTimeZone =
|
|
1357
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1358
|
+
? arguments[2]
|
|
1359
|
+
: 'Europe/Berlin';
|
|
1360
|
+
var _options_timezone;
|
|
1361
|
+
var timezone =
|
|
1362
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1363
|
+
_options_timezone !== void 0
|
|
1364
|
+
? _options_timezone
|
|
1365
|
+
: defaultTimeZone;
|
|
1339
1366
|
return new Date(dateString)
|
|
1340
1367
|
.toLocaleTimeString(options.locale, {
|
|
1341
1368
|
hour: '2-digit',
|
package/dist/index.d.ts
CHANGED
|
@@ -876,17 +876,17 @@ declare module "@native-systems/utility" {
|
|
|
876
876
|
*/
|
|
877
877
|
static formatMini(date: Date | string): string;
|
|
878
878
|
static getZoneAdjustedWeekday: (dateString: string, options: {
|
|
879
|
-
timezone: string;
|
|
879
|
+
timezone: string | undefined;
|
|
880
880
|
locale: string | undefined;
|
|
881
|
-
}) => string;
|
|
881
|
+
}, defaultTimeZone?: string) => string;
|
|
882
882
|
static getZoneAdjustedDate: (dateString: string, options: {
|
|
883
|
-
timezone: string;
|
|
883
|
+
timezone: string | undefined;
|
|
884
884
|
locale: string | undefined;
|
|
885
|
-
}) => string;
|
|
885
|
+
}, defaultTimeZone?: string) => string;
|
|
886
886
|
static getZoneAdjustedTime: (dateString: string, options: {
|
|
887
|
-
timezone: string;
|
|
887
|
+
timezone: string | undefined;
|
|
888
888
|
locale: string | undefined;
|
|
889
|
-
}) => string;
|
|
889
|
+
}, defaultTimeZone?: string) => string;
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1310,7 +1310,16 @@ _define_property(
|
|
|
1310
1310
|
DateFormatter,
|
|
1311
1311
|
'getZoneAdjustedWeekday',
|
|
1312
1312
|
function (dateString, options) {
|
|
1313
|
-
var
|
|
1313
|
+
var defaultTimeZone =
|
|
1314
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1315
|
+
? arguments[2]
|
|
1316
|
+
: 'Europe/Berlin';
|
|
1317
|
+
var _options_timezone;
|
|
1318
|
+
var timezone =
|
|
1319
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1320
|
+
_options_timezone !== void 0
|
|
1321
|
+
? _options_timezone
|
|
1322
|
+
: defaultTimeZone;
|
|
1314
1323
|
return new Date(dateString).toLocaleDateString(options.locale, {
|
|
1315
1324
|
weekday: 'long',
|
|
1316
1325
|
timeZone: timezone,
|
|
@@ -1321,7 +1330,16 @@ _define_property(
|
|
|
1321
1330
|
DateFormatter,
|
|
1322
1331
|
'getZoneAdjustedDate',
|
|
1323
1332
|
function (dateString, options) {
|
|
1324
|
-
var
|
|
1333
|
+
var defaultTimeZone =
|
|
1334
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1335
|
+
? arguments[2]
|
|
1336
|
+
: 'Europe/Berlin';
|
|
1337
|
+
var _options_timezone;
|
|
1338
|
+
var timezone =
|
|
1339
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1340
|
+
_options_timezone !== void 0
|
|
1341
|
+
? _options_timezone
|
|
1342
|
+
: defaultTimeZone;
|
|
1325
1343
|
return new Date(dateString).toLocaleDateString(options.locale, {
|
|
1326
1344
|
month: 'long',
|
|
1327
1345
|
day: 'numeric',
|
|
@@ -1333,7 +1351,16 @@ _define_property(
|
|
|
1333
1351
|
DateFormatter,
|
|
1334
1352
|
'getZoneAdjustedTime',
|
|
1335
1353
|
function (dateString, options) {
|
|
1336
|
-
var
|
|
1354
|
+
var defaultTimeZone =
|
|
1355
|
+
arguments.length > 2 && arguments[2] !== void 0
|
|
1356
|
+
? arguments[2]
|
|
1357
|
+
: 'Europe/Berlin';
|
|
1358
|
+
var _options_timezone;
|
|
1359
|
+
var timezone =
|
|
1360
|
+
(_options_timezone = options.timezone) !== null &&
|
|
1361
|
+
_options_timezone !== void 0
|
|
1362
|
+
? _options_timezone
|
|
1363
|
+
: defaultTimeZone;
|
|
1337
1364
|
return new Date(dateString)
|
|
1338
1365
|
.toLocaleTimeString(options.locale, {
|
|
1339
1366
|
hour: '2-digit',
|