joye-backend-utility 4.1.11 → 4.1.12

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.
@@ -8,3 +8,4 @@ export declare const addYears: (date: string, year: number, format?: string) =>
8
8
  export declare const addMinutes: (date: string, minute: number, format?: string) => string;
9
9
  export declare const getPreviousWorkday: () => any;
10
10
  export declare const get2ndLastPreviousWorkday: () => any;
11
+ export declare const getCurrentEpoch: () => any;
package/dist/dateTime.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.get2ndLastPreviousWorkday = exports.getPreviousWorkday = exports.addMinutes = exports.addYears = exports.addDays = exports.getCurrentUtcTime = exports.getDatesBetweenRange = exports.newDate = exports.getMoment = exports.getCurrentDateTime = void 0;
3
+ exports.getCurrentEpoch = exports.get2ndLastPreviousWorkday = exports.getPreviousWorkday = exports.addMinutes = exports.addYears = exports.addDays = exports.getCurrentUtcTime = exports.getDatesBetweenRange = exports.newDate = exports.getMoment = exports.getCurrentDateTime = void 0;
4
4
  const moment = require('moment');
5
5
  const dateFormat = 'YYYY-MM-DD';
6
6
  const getCurrentDateTime = (date, format = dateFormat) => {
@@ -76,3 +76,7 @@ const get2ndLastPreviousWorkday = () => {
76
76
  return workday.subtract(diff, 'days').format('DD-MM-yyyy');
77
77
  };
78
78
  exports.get2ndLastPreviousWorkday = get2ndLastPreviousWorkday;
79
+ const getCurrentEpoch = () => {
80
+ return moment.utc().valueOf();
81
+ };
82
+ exports.getCurrentEpoch = getCurrentEpoch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "4.1.11",
3
+ "version": "4.1.12",
4
4
  "description": "Joye backend utility for db functions and common functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",