# HG changeset patch # User Fadi Abbud # Date 1544178076 -3600 # Node ID 3cc3b739080539a27644a6d9c1bc363a1edb1f81 # Parent 4f62e261074036e37539760dbefc2025b8f08789# Parent 4dbed34f873828eae53b38511a6cdca90812b7ac merge diff -r 4f62e2610740 -r 3cc3b7390805 client/src/lib/date.js --- 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 + */ + +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" }) : ""; };