From:             
Operating system: OSX (MAMP)
PHP version:      Irrelevant
Package:          Date/time related
Bug Type:         Bug
Bug description:date manquante ou en double

Description:
------------
<?php

function jours($date_deb,$date_fin){

             global $jours;

             $date1= strtotime($date_deb); //Premiere date

             $date2= strtotime($date_fin); //Deuxieme date          

             $nbjour=($date2-$date1)/60/60/24;//Nombre de jours entre les deux

            

             for($i=1;$i<=$nbjour+1;$i++){

                $jours[$i]=date('d-m-Y',$date1);

//              $jours[$date1]=jddayofweek(unixtojd($date1));

//              $jours[date('d-m-Y',$date1)]=jddayofweek(unixtojd($date1));

                $date1+=60*60*24; //On additionne d'un jour (en seconde)

             }

             

             return $jours;

           }

           

           jours('01-10-2010','31-03-2011');

           echo '<pre>';

           print_r($jours);

           echo '</pre>';

?>

Test script:
---------------
En voulant écrire une classe pour un projet de calendrier, j'ai réalisé
une fonction qui permet de récupérer toutes les dates en deux dates
données.Mais en prenant la plage de date allant du 01-09-2010 au
31-08-2010 j'ai une erreur sur les dates renvoyées. En affinant seule la
plage qui comprend la plage 01-10-2010 au 31-03-2011 pose problème.



Pour la date du 31-10-2010, elle est répété 2 fois

Il manque la date du 27 mars 2011



Testé avec php 5.3.2 et 5.2.13 de MAMP pour OSX 10.6.4


-- 
Edit bug report at http://bugs.php.net/bug.php?id=52956&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52956&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52956&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52956&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52956&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52956&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52956&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52956&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52956&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52956&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52956&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52956&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52956&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52956&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52956&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52956&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52956&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52956&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52956&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52956&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52956&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52956&r=mysqlcfg

Reply via email to