WordPress函数:calendar_week_mod

一、函数简介

获取自一周开始以来的天数。(Gets number of days since the start of the week.)  

二、函数参数

* @param int $num Number of day. * @return float Days since the start of the week.  

三、函数案例

<?php calendar_week_mod( $num ) ?>
   

四、源代码

/**
 * Gets number of days since the start of the week.
 *
 * @since 1.5.0
 *
 * @param int $num Number of day.
 * @return float Days since the start of the week.
 */
function calendar_week_mod( $num ) {
	$base = 7;
	return ( $num - $base * floor( $num / $base ) );
}
   
THE END