mm_expand 1.6.2 → 1.6.3

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.
Files changed (2) hide show
  1. package/index.js +10 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1056,7 +1056,16 @@ if (typeof($) === "undefined") {
1056
1056
  * @return {String} 时间格式字符串
1057
1057
  */
1058
1058
  String.prototype.toTimeFormat = function(format) {
1059
- var str = this.replace('T', ' ').replace('Z', '').replaceAll('-', '/');
1059
+ var str = this;
1060
+ return str.toTime().toStr(format);
1061
+ };
1062
+ /**
1063
+ * @description 转为时间格式字符串
1064
+ * @param {String} format 转换的格式
1065
+ * @return {String} 时间格式字符串
1066
+ */
1067
+ String.prototype.toTimeStr = function(format) {
1068
+ var str = this;
1060
1069
  return str.toTime().toStr(format);
1061
1070
  };
1062
1071
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_expand",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "这是超级美眉原型函数拓展模块,更有利于对string、array、object的操作,避免出错,简化业务逻辑。",
5
5
  "main": "index.js",
6
6
  "scripts": {