Jan-Bart / MMM-NMBS-Connection

Display upcoming trains between 2 NMBS/SNCB stations (Belgium)
GNU General Public License v3.0
1 stars 2 forks source link

Duration of train ride incorrect #3

Closed bdvrieze closed 6 years ago

bdvrieze commented 6 years ago

50fbe2ef-d7b8-4ed4-93c0-3ec0af9bdbef

As you ca see the duration of the ride is always one hour and not the correct time. This could be by design (these trains always run late 😉) but I don't think that it's meant this way.

Feature request (alas I can't code): it would be nice to have the name of the station under departure and arrival.

Again many thx for this module!

Jan-Bart commented 6 years ago

Hi @bdvrieze,

Because of the "humanize" function in moment.js duration times are rounded.

So, 46 minutes are rounded to the next full hour (1 hour) I could make this optional, so you can see the exact minutes as well.

I'll have a look to put the name of the station beneath departure and arrival.

Jan-Bart commented 6 years ago

@bdvrieze Both issues should be fixed now.

You can add it in config:

  config: {
    humanizeDuration: false,
    showStationNames: true,
  }
bdvrieze commented 6 years ago

I'll try it out ASAP :)

Thanks!

bdvrieze commented 6 years ago

Works like a charm thanks!