mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f49e2c1ca6
commit
795fdb2169
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user