fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17308] controller: for repeat type year: place deadl


From: sigurdne
Subject: [Fmsystem-commits] [17308] controller: for repeat type year: place deadline at the end of the year
Date: Wed, 15 Nov 2017 03:25:05 -0500 (EST)

Revision: 17308
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17308
Author:   sigurdne
Date:     2017-11-15 03:25:05 -0500 (Wed, 15 Nov 2017)
Log Message:
-----------
controller: for repeat type year: place deadline at the end of the year

Modified Paths:
--------------
    trunk/controller/inc/component/class.date_generator.inc.php

Modified: trunk/controller/inc/component/class.date_generator.inc.php
===================================================================
--- trunk/controller/inc/component/class.date_generator.inc.php 2017-11-14 
19:37:42 UTC (rev 17307)
+++ trunk/controller/inc/component/class.date_generator.inc.php 2017-11-15 
08:25:05 UTC (rev 17308)
@@ -109,7 +109,18 @@
 //                     $num_days_in_month = cal_days_in_month(CAL_GREGORIAN, 
12, date("y", $this->start_date));
                                $num_days_in_month = 
cal_days_in_month(CAL_GREGORIAN, date("m", $this->start_date), date("y", 
$this->start_date));
 //                     $control_start_date = mktime(0,0,0, 12, 
$num_days_in_month, date("y", $this->start_date));
-                               $control_start_date = mktime(0, 0, 0, date("m", 
$this->start_date), $num_days_in_month, date("y", $this->start_date));
+                               $control_start_year = date('y', 
$this->start_date);
+                               $period_start_year = date('y', 
$this->period_start_date);
+                               /**
+                                * In order to be able to place the deadline at 
the end of the year
+                                */
+                               if($control_start_year == $period_start_year)
+                               {
+                                       $control_start_year -= 1;
+                               }
+
+//                             $control_start_date = mktime(0, 0, 0, date("m", 
$this->start_date), $num_days_in_month, date("y", $this->start_date));
+                               $control_start_date = mktime(0, 0, 0, date("m", 
$this->start_date), $num_days_in_month, $control_start_year);
                        }
 
                        return $control_start_date;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]