calendar_week_mod

函数
calendar_week_mod ( $num )
参数
  • (int) $num Number of day.
    Required:
返回值
  • (float) Days since the start of the week.
定义位置
相关方法
get_calendarget_theme_modset_theme_modget_theme_modsthe_weekday
引入
1.5.0
弃用
-

calendar_week_mod: 这个函数用来计算一个给定日期的周数。它需要两个参数:年份和星期数。它返回根据日历年调整的周数。

获取自一周开始的天数。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function calendar_week_mod( $num ) {
$base = 7;
return ( $num - $base * floor( $num / $base ) );
}
function calendar_week_mod( $num ) { $base = 7; return ( $num - $base * floor( $num / $base ) ); }
function calendar_week_mod( $num ) {
	$base = 7;
	return ( $num - $base * floor( $num / $base ) );
}

常见问题

FAQs
查看更多 >