···389389 }
390390391391 /**
392392+ * Return a date time formatted into the database's date format.
393393+ *
394394+ * @param DateTime $datetime The DateTime object
395395+ * @return string
396396+ */
397397+ public function date_to_string($datetime)
398398+ {
399399+ return $datetime->format('Y-m-d');
400400+ }
401401+402402+ /**
392403 * Return a date time formatted into the database's datetime format.
393404 *
394405 * @param DateTime $datetime The DateTime object
···3737 return "$sequence_name.nextval";
3838 }
39394040+ public function date_to_string($datetime)
4141+ {
4242+ return strtoupper($datetime->format('d-M-Y'));
4343+ }
4444+4045 public function datetime_to_string($datetime)
4146 {
4247 return strtoupper($datetime->format('d-M-Y h:i:s A'));
+5
lib/php-activerecord/test/OciAdapterTest.php
···2626 $this->assert_equals('01-JAN-2009 01:01:01 AM',$this->conn->datetime_to_string(date_create('2009-01-01 01:01:01 EST')));
2727 }
28282929+ public function test_date_to_string()
3030+ {
3131+ $this->assert_equals('01-JAN-2009',$this->conn->date_to_string(date_create('2009-01-01 01:01:01 EST')));
3232+ }
3333+2934 public function test_insert_id() {}
3035 public function test_insert_id_with_params() {}
3136 public function test_insert_id_should_return_explicitly_inserted_id() {}