summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/date-stringify.ls
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common/scripts/date-stringify.ls')
-rw-r--r--src/web/app/common/scripts/date-stringify.ls14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/date-stringify.ls b/src/web/app/common/scripts/date-stringify.ls
new file mode 100644
index 0000000000..9aa8b3e6c5
--- /dev/null
+++ b/src/web/app/common/scripts/date-stringify.ls
@@ -0,0 +1,14 @@
+module.exports = (date) ->
+ if typeof date == \string then date = new Date date
+
+ text =
+ date.get-full-year! + \年 +
+ date.get-month! + \月 +
+ date.get-date! + \日 +
+ ' ' +
+ date.get-hours! + \時 +
+ date.get-minutes! + \分 +
+ ' ' +
+ "(#{[\日 \月 \火 \水 \木 \金 \土][date.get-day!]})"
+
+ return text