mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-17 05:26:39 +01:00
45e8331e26
Closes #12, #227 and #58
13 lines
355 B
JavaScript
13 lines
355 B
JavaScript
export default date => {
|
|
if (typeof date == 'string') date = new Date(date);
|
|
return (
|
|
date.getFullYear() + '年' +
|
|
(date.getMonth() + 1) + '月' +
|
|
date.getDate() + '日' +
|
|
' ' +
|
|
date.getHours() + '時' +
|
|
date.getMinutes() + '分' +
|
|
' ' +
|
|
`(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})`
|
|
);
|
|
};
|