@nmshd/runtime 1.2.6 → 1.2.10
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/buildInformation.js
CHANGED
|
@@ -7,11 +7,11 @@ const content_1 = require("@nmshd/content");
|
|
|
7
7
|
const crypto_1 = require("@nmshd/crypto");
|
|
8
8
|
const transport_1 = require("@nmshd/transport");
|
|
9
9
|
exports.buildInformation = {
|
|
10
|
-
version: "1.2.
|
|
11
|
-
build: "
|
|
12
|
-
date: "
|
|
13
|
-
commit: "
|
|
14
|
-
dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.
|
|
10
|
+
version: "1.2.10",
|
|
11
|
+
build: "25",
|
|
12
|
+
date: "2022-01-03T13:29:10+00:00",
|
|
13
|
+
commit: "2ae3b17d2c19341c64ac3cc242f48527d38afa92",
|
|
14
|
+
dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.2","@nmshd/crypto":"1.0.6","@nmshd/transport":"1.1.5","ajv":"^8.8.2","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
|
|
15
15
|
libraries: {
|
|
16
16
|
serval: ts_serval_1.buildInformation,
|
|
17
17
|
consumption: consumption_1.buildInformation,
|
package/lib-web/nmshd.runtime.js
CHANGED
|
@@ -327,11 +327,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
327
327
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
328
328
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
329
329
|
exports.buildInformation = {
|
|
330
|
-
version: "1.2.
|
|
331
|
-
build: "
|
|
332
|
-
date: "
|
|
333
|
-
commit: "
|
|
334
|
-
dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.
|
|
330
|
+
version: "1.2.10",
|
|
331
|
+
build: "25",
|
|
332
|
+
date: "2022-01-03T13:29:10+00:00",
|
|
333
|
+
commit: "2ae3b17d2c19341c64ac3cc242f48527d38afa92",
|
|
334
|
+
dependencies: {"@js-soft/docdb-querytranslator":"1.0.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"1.0.2","@js-soft/ts-utils":"^1.1.1","@nmshd/consumption":"1.0.11","@nmshd/content":"1.1.2","@nmshd/crypto":"1.0.6","@nmshd/transport":"1.1.5","ajv":"^8.8.2","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.2","luxon":"^2.3.0","qrcode":"1.5.0","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
|
|
335
335
|
libraries: {
|
|
336
336
|
serval: ts_serval_1.buildInformation,
|
|
337
337
|
consumption: consumption_1.buildInformation,
|
|
@@ -27391,17 +27391,16 @@ function padStart(input, n) {
|
|
|
27391
27391
|
n = 2;
|
|
27392
27392
|
}
|
|
27393
27393
|
|
|
27394
|
-
var
|
|
27395
|
-
var
|
|
27396
|
-
var result;
|
|
27394
|
+
var isNeg = input < 0;
|
|
27395
|
+
var padded;
|
|
27397
27396
|
|
|
27398
|
-
if (
|
|
27399
|
-
|
|
27397
|
+
if (isNeg) {
|
|
27398
|
+
padded = "-" + ("" + -input).padStart(n, "0");
|
|
27400
27399
|
} else {
|
|
27401
|
-
|
|
27400
|
+
padded = ("" + input).padStart(n, "0");
|
|
27402
27401
|
}
|
|
27403
27402
|
|
|
27404
|
-
return
|
|
27403
|
+
return padded;
|
|
27405
27404
|
}
|
|
27406
27405
|
function parseInteger(string) {
|
|
27407
27406
|
if (isUndefined(string) || string === null || string === "") {
|
|
@@ -29023,7 +29022,27 @@ var Settings = /*#__PURE__*/function () {
|
|
|
29023
29022
|
return Settings;
|
|
29024
29023
|
}();
|
|
29025
29024
|
|
|
29026
|
-
var _excluded = ["base"]
|
|
29025
|
+
var _excluded = ["base"],
|
|
29026
|
+
_excluded2 = ["padTo", "floor"];
|
|
29027
|
+
|
|
29028
|
+
var intlLFCache = {};
|
|
29029
|
+
|
|
29030
|
+
function getCachedLF(locString, opts) {
|
|
29031
|
+
if (opts === void 0) {
|
|
29032
|
+
opts = {};
|
|
29033
|
+
}
|
|
29034
|
+
|
|
29035
|
+
var key = JSON.stringify([locString, opts]);
|
|
29036
|
+
var dtf = intlLFCache[key];
|
|
29037
|
+
|
|
29038
|
+
if (!dtf) {
|
|
29039
|
+
dtf = new Intl.ListFormat(locString, opts);
|
|
29040
|
+
intlLFCache[key] = dtf;
|
|
29041
|
+
}
|
|
29042
|
+
|
|
29043
|
+
return dtf;
|
|
29044
|
+
}
|
|
29045
|
+
|
|
29027
29046
|
var intlDTCache = {};
|
|
29028
29047
|
|
|
29029
29048
|
function getCachedDTF(locString, opts) {
|
|
@@ -29192,10 +29211,15 @@ var PolyNumberFormatter = /*#__PURE__*/function () {
|
|
|
29192
29211
|
this.padTo = opts.padTo || 0;
|
|
29193
29212
|
this.floor = opts.floor || false;
|
|
29194
29213
|
|
|
29195
|
-
|
|
29196
|
-
|
|
29214
|
+
opts.padTo;
|
|
29215
|
+
opts.floor;
|
|
29216
|
+
var otherOpts = _objectWithoutPropertiesLoose(opts, _excluded2);
|
|
29217
|
+
|
|
29218
|
+
if (!forceSimple || Object.keys(otherOpts).length > 0) {
|
|
29219
|
+
var intlOpts = _extends({
|
|
29197
29220
|
useGrouping: false
|
|
29198
|
-
};
|
|
29221
|
+
}, opts);
|
|
29222
|
+
|
|
29199
29223
|
if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;
|
|
29200
29224
|
this.inf = getCachedINF(intl, intlOpts);
|
|
29201
29225
|
}
|
|
@@ -29389,8 +29413,7 @@ var Locale = /*#__PURE__*/function () {
|
|
|
29389
29413
|
|
|
29390
29414
|
var _proto4 = Locale.prototype;
|
|
29391
29415
|
|
|
29392
|
-
_proto4.listingMode = function listingMode(
|
|
29393
|
-
|
|
29416
|
+
_proto4.listingMode = function listingMode() {
|
|
29394
29417
|
var isActuallyEn = this.isEnglish();
|
|
29395
29418
|
var hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
|
|
29396
29419
|
return isActuallyEn && hasNoWeirdness ? "en" : "intl";
|
|
@@ -29570,6 +29593,14 @@ var Locale = /*#__PURE__*/function () {
|
|
|
29570
29593
|
return new PolyRelFormatter(this.intl, this.isEnglish(), opts);
|
|
29571
29594
|
};
|
|
29572
29595
|
|
|
29596
|
+
_proto4.listFormatter = function listFormatter(opts) {
|
|
29597
|
+
if (opts === void 0) {
|
|
29598
|
+
opts = {};
|
|
29599
|
+
}
|
|
29600
|
+
|
|
29601
|
+
return getCachedLF(this.intl, opts);
|
|
29602
|
+
};
|
|
29603
|
+
|
|
29573
29604
|
_proto4.isEnglish = function isEnglish() {
|
|
29574
29605
|
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
|
|
29575
29606
|
};
|
|
@@ -30315,6 +30346,48 @@ var Duration = /*#__PURE__*/function () {
|
|
|
30315
30346
|
|
|
30316
30347
|
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
|
|
30317
30348
|
}
|
|
30349
|
+
/**
|
|
30350
|
+
* Returns a string representation of a Duration with all units included
|
|
30351
|
+
* To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant. See {@link Intl.NumberFormat}.
|
|
30352
|
+
* @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.
|
|
30353
|
+
* @example
|
|
30354
|
+
* ```js
|
|
30355
|
+
* var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
|
|
30356
|
+
* dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
|
|
30357
|
+
* dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
|
|
30358
|
+
* dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
|
|
30359
|
+
* ```
|
|
30360
|
+
*/
|
|
30361
|
+
;
|
|
30362
|
+
|
|
30363
|
+
_proto.toHuman = function toHuman(opts) {
|
|
30364
|
+
var _this = this;
|
|
30365
|
+
|
|
30366
|
+
if (opts === void 0) {
|
|
30367
|
+
opts = {};
|
|
30368
|
+
}
|
|
30369
|
+
|
|
30370
|
+
var l = orderedUnits$1.map(function (unit) {
|
|
30371
|
+
var val = _this.values[unit];
|
|
30372
|
+
|
|
30373
|
+
if (isUndefined(val)) {
|
|
30374
|
+
return null;
|
|
30375
|
+
}
|
|
30376
|
+
|
|
30377
|
+
return _this.loc.numberFormatter(_extends({
|
|
30378
|
+
style: "unit",
|
|
30379
|
+
unitDisplay: "long"
|
|
30380
|
+
}, opts, {
|
|
30381
|
+
unit: unit.slice(0, -1)
|
|
30382
|
+
})).format(val);
|
|
30383
|
+
}).filter(function (n) {
|
|
30384
|
+
return n;
|
|
30385
|
+
});
|
|
30386
|
+
return this.loc.listFormatter(_extends({
|
|
30387
|
+
type: "conjunction",
|
|
30388
|
+
style: opts.listStyle || "narrow"
|
|
30389
|
+
}, opts)).format(l);
|
|
30390
|
+
}
|
|
30318
30391
|
/**
|
|
30319
30392
|
* Returns a JavaScript object with this Duration's values.
|
|
30320
30393
|
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
|
|
@@ -32852,51 +32925,67 @@ function toTechFormat(dt, format, allowZ) {
|
|
|
32852
32925
|
allowZ: allowZ,
|
|
32853
32926
|
forceSimple: true
|
|
32854
32927
|
}).formatDateTimeFromString(dt, format) : null;
|
|
32855
|
-
}
|
|
32856
|
-
|
|
32928
|
+
}
|
|
32929
|
+
|
|
32930
|
+
function _toISODate(o, extended) {
|
|
32931
|
+
var longFormat = o.c.year > 9999 || o.c.year < 0;
|
|
32932
|
+
var c = "";
|
|
32933
|
+
if (longFormat && o.c.year >= 0) c += "+";
|
|
32934
|
+
c += padStart(o.c.year, longFormat ? 6 : 4);
|
|
32935
|
+
|
|
32936
|
+
if (extended) {
|
|
32937
|
+
c += "-";
|
|
32938
|
+
c += padStart(o.c.month);
|
|
32939
|
+
c += "-";
|
|
32940
|
+
c += padStart(o.c.day);
|
|
32941
|
+
} else {
|
|
32942
|
+
c += padStart(o.c.month);
|
|
32943
|
+
c += padStart(o.c.day);
|
|
32944
|
+
}
|
|
32857
32945
|
|
|
32946
|
+
return c;
|
|
32947
|
+
}
|
|
32858
32948
|
|
|
32859
|
-
function
|
|
32860
|
-
var
|
|
32861
|
-
suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds,
|
|
32862
|
-
_ref$suppressMillisec = _ref.suppressMilliseconds,
|
|
32863
|
-
suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec,
|
|
32864
|
-
includeOffset = _ref.includeOffset,
|
|
32865
|
-
_ref$includePrefix = _ref.includePrefix,
|
|
32866
|
-
includePrefix = _ref$includePrefix === void 0 ? false : _ref$includePrefix,
|
|
32867
|
-
_ref$includeZone = _ref.includeZone,
|
|
32868
|
-
includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone,
|
|
32869
|
-
_ref$spaceZone = _ref.spaceZone,
|
|
32870
|
-
spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone,
|
|
32871
|
-
_ref$format = _ref.format,
|
|
32872
|
-
format = _ref$format === void 0 ? "extended" : _ref$format;
|
|
32873
|
-
var fmt = format === "basic" ? "HHmm" : "HH:mm";
|
|
32949
|
+
function _toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset) {
|
|
32950
|
+
var c = padStart(o.c.hour);
|
|
32874
32951
|
|
|
32875
|
-
if (
|
|
32876
|
-
|
|
32952
|
+
if (extended) {
|
|
32953
|
+
c += ":";
|
|
32954
|
+
c += padStart(o.c.minute);
|
|
32877
32955
|
|
|
32878
|
-
if (
|
|
32879
|
-
|
|
32956
|
+
if (o.c.second !== 0 || !suppressSeconds) {
|
|
32957
|
+
c += ":";
|
|
32880
32958
|
}
|
|
32959
|
+
} else {
|
|
32960
|
+
c += padStart(o.c.minute);
|
|
32881
32961
|
}
|
|
32882
32962
|
|
|
32883
|
-
if (
|
|
32884
|
-
|
|
32885
|
-
}
|
|
32963
|
+
if (o.c.second !== 0 || !suppressSeconds) {
|
|
32964
|
+
c += padStart(o.c.second);
|
|
32886
32965
|
|
|
32887
|
-
|
|
32888
|
-
|
|
32889
|
-
|
|
32890
|
-
|
|
32966
|
+
if (o.c.millisecond !== 0 || !suppressMilliseconds) {
|
|
32967
|
+
c += ".";
|
|
32968
|
+
c += padStart(o.c.millisecond, 3);
|
|
32969
|
+
}
|
|
32891
32970
|
}
|
|
32892
32971
|
|
|
32893
|
-
|
|
32894
|
-
|
|
32895
|
-
|
|
32896
|
-
|
|
32972
|
+
if (includeOffset) {
|
|
32973
|
+
if (o.isOffsetFixed && o.offset === 0) {
|
|
32974
|
+
c += "Z";
|
|
32975
|
+
} else if (o.o < 0) {
|
|
32976
|
+
c += "-";
|
|
32977
|
+
c += padStart(Math.trunc(-o.o / 60));
|
|
32978
|
+
c += ":";
|
|
32979
|
+
c += padStart(Math.trunc(-o.o % 60));
|
|
32980
|
+
} else {
|
|
32981
|
+
c += "+";
|
|
32982
|
+
c += padStart(Math.trunc(o.o / 60));
|
|
32983
|
+
c += ":";
|
|
32984
|
+
c += padStart(Math.trunc(o.o % 60));
|
|
32985
|
+
}
|
|
32897
32986
|
}
|
|
32898
32987
|
|
|
32899
|
-
return
|
|
32988
|
+
return c;
|
|
32900
32989
|
} // defaults for unspecified units in the supported calendars
|
|
32901
32990
|
|
|
32902
32991
|
|
|
@@ -33091,9 +33180,9 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
33091
33180
|
var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
|
|
33092
33181
|
|
|
33093
33182
|
if (unchanged) {
|
|
33094
|
-
var
|
|
33095
|
-
c =
|
|
33096
|
-
o =
|
|
33183
|
+
var _ref = [config.old.c, config.old.o];
|
|
33184
|
+
c = _ref[0];
|
|
33185
|
+
o = _ref[1];
|
|
33097
33186
|
} else {
|
|
33098
33187
|
var ot = zone.offset(this.ts);
|
|
33099
33188
|
c = tsToObj(this.ts, ot);
|
|
@@ -33763,11 +33852,11 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
33763
33852
|
;
|
|
33764
33853
|
|
|
33765
33854
|
_proto.setZone = function setZone(zone, _temp) {
|
|
33766
|
-
var
|
|
33767
|
-
|
|
33768
|
-
keepLocalTime =
|
|
33769
|
-
|
|
33770
|
-
keepCalendarTime =
|
|
33855
|
+
var _ref2 = _temp === void 0 ? {} : _temp,
|
|
33856
|
+
_ref2$keepLocalTime = _ref2.keepLocalTime,
|
|
33857
|
+
keepLocalTime = _ref2$keepLocalTime === void 0 ? false : _ref2$keepLocalTime,
|
|
33858
|
+
_ref2$keepCalendarTim = _ref2.keepCalendarTime,
|
|
33859
|
+
keepCalendarTime = _ref2$keepCalendarTim === void 0 ? false : _ref2$keepCalendarTim;
|
|
33771
33860
|
|
|
33772
33861
|
zone = normalizeZone(zone, Settings.defaultZone);
|
|
33773
33862
|
|
|
@@ -33802,10 +33891,10 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
33802
33891
|
;
|
|
33803
33892
|
|
|
33804
33893
|
_proto.reconfigure = function reconfigure(_temp2) {
|
|
33805
|
-
var
|
|
33806
|
-
locale =
|
|
33807
|
-
numberingSystem =
|
|
33808
|
-
outputCalendar =
|
|
33894
|
+
var _ref3 = _temp2 === void 0 ? {} : _temp2,
|
|
33895
|
+
locale = _ref3.locale,
|
|
33896
|
+
numberingSystem = _ref3.numberingSystem,
|
|
33897
|
+
outputCalendar = _ref3.outputCalendar;
|
|
33809
33898
|
|
|
33810
33899
|
var loc = this.loc.clone({
|
|
33811
33900
|
locale: locale,
|
|
@@ -33908,7 +33997,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
33908
33997
|
* See {@link DateTime#plus}
|
|
33909
33998
|
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
|
|
33910
33999
|
@return {DateTime}
|
|
33911
|
-
|
|
34000
|
+
*/
|
|
33912
34001
|
;
|
|
33913
34002
|
|
|
33914
34003
|
_proto.minus = function minus(duration) {
|
|
@@ -34073,7 +34162,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34073
34162
|
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
|
|
34074
34163
|
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
|
|
34075
34164
|
* @param {string} [opts.format='extended'] - choose between the basic and extended format
|
|
34076
|
-
* @example DateTime.utc(
|
|
34165
|
+
* @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
|
|
34077
34166
|
* @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
|
|
34078
34167
|
* @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
|
|
34079
34168
|
* @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
|
|
@@ -34081,16 +34170,28 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34081
34170
|
*/
|
|
34082
34171
|
;
|
|
34083
34172
|
|
|
34084
|
-
_proto.toISO = function toISO(
|
|
34085
|
-
|
|
34086
|
-
|
|
34087
|
-
|
|
34173
|
+
_proto.toISO = function toISO(_temp3) {
|
|
34174
|
+
var _ref4 = _temp3 === void 0 ? {} : _temp3,
|
|
34175
|
+
_ref4$format = _ref4.format,
|
|
34176
|
+
format = _ref4$format === void 0 ? "extended" : _ref4$format,
|
|
34177
|
+
_ref4$suppressSeconds = _ref4.suppressSeconds,
|
|
34178
|
+
suppressSeconds = _ref4$suppressSeconds === void 0 ? false : _ref4$suppressSeconds,
|
|
34179
|
+
_ref4$suppressMillise = _ref4.suppressMilliseconds,
|
|
34180
|
+
suppressMilliseconds = _ref4$suppressMillise === void 0 ? false : _ref4$suppressMillise,
|
|
34181
|
+
_ref4$includeOffset = _ref4.includeOffset,
|
|
34182
|
+
includeOffset = _ref4$includeOffset === void 0 ? true : _ref4$includeOffset;
|
|
34088
34183
|
|
|
34089
34184
|
if (!this.isValid) {
|
|
34090
34185
|
return null;
|
|
34091
34186
|
}
|
|
34092
34187
|
|
|
34093
|
-
|
|
34188
|
+
var ext = format === "extended";
|
|
34189
|
+
|
|
34190
|
+
var c = _toISODate(this, ext);
|
|
34191
|
+
|
|
34192
|
+
c += "T";
|
|
34193
|
+
c += _toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset);
|
|
34194
|
+
return c;
|
|
34094
34195
|
}
|
|
34095
34196
|
/**
|
|
34096
34197
|
* Returns an ISO 8601-compliant string representation of this DateTime's date component
|
|
@@ -34102,18 +34203,16 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34102
34203
|
*/
|
|
34103
34204
|
;
|
|
34104
34205
|
|
|
34105
|
-
_proto.toISODate = function toISODate(
|
|
34106
|
-
var _ref5 =
|
|
34206
|
+
_proto.toISODate = function toISODate(_temp4) {
|
|
34207
|
+
var _ref5 = _temp4 === void 0 ? {} : _temp4,
|
|
34107
34208
|
_ref5$format = _ref5.format,
|
|
34108
34209
|
format = _ref5$format === void 0 ? "extended" : _ref5$format;
|
|
34109
34210
|
|
|
34110
|
-
|
|
34111
|
-
|
|
34112
|
-
if (this.year > 9999) {
|
|
34113
|
-
fmt = "+" + fmt;
|
|
34211
|
+
if (!this.isValid) {
|
|
34212
|
+
return null;
|
|
34114
34213
|
}
|
|
34115
34214
|
|
|
34116
|
-
return
|
|
34215
|
+
return _toISODate(this, format === "extended");
|
|
34117
34216
|
}
|
|
34118
34217
|
/**
|
|
34119
34218
|
* Returns an ISO 8601-compliant string representation of this DateTime's week date
|
|
@@ -34141,8 +34240,8 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34141
34240
|
*/
|
|
34142
34241
|
;
|
|
34143
34242
|
|
|
34144
|
-
_proto.toISOTime = function toISOTime(
|
|
34145
|
-
var _ref6 =
|
|
34243
|
+
_proto.toISOTime = function toISOTime(_temp5) {
|
|
34244
|
+
var _ref6 = _temp5 === void 0 ? {} : _temp5,
|
|
34146
34245
|
_ref6$suppressMillise = _ref6.suppressMilliseconds,
|
|
34147
34246
|
suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise,
|
|
34148
34247
|
_ref6$suppressSeconds = _ref6.suppressSeconds,
|
|
@@ -34154,16 +34253,15 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34154
34253
|
_ref6$format = _ref6.format,
|
|
34155
34254
|
format = _ref6$format === void 0 ? "extended" : _ref6$format;
|
|
34156
34255
|
|
|
34157
|
-
|
|
34158
|
-
|
|
34159
|
-
|
|
34160
|
-
|
|
34161
|
-
|
|
34162
|
-
|
|
34163
|
-
});
|
|
34256
|
+
if (!this.isValid) {
|
|
34257
|
+
return null;
|
|
34258
|
+
}
|
|
34259
|
+
|
|
34260
|
+
var c = includePrefix ? "T" : "";
|
|
34261
|
+
return c + _toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset);
|
|
34164
34262
|
}
|
|
34165
34263
|
/**
|
|
34166
|
-
* Returns an RFC 2822-compatible string representation of this DateTime
|
|
34264
|
+
* Returns an RFC 2822-compatible string representation of this DateTime
|
|
34167
34265
|
* @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
|
|
34168
34266
|
* @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
|
|
34169
34267
|
* @return {string}
|
|
@@ -34174,7 +34272,7 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34174
34272
|
return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
|
|
34175
34273
|
}
|
|
34176
34274
|
/**
|
|
34177
|
-
* Returns a string representation of this DateTime appropriate for use in HTTP headers.
|
|
34275
|
+
* Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
|
|
34178
34276
|
* Specifically, the string conforms to RFC 1123.
|
|
34179
34277
|
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
|
|
34180
34278
|
* @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
|
|
@@ -34194,7 +34292,11 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34194
34292
|
;
|
|
34195
34293
|
|
|
34196
34294
|
_proto.toSQLDate = function toSQLDate() {
|
|
34197
|
-
|
|
34295
|
+
if (!this.isValid) {
|
|
34296
|
+
return null;
|
|
34297
|
+
}
|
|
34298
|
+
|
|
34299
|
+
return _toISODate(this, true);
|
|
34198
34300
|
}
|
|
34199
34301
|
/**
|
|
34200
34302
|
* Returns a string representation of this DateTime appropriate for use in SQL Time
|
|
@@ -34209,18 +34311,26 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34209
34311
|
*/
|
|
34210
34312
|
;
|
|
34211
34313
|
|
|
34212
|
-
_proto.toSQLTime = function toSQLTime(
|
|
34213
|
-
var _ref7 =
|
|
34314
|
+
_proto.toSQLTime = function toSQLTime(_temp6) {
|
|
34315
|
+
var _ref7 = _temp6 === void 0 ? {} : _temp6,
|
|
34214
34316
|
_ref7$includeOffset = _ref7.includeOffset,
|
|
34215
34317
|
includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset,
|
|
34216
34318
|
_ref7$includeZone = _ref7.includeZone,
|
|
34217
34319
|
includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone;
|
|
34218
34320
|
|
|
34219
|
-
|
|
34220
|
-
|
|
34221
|
-
|
|
34222
|
-
|
|
34223
|
-
|
|
34321
|
+
var fmt = "HH:mm:ss.SSS";
|
|
34322
|
+
|
|
34323
|
+
if (includeZone || includeOffset) {
|
|
34324
|
+
fmt += " ";
|
|
34325
|
+
|
|
34326
|
+
if (includeZone) {
|
|
34327
|
+
fmt += "z";
|
|
34328
|
+
} else if (includeOffset) {
|
|
34329
|
+
fmt += "ZZ";
|
|
34330
|
+
}
|
|
34331
|
+
}
|
|
34332
|
+
|
|
34333
|
+
return toTechFormat(this, fmt, true);
|
|
34224
34334
|
}
|
|
34225
34335
|
/**
|
|
34226
34336
|
* Returns a string representation of this DateTime appropriate for use in SQL DateTime
|
|
@@ -34424,10 +34534,10 @@ var DateTime = /*#__PURE__*/function () {
|
|
|
34424
34534
|
_proto.hasSame = function hasSame(otherDateTime, unit) {
|
|
34425
34535
|
if (!this.isValid) return false;
|
|
34426
34536
|
var inputMs = otherDateTime.valueOf();
|
|
34427
|
-
var
|
|
34537
|
+
var adjustedToZone = this.setZone(otherDateTime.zone, {
|
|
34428
34538
|
keepLocalTime: true
|
|
34429
34539
|
});
|
|
34430
|
-
return
|
|
34540
|
+
return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit);
|
|
34431
34541
|
}
|
|
34432
34542
|
/**
|
|
34433
34543
|
* Equality check
|
|
@@ -35226,7 +35336,7 @@ function friendlyDateTime(dateTimeish) {
|
|
|
35226
35336
|
}
|
|
35227
35337
|
}
|
|
35228
35338
|
|
|
35229
|
-
var VERSION = "2.
|
|
35339
|
+
var VERSION = "2.3.0";
|
|
35230
35340
|
|
|
35231
35341
|
exports.DateTime = DateTime;
|
|
35232
35342
|
exports.Duration = Duration;
|