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
This commit is contained in:
Imre Kristoffer Eilertsen 2019-04-07 22:04:09 +02:00 committed by Collin M. Barrett
parent 9bc4ceede8
commit e04bfd3705

View file

@ -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
? <li className="list-group-item">
<p>Updated: {props.updatedDate.toLocaleString()}</p>
<p>Updated: {moment(props.updatedDate).isValid()
? moment(props.updatedDate).format("l")
: "N/A"}</p>
</li>
: null;