is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 11 years ago

Closed 11 years ago

#1152 closed bug (fixed)

bug sur jDateTime::substract

Reported by: hadrien Owned by:
Priority: normal Milestone: Jelix 1.2RC1
Component: jelix:utils Version: 1.2b1
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


Voici le bug fix :

diff --git a/lib/jelix/utils/jDateTime.class.php b/lib/jelix/utils/jDateTime.class.php
index fdd8198..049d5a9 100644
--- a/lib/jelix/utils/jDateTime.class.php
+++ b/lib/jelix/utils/jDateTime.class.php
@@ -536,10 +536,10 @@ class jDateTime {
                 $newDate->{$i} = abs($sub + $newDate->{$i});
                 if (isset($items[$k+1])) {
-                    $date->{$items[$k+1]}--;
+                    $newDate->{$items[$k+1]}--;
         return $newDate;

Change History (1)

comment:1 Changed 11 years ago by laurentj

  • Milestone set to Jelix 1.2
  • Resolution set to fixed
  • review changed from review? to review+
  • Status changed from new to closed
  • Version changed from 1.1.6 to 1.2b1
Note: See TracTickets for help on using tickets.