yiisoft/yii — pull request #1663 by Yiivgeny (2012-11-06 14:17:01+00:00)
Title: CLocale::getWeekDayName() more compatible with date() function

Function `date('N')` return 7 on Sandays, but CLocale::getWeekDayName() supports sunday day-number only as 0.

So correct using like `Yii::app()->getLocale()->getWeekDayName(date('N')==7?0:date('N'))`. I think this functionality must be on low level, because `date()` is core function and `N`-format is part of php core