Skip to content

Instantly share code, notes, and snippets.

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