Open ash123456789 opened 5 years ago
This is a good idea.
However, the current duration()
and distance()
methods do not return objects, so we could not chain methods in this manner. It's also worth considering it we want to apply this functionality to the Journey Steps as well.
It would be very convenient if you could mutate the time that is calculated, without needing to perform additional processing of the data outside of the package.
Time
If we use the demo as an example, it currently returns the information in seconds. What I propose would do the following.
This would then return, for example,
5 mins
. Additional options would also be really handy, e.g.toHours()
.Distance
Something similar could also be done to the distance.