Closed dfaulken closed 6 years ago
Seems like we should round that off before using the estimation, to avoid this weirdness
By 'round that off', do you mean consistently round up (or down) before having momentjs
format it? That's def the solution.
FWIW another way of stating the bug is as follows: Avail gives us times like this:
{
sdt: 10:02:00
edt: 10:02:59
}
When the current time is 10:00:00, moment will "round" and say that sdt is in 2 minutes and that edt is in 3, but we also show that they're both technically at 10:02.
@jmchatton mentioned that it would be useful if sdt
and edt
s in the past could include ago
in the human readable time.
Look at the first departure in the expanded R10 section. The 5:55 time is in the past, and it's appropriately counting how many minutes ago that was. Is it possible to make it say
5 minutes ago
rather than just5 minutes
so that it's a bit more specific?
It's weird to say that 1:54 PM is in both one and two minutes. Presumably this comes from the Avail side in the form of an EDT including seconds. Seems like we should round that off before using the estimation, to avoid this weirdness.