summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/date-stringify.ts
blob: e51de8833d8b6ba2ce6410376a78f00c07505cc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()]})`
	);
};