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
檢視更多 >