本文整理汇总了PHP中Fisharebest\Webtrees\I18N::weekendStart方法的典型用法代码示例。如果您正苦于以下问题:PHP I18N::weekendStart方法的具体用法?PHP I18N::weekendStart怎么用?PHP I18N::weekendStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\I18N
的用法示例。
在下文中一共展示了I18N::weekendStart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
echo '</tr><tr>';
echo '<td class="descriptionbox">', I18N::translate('Total individuals: %s', count($indis));
echo '<br>';
echo '<i class="icon-sex_m_15x15" title="', I18N::translate('Males'), '"></i> ', $males, ' ';
echo '<i class="icon-sex_f_15x15" title="', I18N::translate('Females'), '"></i> ', $females, ' ';
if (count($indis) !== $males + $females) {
echo '<i class="icon-sex_u_15x15" title="', I18N::translate('All individuals'), '"></i> ', count($indis) - $males - $females;
}
echo '</td>';
echo '<td class="descriptionbox">', I18N::translate('Total families: %s', count($fams)), '</td>';
echo '</tr></table>';
break;
case 'month':
// We use JD%7 = 0/Mon…6/Sun. Standard definitions use 0/Sun…6/Sat.
$week_start = (I18N::firstDay() + 6) % 7;
$weekend_start = (I18N::weekendStart() + 6) % 7;
$weekend_end = (I18N::weekendEnd() + 6) % 7;
// The french calendar has a 10-day week, which starts on primidi
if ($days_in_week === 10) {
$week_start = 0;
$weekend_start = -1;
$weekend_end = -1;
}
echo '<table class="width100"><thead><tr>';
for ($week_day = 0; $week_day < $days_in_week; ++$week_day) {
$day_name = $cal_date->dayNames(($week_day + $week_start) % $days_in_week);
if ($week_day == $weekend_start || $week_day == $weekend_end) {
echo '<th class="descriptionbox weekend" width="' . 100 / $days_in_week . '%">', $day_name, '</th>';
} else {
echo '<th class="descriptionbox" width="' . 100 / $days_in_week . '%">', $day_name, '</th>';
}