Browse Source

Add dockblock on dateDifference helper function

pull/18/head
Nafies Luthfi 7 years ago
parent
commit
b9dc09bd4f
  1. 8
      app/helpers.php

8
app/helpers.php

@ -159,6 +159,14 @@ function html_link_to_route($name, $title = null, $parameters = [], $attributes
return app('html')->decode(link_to_route($name, $title, $parameters, $attributes));
}
/**
* Period between two dates.
*
* @param string $date1
* @param string $date2
* @param string $differenceFormat
* @return int|string
*/
function dateDifference($date1, $date2, $differenceFormat = '%a')
{
$datetime1 = date_create($date1);

Loading…
Cancel
Save