Fixed: End year for series not showing correctly in some cases
This commit is contained in:
parent
8fff59ff10
commit
4baa2a07ba
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue