xctc-utils 1.5.7 → 1.5.8

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.
@@ -126,6 +126,7 @@ function getDateData(value, format) {
126
126
  str = "".concat(str, "/").concat(month);
127
127
  }
128
128
  else {
129
+ month = "01";
129
130
  str = "".concat(str, "/01");
130
131
  }
131
132
  var dayIndex = format.indexOf("DD");
@@ -134,6 +135,7 @@ function getDateData(value, format) {
134
135
  str = "".concat(str, "/").concat(day);
135
136
  }
136
137
  else {
138
+ day = "01";
137
139
  str = "".concat(str, "/01");
138
140
  }
139
141
  var hourIndex = format.indexOf("HH");
@@ -142,6 +144,7 @@ function getDateData(value, format) {
142
144
  str = "".concat(str, " ").concat(hour);
143
145
  }
144
146
  else {
147
+ hour = "00";
145
148
  str = "".concat(str, " 00");
146
149
  }
147
150
  var minuteIndex = format.indexOf("mm");
@@ -150,6 +153,7 @@ function getDateData(value, format) {
150
153
  str = "".concat(str, ":").concat(minute);
151
154
  }
152
155
  else {
156
+ minute = "00";
153
157
  str = "".concat(str, ":00");
154
158
  }
155
159
  var secondIndex = format.indexOf("ss");
@@ -158,6 +162,7 @@ function getDateData(value, format) {
158
162
  str = "".concat(str, ":").concat(second);
159
163
  }
160
164
  else {
165
+ second = "01";
161
166
  str = "".concat(str, ":01");
162
167
  }
163
168
  now = new Date(str);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "localStorage存储\r ```\r sessionStorage存储\r ```\r crypto-js加密、解密\r ```\r 微信授权登录、微信分享\r ```\r 设备环境获取\r ```\r 是否是微信浏览器\r ```\r 时间戳转时间,字符串转时间戳",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",