Created
February 27, 2016 14:44
-
-
Save cakephp-tutorial/7eea93181a014c07ecbc to your computer and use it in GitHub Desktop.
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
<?php | |
private function setProperties($time, $settings) | |
{ | |
//set a day information | |
$type = (isset($settings['type'])) ? $settings['type'] : 'long'; | |
$this->settings['day'] = $this->Time->format('N', $time); | |
$this->settings['dayLetters'] = $this->days[$this->settings['day']][$type]; | |
$this->settings['dayNumbers'] = $this->Time->format('d', $time); | |
//set a month information | |
$this->settings['month'] = $this->Time->format('n', $time); | |
$this->settings['monthLetters'] = $this->months[$this->settings['month']][$type]; | |
$this->settings['monthNumbers'] = $this->Time->format('m', $time); | |
//set a year, hours and minutes information | |
$this->settings['hours'] = $this->Time->format('H', $time); | |
$this->settings['minutes'] = $this->Time->format('i', $time); | |
$this->settings['hoursMinutes'] = (isset($settings['showHour']) && !$settings['showHour']) ? '' : ' alle '. $this->Time->format('H:i', $time); | |
$this->settings['hoursMinutesPast'] = (isset($settings['showHourPast']) && !$settings['showHourPast']) ? '' : ' alle '. $this->Time->format('H:i', $time); | |
$this->settings['year'] = $this->Time->format('Y', $time); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment