calendar_week_mod() - WordPress 函数参考中文文档

返回介绍

calendar_week_mod()

发布于 2017-09-10 字数1501 浏览 1193 评论 0

calendar_week_mod( int $num )

Get number of days since the start of the week.


描述


参数

$num

(int)
(Required)
Number of day.


返回值

(float) Days since the start of the week.


源代码

File: wp-includes/general-template.php

function calendar_week_mod($num) {
	$base = 7;
	return ($num - $base*floor($num/$base));
}

更新日志

Version 描述
1.5.0 Introduced.

相关函数

Used By

  • wp-includes/general-template.php:
    get_calendar()

User Contributed Notes

  1. Skip to note content

    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note

    Contributed by Nilambar Sharma

    Get number of days since the start of the week

    echo calendar_week_mod( 10 );

    Output:

    3

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!