Last active
August 29, 2015 14:18
-
-
Save bueckl/4a9a80e7f5890c5013d3 to your computer and use it in GitHub Desktop.
Format Date in CMS #SilverStripe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getNiceCreated() { | |
return $this->obj('Created')->FormatI18N('%d.%m.%Y'); | |
} | |
public function getNiceEventDate() { | |
$Event = $this->Invoice()->Event(); | |
return $Event->dbObject('EndDate')->FormatI18N('%d.%m.%Y'); | |
} | |
Or in Template! | |
$Date.FormatI18N('%e.%m.%Y') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment