/**
* Translates day of week number to a string.
*
* @param integer $day The numeric day of the week.
* @param boolean $abbr Return the abbreviated day string?
*
* @return string The day of the week.
*
* @since 1.7.0
*/
public function dayToString($day, $abbr = false)
{
switch ($day) {
case 0:
return $abbr ? Text::_('SUN') : Text::_('SUNDAY');
case 1:
return $abbr ? Text::_('MON') : Text::_('MONDAY');
case 2:
return $abbr ? Text::_('TUE') : Text::_('TUESDAY');
case 3:
return $abbr ? Text::_('WED') : Text::_('WEDNESDAY');
case 4:
return $abbr ? Text::_('THU') : Text::_('THURSDAY');
case 5:
return $abbr ? Text::_('FRI') : Text::_('FRIDAY');
case 6:
return $abbr ? Text::_('SAT') : Text::_('SATURDAY');
}
}