@konplit-services/common 1.0.301 → 1.0.302

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.
@@ -23,7 +23,7 @@ export declare const convertDateToUTCString: (startTime: string) => string;
23
23
  export declare const convertDateToUTC: (startTime: string) => Date;
24
24
  type PlanInterval = keyof typeof PLAN_INTERVAL;
25
25
  export declare const getDuration: (duration: PlanInterval) => number;
26
- export declare const getFutureDateFromPlan: (duration: PlanInterval) => Date;
26
+ export declare const getFutureDateFromPlan: (startDate: Date, duration: PlanInterval) => Date;
27
27
  export declare const calculateDelay: (targetDate: string | Date) => {
28
28
  isValid: boolean;
29
29
  message: string;
@@ -106,8 +106,8 @@ const getDuration = (duration) => {
106
106
  }
107
107
  };
108
108
  exports.getDuration = getDuration;
109
- const getFutureDateFromPlan = (duration) => {
110
- const currentDate = (0, dayjs_1.default)();
109
+ const getFutureDateFromPlan = (startDate, duration) => {
110
+ const currentDate = (0, dayjs_1.default)(startDate);
111
111
  switch (duration) {
112
112
  case plan_types_1.PLAN_INTERVAL.HOURLY:
113
113
  return currentDate.add(1, "hour").toDate(); // Convert to Date object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.301",
3
+ "version": "1.0.302",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",