utiller 1.0.166 → 1.0.169

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.
@@ -1414,6 +1414,11 @@ var Utiller = /*#__PURE__*/function () {
1414
1414
  value: function getECPayCurrentTimeFormat(ts) {
1415
1415
  return (0, _moment["default"])(ts ? ts : undefined).format("YYYY/MM/DD HH:mm:ss");
1416
1416
  }
1417
+ }, {
1418
+ key: "getCurrentTimeFormatV2",
1419
+ value: function getCurrentTimeFormatV2(ts) {
1420
+ return (0, _moment["default"])(ts ? ts : undefined).format("YYYY/MM/DD HH:mm:ss");
1421
+ }
1417
1422
  /** 取得 YYY-MM-DD-HH-mm-ss */
1418
1423
 
1419
1424
  }, {
@@ -1454,24 +1459,28 @@ var Utiller = /*#__PURE__*/function () {
1454
1459
  */
1455
1460
 
1456
1461
  }, {
1457
- key: "getTimeStampAfterCondition",
1458
- value: function getTimeStampAfterCondition() {
1459
- var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getCurrentTimeStamp();
1460
- var param = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
1462
+ key: "getTimeStampWithConditions",
1463
+ value: function getTimeStampWithConditions() {
1464
+ var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
1461
1465
  days: 0,
1462
1466
  months: 0,
1463
1467
  years: 0,
1464
1468
  minutes: 0,
1465
1469
  seconds: 0
1466
1470
  };
1471
+ var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getCurrentTimeStamp();
1467
1472
  var base = (0, _moment["default"])(target);
1468
1473
 
1469
1474
  for (var each in param) {
1470
1475
  var number = param[each];
1471
1476
  var unit = each;
1472
1477
 
1473
- if (number !== 0) {
1474
- base = base.add(number, unit);
1478
+ if (number > 0) {
1479
+ base = base.add(unit, number);
1480
+ }
1481
+
1482
+ if (number < 0) {
1483
+ base = base.subtract(unit, Math.abs(number));
1475
1484
  }
1476
1485
  }
1477
1486
 
@@ -812,7 +812,7 @@ var NodeUtiller = /*#__PURE__*/function (_Utiller) {
812
812
 
813
813
  case 11:
814
814
  this.cleanFileContent(file.absolute);
815
- Util.appendInfo("\u6210\u529F cleanChildFiles() -> '".concat(file.path, "'"));
815
+ this.appendInfo("\u6210\u529F cleanChildFiles() -> '".concat(file.path, "'"));
816
816
 
817
817
  case 13:
818
818
  _context7.next = 7;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utiller",
3
- "version": "1.0.166",
3
+ "version": "1.0.169",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
13
  "configerer": "^1.0.11",
14
- "utiller": "^1.0.165",
14
+ "utiller": "^1.0.168",
15
15
  "linepayer": "^1.0.4",
16
16
  "databazer": "^1.0.11",
17
17
  "lodash": "^4.17.20",