Changeset 45504 in spip-zone


Ignore:
Timestamp:
Mar 17, 2011, 4:31:53 PM (8 years ago)
Author:
abelass@…
Message:

reprendre le paramtyre secondes dans le calcul

Location:
_plugins_/gestion_projets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/gestion_projets/formulaires/inc-formulaire.html

    r45258 r45504  
    1 
    21<BOUCLE_fieldsets(POUR){tableau #ENV{fieldsets}}{par cle}>
    32        <B_champs>
  • _plugins_/gestion_projets/gestion_projets_fonctions.php

    r45258 r45504  
    11<?php
    22     function difference($date_debut,$date_fin,$secondes=3600){
    3      
    4      
    53     $date_debut_jours = date('d-m-Y',strtotime($date_debut));
    64     $date_debut_heures = date('G:i:s',strtotime($date_debut));
     
    1715     $date_f = mktime($split_heures_fin[0], $split_heures_fin[1], $split_heures_fin[2], $split_jours_fin[1], $split_jours_fin[0], $split_jours_fin[2]) ;
    1816     $date_debut = mktime($split_heures_debut[0], $split_heures_debut[1], $split_heures_debut[2], $split_jours_debut[1], $split_jours_debut[0], $split_jours_debut[2]) ;       
    19      $date_difference = ($date_f-$date_debut)/60;
    20      
    21      return number_format($date_difference,20);
     17     $date_difference = ($date_f-$date_debut)/$secondes;
     18
     19     return number_format($date_difference,2);
    2220     }
    2321
Note: See TracChangeset for help on using the changeset viewer.