mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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 {
|
class Time extends DBField {
|
||||||
|
|
||||||
function setValue($value) {
|
function setValue($value) {
|
||||||
|
|
||||||
if($value) {
|
if($value) {
|
||||||
if(preg_match( '/(\d{1,2})[:.](\d{2})([ap]m)/', $value, $match )) $this->_12Hour( $match );
|
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 $this->value = date('H:i:s', strtotime($value));
|
||||||
} else $value = null;
|
} else $value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setValue($value) {
|
|
||||||
return $this->setValue( $value );
|
|
||||||
}
|
|
||||||
|
|
||||||
function Nice() {
|
function Nice() {
|
||||||
return date('g:ia', strtotime($this->value));
|
return date('g:ia', strtotime($this->value));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user