Changed interval date formatting so intervals spanning multiple days show ok

This commit is contained in:
Daniel Schick 2024-06-28 11:13:00 +02:00
parent c1b4affb20
commit 39f6e93576

View File

@ -98,7 +98,7 @@ namespace BreCalClient
if(times.OperationsStart.HasValue) if(times.OperationsStart.HasValue)
{ {
string result = times.OperationsStart.Value.ToString("dd.MM.yyyy HH:mm"); string result = times.OperationsStart.Value.ToString("dd.MM.yyyy HH:mm");
if (times.EtaIntervalEnd.HasValue) result += " - " + times.EtaIntervalEnd.Value.ToString("HH:mm"); if (times.EtaIntervalEnd.HasValue) result = times.OperationsStart.Value.ToString("d.M. HH:mm") + " - " + times.EtaIntervalEnd.Value.ToString("d.M. HH:mm");
return result; return result;
} }
else else
@ -111,7 +111,7 @@ namespace BreCalClient
if(times.EtaBerth.HasValue) if(times.EtaBerth.HasValue)
{ {
string result = times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm"); string result = times.EtaBerth.Value.ToString("dd.MM.yyyy HH:mm");
if (times.EtaIntervalEnd.HasValue) result += " - " + times.EtaIntervalEnd.Value.ToString("HH:mm"); if (times.EtaIntervalEnd.HasValue) result = times.EtaBerth.Value.ToString("d.M. HH:mm") + " - " + times.EtaIntervalEnd.Value.ToString("d.M. HH:mm");
return result; return result;
} }
else else
@ -127,7 +127,7 @@ namespace BreCalClient
if(times.OperationsEnd.HasValue) if(times.OperationsEnd.HasValue)
{ {
string result = times.OperationsEnd.Value.ToString("dd.MM.yyyy HH:mm"); string result = times.OperationsEnd.Value.ToString("dd.MM.yyyy HH:mm");
if (times.EtdIntervalEnd.HasValue) result += " - " + times.EtdIntervalEnd.Value.ToString("HH:mm"); if (times.EtdIntervalEnd.HasValue) result = times.OperationsEnd.Value.ToString("d.M. HH:mm") + " - " + times.EtdIntervalEnd.Value.ToString("d.M. HH:mm");
return result; return result;
} }
else else
@ -140,7 +140,7 @@ namespace BreCalClient
if(times.EtdBerth.HasValue) if(times.EtdBerth.HasValue)
{ {
string result = times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm"); string result = times.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm");
if (times.EtdIntervalEnd.HasValue) result += " - " + times.EtdIntervalEnd.Value.ToString("HH:mm"); if (times.EtdIntervalEnd.HasValue) result = times.EtdBerth.Value.ToString("d.M. HH:mm") + " - " + times.EtdIntervalEnd.Value.ToString("d.M. HH:mm");
return result; return result;
} }
else else