ENHANCEMENT: added Month function for consistency (from r104935)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112409 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-10-15 01:17:45 +00:00
parent d135ae6837
commit aa4fc0a3db

View File

@ -70,7 +70,14 @@ class Date extends DBField {
}
/**
* Returns the month
* Returns a full textual representation of a month, such as January.
*/
function Month() {
if($this->value) return date('F', strtotime($this->value));
}
/**
* Returns the short version of the month such as Jan
*/
function ShortMonth() {
if($this->value) return date('M', strtotime($this->value));
@ -350,6 +357,4 @@ class Date extends DBField {
public function scaffoldFormField($title = null, $params = null) {
return new DateField($this->name, $title);
}
}
?>
}