@ancon/wildcat-utils 1.44.0-r13-2-tz.17 → 1.44.0-r13-2-tz.18

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.
@@ -3,6 +3,7 @@ import moment, { Moment } from 'moment';
3
3
  * This function converts a given moment object to the local timezone by adjusting the UTC offset.
4
4
  *
5
5
  * @param dateTimeMoment The moment object to convert to the local timezone.
6
+ * @param keepLocalTime Optional flag that specifies whether the offset would be changed without modifying the actual time itself.
6
7
  * @returns The moment object converted to the local timezone.
7
8
  */
8
- export default function convertToLocalTimezone(dateTimeMoment: Moment): moment.Moment;
9
+ export default function convertToLocalTimezone(dateTimeMoment: Moment, keepLocalTime?: boolean): moment.Moment;
@@ -1 +1 @@
1
- "use strict";const f=require("moment"),c=require("./getTimezoneUtcOffsetDifference.js");function r(t){const e=f();return c(e,t)?t.utcOffset(e.utcOffset()):t}module.exports=r;
1
+ "use strict";const c=require("moment"),r=require("./getTimezoneUtcOffsetDifference.js");function s(t,f){const e=c();return r(e,t)?t.utcOffset(e.utcOffset(),f):t}module.exports=s;
@@ -1,12 +1,12 @@
1
- import e from "moment";
2
- import o from "./getTimezoneUtcOffsetDifference.mjs";
3
- function i(f) {
4
- const t = e();
5
- return o(
1
+ import o from "moment";
2
+ import c from "./getTimezoneUtcOffsetDifference.mjs";
3
+ function s(f, e) {
4
+ const t = o();
5
+ return c(
6
6
  t,
7
7
  f
8
- ) ? f.utcOffset(t.utcOffset()) : f;
8
+ ) ? f.utcOffset(t.utcOffset(), e) : f;
9
9
  }
10
10
  export {
11
- i as default
11
+ s as default
12
12
  };
@@ -1 +1 @@
1
- "use strict";const m=require("moment"),r=require("../time/getTimeSpanParts.js");function s(i,o,e){const t=r(o),n=m(i);return e!==void 0&&n.utcOffset(e),n.hour(t.hours).minute(t.minutes).second(0).millisecond(0)}module.exports=s;
1
+ "use strict";const r=require("moment"),s=require("../time/getTimeSpanParts.js");function c(i,o,e){const t=s(o),n=r(i),m=n.hour(t.hours).minute(t.minutes).second(0).millisecond(0);return e!==void 0&&n.utcOffset(e),m}module.exports=c;
@@ -1,9 +1,9 @@
1
- import i from "moment";
2
- import r from "../time/getTimeSpanParts.mjs";
3
- function d(m, n, e) {
4
- const t = r(n), o = i(m);
5
- return e !== void 0 && o.utcOffset(e), o.hour(t.hours).minute(t.minutes).second(0).millisecond(0);
1
+ import r from "moment";
2
+ import s from "../time/getTimeSpanParts.mjs";
3
+ function u(n, m, e) {
4
+ const t = s(m), o = r(n), i = o.hour(t.hours).minute(t.minutes).second(0).millisecond(0);
5
+ return e !== void 0 && o.utcOffset(e), i;
6
6
  }
7
7
  export {
8
- d as default
8
+ u as default
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancon/wildcat-utils",
3
- "version": "1.44.0-r13-2-tz.17",
3
+ "version": "1.44.0-r13-2-tz.18",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",