source:
extensions/ConcoursPhoto/stuffs_module/functions.inc.php
@
32751
Last change on this file since 32751 was 32457, checked in by , 4 years ago | |
---|---|
File size: 425 bytes |
Line | |
---|---|
1 | <?php |
2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
3 | |
4 | |
5 | // NB of days between 2 dates "AAAA-MM-JJ HH:hh:ss" |
6 | function NbJours($debut, $fin) { |
7 | |
8 | $tDeb = explode("-", substr($debut,0,strpos($debut, ' '))); |
9 | $tFin = explode("-", substr($fin,0,strpos($fin, ' '))); |
10 | |
11 | $diff = mktime(0, 0, 0, $tFin[1], $tFin[2], $tFin[0]) - |
12 | mktime(0, 0, 0, $tDeb[1], $tDeb[2], $tDeb[0]); |
13 | |
14 | return(($diff / 86400)); |
15 | |
16 | } |
17 | |
18 | ?> |
Note: See TracBrowser
for help on using the repository browser.