From e04bfd370518e74f4f2ddddd28030ba211dd5087 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Sun, 7 Apr 2019 22:04:09 +0200 Subject: [PATCH] Reverting the date formatting (#749) * Date formatting, part 6 * Update UpdatedDate.tsx * This is a long-shot for the ages * I'm beginning to run out of options * Update UpdatedDate.tsx * One last shot. If this fails, I'll give up. * Reverting to the October 2018 file --- .../home/components/detailsExpander/infoCard/UpdatedDate.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/UpdatedDate.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/UpdatedDate.tsx index 5f8d51d4f..7e72853f0 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/UpdatedDate.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/UpdatedDate.tsx @@ -1,4 +1,5 @@ import * as React from "react"; +import * as moment from "moment"; interface IProps { updatedDate: string; @@ -7,6 +8,8 @@ interface IProps { export const UpdatedDate = (props: IProps) => props.updatedDate ?
  • -

    Updated: {props.updatedDate.toLocaleString()}

    +

    Updated: {moment(props.updatedDate).isValid() + ? moment(props.updatedDate).format("l") + : "N/A"}

  • : null;