Commit 351a2025 authored by ugur22's avatar ugur22
Browse files

removed duplicate code for getting local date format

parent 3d1fa4fa
Pipeline #243 failed with stages
......@@ -46,7 +46,6 @@ class LineGraph extends React.Component {
xAxisTickFormatter(timestamp_measured) {
return moment(timestamp_measured)
.locale("nl-be")
.format("ll")
.slice(0, 5);
}
......@@ -54,8 +53,8 @@ class LineGraph extends React.Component {
CustomTooltip = ({ active, payload, label }) => {
let time = moment(label).locale("nl-be").format('LT');
let dateTip = moment(label).locale("nl-be").format("llll")
let time = moment(label).format('LT');
let dateTip = moment(label).format("llll")
.slice(0, 10);
let formattedDate = dateTip + " " + time;
......@@ -83,7 +82,6 @@ class LineGraph extends React.Component {
let { stationInfo, split } = this.state;
moment()
.locale("nl-be", localization)
.format("LL");
return (
<div>
{this.state.split ? (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment