source: extensions/ConcoursPhoto/stuffs_module/functions.inc.php @ 32751

Last change on this file since 32751 was 32457, checked in by tiico, 4 years ago

Version 11.0.1 ConcoursPhoto (piwigo 11 compatible + some corrections/news)

File size: 425 bytes
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4
5// NB of days between 2 dates "AAAA-MM-JJ HH:hh:ss"
6function 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.