mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-06 08:43:56 +09:00
✌️
This commit is contained in:
13
src/web/app/common/scripts/date-stringify.js
Normal file
13
src/web/app/common/scripts/date-stringify.js
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = date => {
|
||||
if (typeof date == 'string') date = new Date(date);
|
||||
return (
|
||||
date.getFullYear() + '年' +
|
||||
date.getMonth() + 1 + '月' +
|
||||
date.getDate() + '日' +
|
||||
' ' +
|
||||
date.getHours() + '時' +
|
||||
date.getMinutes() + '分' +
|
||||
' ' +
|
||||
`(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})`
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user