Mercurial > gemma
diff client/src/lib/date.js @ 1522:b34caa449c01
add date,js
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 06 Dec 2018 16:50:28 +0100 |
parents | |
children | 4dbed34f8738 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/lib/date.js Thu Dec 06 16:50:28 2018 +0100 @@ -0,0 +1,11 @@ +const formatSurveyDate = current => { + return current + ? new Date(current).toLocaleDateString({ + weekday: "short", + day: "2-digit", + month: "2-digit" + }) + : ""; +}; + +export { formatSurveyDate };