You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
$journey->duration()->toMinutes()
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.
$journey->distance()->toMiles()
The text was updated successfully, but these errors were encountered:
ash123456789
changed the title
Add additional methods to mutate time estimates & distance
Add additional methods to mutate time & distance
Dec 13, 2018
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.
The text was updated successfully, but these errors were encountered: