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 moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import TextTruncate from 'react-text-truncate';
@ -59,8 +60,9 @@ function getExpandedState(newState) {
}
function getDateYear(date) {
const dateDate = new Date(date);
return dateDate.getFullYear();
const dateDate = moment(date);
return dateDate.format('YYYY');
}
class SeriesDetails extends Component {