From f95444312f9a9acf4f681fd92e530527bc174d69 Mon Sep 17 00:00:00 2001 From: Euan Date: Sun, 3 May 2020 22:08:31 +0100 Subject: [PATCH] Fix #490 - package last updated date (#491) Fixes #490 by using `Date.prototype.toLocaleDateString()` to format date values used to show when a package was last updated. --- src/BaGet.UI/src/DisplayPackage/Versions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaGet.UI/src/DisplayPackage/Versions.tsx b/src/BaGet.UI/src/DisplayPackage/Versions.tsx index fd357bc8..1861b391 100644 --- a/src/BaGet.UI/src/DisplayPackage/Versions.tsx +++ b/src/BaGet.UI/src/DisplayPackage/Versions.tsx @@ -99,6 +99,6 @@ export class Versions extends React.Component { private showFewerVersions = () => this.setState({ showAll: false }); private dateToString(date: Date): string { - return `${date.getMonth()+1}/${date.getDate()}/${date.getFullYear()}`; + return date.toLocaleDateString(); } }