efront 4.5.13 → 4.5.14
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.
- package/coms/basic/filterTime.js +5 -5
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/basic/filterTime.js
CHANGED
|
@@ -48,7 +48,7 @@ function filterTime(time, formater) {
|
|
|
48
48
|
return format.call(value, formater);
|
|
49
49
|
}
|
|
50
50
|
if (formater) {
|
|
51
|
-
formater =
|
|
51
|
+
formater = formater.charAt(0);
|
|
52
52
|
}
|
|
53
53
|
var splited = getSplitedDate(value);
|
|
54
54
|
var now = new Date;
|
|
@@ -97,12 +97,12 @@ function filterTime(time, formater) {
|
|
|
97
97
|
switch (year1 - year) {
|
|
98
98
|
case 0:
|
|
99
99
|
if (value > now) {
|
|
100
|
-
return `今年${month}${
|
|
100
|
+
return `今年${month}${formater || '月'}${date}${formater ? '' : '日'} ${time}`;
|
|
101
101
|
}
|
|
102
|
-
return `${month}${
|
|
102
|
+
return `${month}${formater || '月'}${date}${formater ? '' : '日'} `;
|
|
103
103
|
case 1:
|
|
104
104
|
if (month1 < month) {
|
|
105
|
-
return `${month}${
|
|
105
|
+
return `${month}${formater || '月'}${date}${formater ? '' : '日'} `;
|
|
106
106
|
}
|
|
107
107
|
return "去年" + month + "月";
|
|
108
108
|
case -1:
|
|
@@ -112,6 +112,6 @@ function filterTime(time, formater) {
|
|
|
112
112
|
case -2:
|
|
113
113
|
return "后年" + month + "月" + date + "日";
|
|
114
114
|
}
|
|
115
|
-
return `${year}${
|
|
115
|
+
return `${year}${formater || '年'}${month}${formater || "月"}`;
|
|
116
116
|
}
|
|
117
117
|
}
|