Date formatting, take 5 (#748)

This commit is contained in:
Imre Kristoffer Eilertsen 2019-04-06 17:47:11 +02:00 committed by Collin M. Barrett
parent 3a03d28cd9
commit 9bc4ceede8

View file

@ -1,5 +1,4 @@
import * as React from "react";
import * as moment from "moment";
interface IProps {
updatedDate: string;
@ -8,8 +7,6 @@ interface IProps {
export const UpdatedDate = (props: IProps) =>
props.updatedDate
? <li className="list-group-item">
<p>Updated: {moment(props.updatedDate.toLocaleString()).isValid()
? moment(props.updatedDate.toLocaleString()).format("l")
: "N/A"}</p>
<p>Updated: {props.updatedDate.toLocaleString()}</p>
</li>
: null;