Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.