Mercurial > gemma
changeset 1527:3cc3b7390805
merge
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 07 Dec 2018 11:21:16 +0100 |
parents | 4f62e2610740 (current diff) 4dbed34f8738 (diff) |
children | 5874cedd7f91 |
files | |
diffstat | 1 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/lib/date.js Fri Dec 07 11:20:44 2018 +0100 +++ b/client/src/lib/date.js Fri Dec 07 11:21:16 2018 +0100 @@ -1,9 +1,25 @@ +/* This is Free Software under GNU Affero General Public License v >= 3.0 + * without warranty, see README.md and license for details. + * + * SPDX-License-Identifier: AGPL-3.0-or-later + * License-Filename: LICENSES/AGPL-3.0.txt + * + * Copyright (C) 2018 by via donau + * – Österreichische Wasserstraßen-Gesellschaft mbH + * Software engineering by Intevation GmbH + * + * Author(s): + * Thomas Junk <thomas.junk@intevation.de> + */ + +import locale2 from "locale2"; + const formatSurveyDate = current => { return current - ? new Date(current).toLocaleDateString({ - weekday: "short", + ? new Date(current).toLocaleDateString(locale2, { day: "2-digit", - month: "2-digit" + month: "2-digit", + year: "numeric" }) : ""; };