Skip to content

Add additional methods to mutate time & distance #3

@ash123456789

Description

@ash123456789

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions