Skip to content

Get The Difference Between Two Dates #9

Description

@natedrake

In the Date.php class define a method to get the difference of two dates in whatever format the user needed them in.

E.g.

Date::differenceInDates($date1, $date2);

returns in ms by default, but 3rd param could be supplied to change return format

Date::differenceInDates($date1, $date2, 's');

returns difference in seconds

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions