Fixed: End year for series not showing correctly in some cases

This commit is contained in:
Mark McDowall 2022-12-30 13:21:49 -08:00
parent 8fff59ff10
commit 4baa2a07ba
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import _ from 'lodash'; import _ from 'lodash';
import moment from 'moment';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import TextTruncate from 'react-text-truncate'; import TextTruncate from 'react-text-truncate';
@ -59,8 +60,9 @@ function getExpandedState(newState) {
} }
function getDateYear(date) { function getDateYear(date) {
const dateDate = new Date(date); const dateDate = moment(date);
return dateDate.getFullYear();
return dateDate.format('YYYY');
} }
class SeriesDetails extends Component { class SeriesDetails extends Component {