The $date variable is set at each iteration of the <cal> function (here) to indicate the current calendar day's date.
$date
<cal>