Only show times that are in the future
parent
02ac39af65
commit
0dcb10805a
|
@ -72,15 +72,17 @@ func (sl *SL) GetOutput() string {
|
|||
}
|
||||
|
||||
for _, v := range sl.lastResponse.ResponseData.Metros {
|
||||
formattedTime, _ := sl.formatDisplayTime(v.ExpectedDateTime)
|
||||
formattedTime, err := 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
|
||||
})
|
||||
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…
Reference in New Issue