Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// #Exemplo
- // echo "Se passaram " . diferencaDatas("02/03/2011", "02/05/2011") . " dias";
- function diferencaDatas($data1, $data2)
- {
- $separar1 = explode('/', $data1);
- $separar2 = explode('/', $data2);
- return round(((mktime(0, 0, 0, $separar2[1], $separar2[0], $separar2[2]) - mktime(0, 0, 0, $separar1[1], $separar1[0], $separar1[2])) / 86400));
- }
- // Espero que gostem, feito por Bruno da Silva
- // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement