| | |
| | | return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', second ].join(''); |
| | | } |
| | | |
| | | export { gsdate, setTime } |
| | | /*** |
| | | * |
| | | * @param time 日期 年月日时分秒 |
| | | * @param Sign 间隔 |
| | | */ |
| | | function setTimeO (time, Sign) { |
| | | let year = time.getFullYear(); |
| | | let month = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : `0${time.getMonth() + 1}`; |
| | | let day = time.getDate() >= 10 ? time.getDate() : `0${time.getDate()}`; |
| | | let hour = time.getHours() >= 10 ? time.getHours() : `0${time.getHours()}`; |
| | | let minute = time.getMinutes() >= 10 ? time.getMinutes() : `0${time.getMinutes()}`; |
| | | let second = time.getSeconds() >= 10 ? time.getSeconds() : `0${time.getSeconds()}`; |
| | | return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', '00' ].join(''); |
| | | } |
| | | |
| | | export { gsdate, setTime, setTimeO } |