开发: footer css修改, 时间格式-改为/
This commit is contained in:
@@ -14,13 +14,12 @@ export const ChatTime: React.FC<IChatTimeProps> = (props) => {
|
||||
const now = new Date();
|
||||
const msgtimeStr = props.msgtime.replace(/-/g, '/');
|
||||
const msgtime = new Date(msgtimeStr);
|
||||
console.log(msgtime);
|
||||
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
const dayDiff =
|
||||
(new Date(
|
||||
`${now.getFullYear()}-${padWith(now.getMonth() + 1)}-${padWith(now.getDate())} 00:00:00`,
|
||||
`${now.getFullYear()}/${padWith(now.getMonth() + 1)}/${padWith(now.getDate())} 00:00:00`,
|
||||
).getTime() -
|
||||
new Date(msgtimeStr).getTime()) /
|
||||
(24 * 60 * 60 * 1000) +
|
||||
|
Reference in New Issue
Block a user