mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Add some nice date formats (from r95772) (from r98093)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102585 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6848684334
commit
2ae6f896e3
@ -75,12 +75,19 @@ class Date extends DBField {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the date in the format 24 May 2006
|
* Returns the date in the format 24 December 2006
|
||||||
*/
|
*/
|
||||||
function Long() {
|
function Long() {
|
||||||
if($this->value) return date('j F Y', strtotime($this->value));
|
if($this->value) return date('j F Y', strtotime($this->value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the date in the format 24 Dec 2006
|
||||||
|
*/
|
||||||
|
function Full() {
|
||||||
|
if($this->value) return date('j M Y', strtotime($this->value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the date using a particular formatting string.
|
* Return the date using a particular formatting string.
|
||||||
*
|
*
|
||||||
@ -331,4 +338,4 @@ class Date extends DBField {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user