- getdate: documentation ( source)
- print_r: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$d = date();
print_r(getdate(strtotime($d)));
$rango = explode("-", $d);
print_r($rango);
echo (int) explode(":", trim($rango[0]))[0];
//echo date('w', strtotime($d->format('Y-m-d')));
//echo date("H:i:s", strtotime($d);