mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 17:29:05 +01:00
✌️
This commit is contained in:
parent
47e89ccc1d
commit
f82bf60e5a
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()]})`
|
||||||
|
);
|
||||||
|
};
|
@ -1,14 +0,0 @@
|
|||||||
module.exports = (date) ->
|
|
||||||
if typeof date == \string then date = new Date date
|
|
||||||
|
|
||||||
text =
|
|
||||||
date.get-full-year! + \年 +
|
|
||||||
date.get-month! + 1 + \月 +
|
|
||||||
date.get-date! + \日 +
|
|
||||||
' ' +
|
|
||||||
date.get-hours! + \時 +
|
|
||||||
date.get-minutes! + \分 +
|
|
||||||
' ' +
|
|
||||||
"(#{[\日 \月 \火 \水 \木 \金 \土][date.get-day!]})"
|
|
||||||
|
|
||||||
return text
|
|
Loading…
Reference in New Issue
Block a user