Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class CustomtimeHelper extends AppHelper {
public $helpers = array('Time');
public $days = array(
1 => 'Lunedì'
2 => 'Martedì'
3 => 'Mercoledì'
4 => 'Giovedì'
5 => 'Venerdì'
6 => 'Sabato'
7 => 'Domenica'
);
public function whatDay($data) {
return $this->days[$this->Time->format('N', $data)];
}
}
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.