use shorter, localized date format

This commit is contained in:
Collin Barrett 2018-08-22 17:28:26 -05:00
parent 77b5de64fd
commit 3722f80337
2 changed files with 4 additions and 4 deletions

View file

@ -141,7 +141,7 @@ export class Home extends React.Component<RouteComponentProps<{}>, IHomeState> {
? (moment(b).isValid() ? (moment(a).isBefore(b) ? -1 : 1) : 1)
: -1,
Cell: (cell: any) => <div>{moment(cell.value).isValid()
? moment(cell.value).format(moment.HTML5_FMT.DATE)
? moment(cell.value).format("l")
: "N/A"}</div>,
style: { whiteSpace: "inherit" },
width: 100,

View file

@ -114,7 +114,7 @@ function RuleCount(props: any) {
function DiscontinuedDate(props: any) {
return props.date
? <li className="list-group-item">
<p>Discontinued: {moment(props.date).format("MMM D, Y")}</p>
<p>Discontinued: {moment(props.date).format("l")}</p>
</li>
: null;
}
@ -122,7 +122,7 @@ function DiscontinuedDate(props: any) {
function UpdatedDate(props: any) {
return props.date
? <li className="list-group-item">
<p>Last Updated by Maintainer: {moment(props.date).format("MMM D, Y")}</p>
<p>Last Updated by Maintainer: {moment(props.date).format("l")}</p>
</li>
: null;
}
@ -130,7 +130,7 @@ function UpdatedDate(props: any) {
function PublishedDate(props: any) {
return props.date
? <li className="list-group-item">
<p>Published: {moment(props.date).format("MMM D, Y")}</p>
<p>Published: {moment(props.date).format("l")}</p>
</li>
: null;
}