@bluemarble/bm-components 0.0.57 → 0.0.59
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/esm/index.js
CHANGED
|
@@ -15307,10 +15307,12 @@ function DateFormat(date) {
|
|
|
15307
15307
|
const data = {
|
|
15308
15308
|
utc: -3
|
|
15309
15309
|
};
|
|
15310
|
-
|
|
15311
|
-
|
|
15312
|
-
|
|
15313
|
-
|
|
15310
|
+
function formateDateWithCurrentUTC(newDate) {
|
|
15311
|
+
if (newDate) {
|
|
15312
|
+
date = moment(newDate)
|
|
15313
|
+
.add(data.utc + 3, 'hours')
|
|
15314
|
+
.toDate();
|
|
15315
|
+
}
|
|
15314
15316
|
}
|
|
15315
15317
|
function momentWithDate(utc = false) {
|
|
15316
15318
|
const current = moment(date).utc(utc);
|
|
@@ -15331,7 +15333,7 @@ function DateFormat(date) {
|
|
|
15331
15333
|
}
|
|
15332
15334
|
return moment().add(data.utc, 'hours');
|
|
15333
15335
|
}
|
|
15334
|
-
|
|
15336
|
+
const methods = {
|
|
15335
15337
|
from: {
|
|
15336
15338
|
db: momentWithDate(),
|
|
15337
15339
|
client: convertDateFromClient()
|
|
@@ -15339,9 +15341,13 @@ function DateFormat(date) {
|
|
|
15339
15341
|
now,
|
|
15340
15342
|
utc: (newUTC) => {
|
|
15341
15343
|
data.utc = newUTC;
|
|
15342
|
-
return
|
|
15344
|
+
return (newDate) => {
|
|
15345
|
+
formateDateWithCurrentUTC(newDate);
|
|
15346
|
+
return methods;
|
|
15347
|
+
};
|
|
15343
15348
|
}
|
|
15344
15349
|
};
|
|
15350
|
+
return methods;
|
|
15345
15351
|
}
|
|
15346
15352
|
|
|
15347
15353
|
function RouteHelper(methods, middlewares = []) {
|