]> git.llucax.com Git - mecon/meconlib.git/blobdiff - HTML/php/QuickForm/mdate.php
(no commit message)
[mecon/meconlib.git] / HTML / php / QuickForm / mdate.php
index d5a39995dc355eb786bb88cfe5732f10f64d80e4..4fe0e426fb5687cbed92e4cd2c1eb90c058d07f7 100644 (file)
@@ -28,6 +28,7 @@
 
 
 require_once('HTML/QuickForm/date.php');
+require_once('Date.php');
 
 /**
  * Class to dynamically create HTML Select elements from a date
@@ -87,5 +88,22 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date
         return $options;
         
     } // end func _createNumericOptionList
+
+    /**
+     * Devuelve un objeto date
+     *
+     *
+     * @access public
+     * @return object Date.
+     */
+    function &getValue()
+    {
+        if ($this->_selectedDate['Y'] != 00) {
+            return new Date (sprintf("%04d-%02d-%02d 00:00:00",$this->_selectedDate['Y'],$this->_selectedDate['F'],$this->_selectedDate['d']));
+        } 
+        else {
+            return null;
+        }
+    } // end func _createNumericOptionList
 }
 ?>