Browse Source

Only show times that are in the future

master
Elis Hirwing 4 years ago
parent
commit
0dcb10805a
Signed by: etu GPG Key ID: D57EFA625C9A925F
  1. 20
      src/statusscreen/SL.go

20
src/statusscreen/SL.go

@ -72,15 +72,17 @@ func (sl *SL) GetOutput() string {
}
for _, v := range sl.lastResponse.ResponseData.Metros {
formattedTime, _ := sl.formatDisplayTime(v.ExpectedDateTime)
table.Append([]string{
v.LineNumber,
v.Destination,
formattedTime,
v.TimeTabledDateTime[11:], // Remove YYYY-MM-DDT from the beginning of the string
v.ExpectedDateTime[11:], // Remove YYYY-MM-DDT from the beginning of the string
})
formattedTime, err := sl.formatDisplayTime(v.ExpectedDateTime)
if err == nil {
table.Append([]string{
v.LineNumber,
v.Destination,
formattedTime,
v.TimeTabledDateTime[11:], // Remove YYYY-MM-DDT from the beginning of the string
v.ExpectedDateTime[11:], // Remove YYYY-MM-DDT from the beginning of the string
})
}
}
table.Render()

Loading…
Cancel
Save