
WordPress REST API入门基础知识点
calendar_week_mod ( $num )
calendar_week_mod: 这个函数用来计算一个给定日期的周数。它需要两个参数:年份和星期数。它返回根据日历年调整的周数。
获取自一周开始的天数。
function calendar_week_mod( $num ) { $base = 7; return ( $num - $base * floor( $num / $base ) ); }