This commit is contained in:
Aya Morisawa 2018-08-02 19:03:31 +09:00
parent 0df093383d
commit 7b33c63f78
34 changed files with 167 additions and 74 deletions

View file

@ -1,12 +1,12 @@
export default date => {
if (typeof date == 'string') date = new Date(date);
return (
date.getFullYear() + '' +
(date.getMonth() + 1) + '' +
date.getDate() + '' +
date.getFullYear() + '%i18n:common.date.full-year%' +
(date.getMonth() + 1) + '%i18n:common.date.month%' +
date.getDate() + '%i18n:common.date.day%' +
' ' +
date.getHours() + '' +
date.getMinutes() + '' +
date.getHours() + '%i18n:common.date.hours%' +
date.getMinutes() + '%i18n:common.date.minutes%' +
' ' +
`(${['日', '月', '火', '水', '木', '金', '土'][date.getDay()]})`
);