Skip to content

@MadaraUchiha /gist:2942405
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Using DateTime looks better than procedural
<?php
$start_time = new DateTime("02/11/2011 00:00:00");
$stop_time = new DateTime("02/11/2011 00:00:00");
$stop_time->modify("+2 days");
$diff = $stop_time->diff($start_time);
echo "Timespan: " . $diff->format('%d days');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.