sim-node-lib 0.0.35 → 0.0.36

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.
@@ -1,4 +1,4 @@
1
- export declare class DateUtils {
1
+ export declare class DateHelper {
2
2
  static normalizeDate(mixedDate: Date | string | undefined | Date): Date;
3
3
  static validateDateBetweenTwoDatesWithDate(fromDate: Date, toDate: Date, givenDate: Date): boolean;
4
4
  static validateDateBetweenTwoDatesWithString(fromDate: Date, toDate: Date, givenDate: Date): boolean;
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateUtils = void 0;
3
+ exports.DateHelper = void 0;
4
4
  const moment = require("moment");
5
- class DateUtils {
5
+ class DateHelper {
6
6
  static normalizeDate(mixedDate) {
7
7
  return typeof mixedDate === 'string' ? new Date() : mixedDate;
8
8
  }
9
9
  static validateDateBetweenTwoDatesWithDate(fromDate, toDate, givenDate) {
10
- return (givenDate <= DateUtils.normalizeDate(toDate) && givenDate >= DateUtils.normalizeDate(fromDate));
10
+ return givenDate <= this.normalizeDate(toDate) && givenDate >= this.normalizeDate(fromDate);
11
11
  }
12
12
  static validateDateBetweenTwoDatesWithString(fromDate, toDate, givenDate) {
13
- return DateUtils.validateDateBetweenTwoDatesWithDate(fromDate, toDate, DateUtils.normalizeDate(givenDate));
13
+ return this.validateDateBetweenTwoDatesWithDate(fromDate, toDate, this.normalizeDate(givenDate));
14
14
  }
15
15
  static validateCurrentDateBetweenTwoDates(fromDate, toDate) {
16
- return DateUtils.validateDateBetweenTwoDatesWithDate(fromDate, toDate, new Date());
16
+ return this.validateDateBetweenTwoDatesWithDate(fromDate, toDate, new Date());
17
17
  }
18
18
  static dateToStringFormatBR(date) {
19
19
  return this.dateToStringFormat(date, 'DD/MM/yyyy');
@@ -26,4 +26,4 @@ class DateUtils {
26
26
  return Math.trunc((Math.abs(startData.getTime() - endData.getTime()) / 36e5) * 60);
27
27
  }
28
28
  }
29
- exports.DateUtils = DateUtils;
29
+ exports.DateHelper = DateHelper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-node-lib",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "Library from SIMLabs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",