BUGFIX Removed duplicate setValue() method on Time (was supposed to be deleted instead of renamed from setVal() to setValue())

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64467 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-10-16 23:19:39 +00:00
parent f49e2c1ca6
commit 795fdb2169

View File

@ -7,17 +7,12 @@
class Time extends DBField {
function setValue($value) {
if($value) {
if(preg_match( '/(\d{1,2})[:.](\d{2})([ap]m)/', $value, $match )) $this->_12Hour( $match );
else $this->value = date('H:i:s', strtotime($value));
} else $value = null;
}
function setValue($value) {
return $this->setValue( $value );
}
function Nice() {
return date('g:ia', strtotime($this->value));
}