gyro/core/model/base/fields/dbfield.date.cls.php
Go to the documentation of this file.00001 <?php 00002 require_once dirname(__FILE__) . '/dbfield.datetime.cls.php'; 00003 00004 /** 00005 * A date only field in DB 00006 * 00007 * @author Gerd Riesselmann 00008 * @ingroup Model 00009 */ 00010 class DBFieldDate extends DBFieldDateTime { 00011 /** 00012 * Returns fucntion or constant to set current time in DB (like NOW() or CURRENT_TIMESTAMP) 00013 * 00014 * @return string 00015 */ 00016 protected function get_db_now_constant() { 00017 return 'CURRENT_DATE'; 00018 } 00019 00020 /** 00021 * Formats a value for use in DB 00022 * 00023 * @param datetime $value 00024 * @return string 00025 */ 00026 protected function format_date_value($value) { 00027 return $this->quote(GyroDate::mysql_date($value, false)); 00028 } 00029 }