Mercurial > gemma
changeset 1522:b34caa449c01
add date,js
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 06 Dec 2018 16:50:28 +0100 |
parents | 276df8dadc14 |
children | a0a16577261a |
files | client/src/lib/date.js |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
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 };