Showing
1 changed file
with
3 additions
and
3 deletions
| @@ -62,12 +62,12 @@ function unixtoTime(ns,format) { | @@ -62,12 +62,12 @@ function unixtoTime(ns,format) { | ||
| 62 | var day1 = timeStamp+86400//今天结束 | 62 | var day1 = timeStamp+86400//今天结束 |
| 63 | var day2 = day1+86400//明天结束 | 63 | var day2 = day1+86400//明天结束 |
| 64 | 64 | ||
| 65 | - //console.log('ns<day.getTime()',ns,day1,day2) | 65 | + //console.log('ns<day.getTime()',timeStamp,ns,day1,day2) |
| 66 | 66 | ||
| 67 | - if(ns<day1){ | 67 | + if(ns>=timeStamp && ns<day1){ |
| 68 | result=result.replace('DAY','今天'); | 68 | result=result.replace('DAY','今天'); |
| 69 | }else{ | 69 | }else{ |
| 70 | - if(ns<day2){ | 70 | + if(ns>=day1 && ns<day2){ |
| 71 | result=result.replace('DAY','明天'); | 71 | result=result.replace('DAY','明天'); |
| 72 | }else{ | 72 | }else{ |
| 73 | result=result.replace('DAY',''); | 73 | result=result.replace('DAY',''); |
-
Please register or login to post a comment