calendar_week_mod() WordPress Function

The calendar_week_mod() function is used to display a calendar week in WordPress. This function takes two arguments: the first is the week number to display, and the second is an array of options. The options array can contain the following keys: * 'show_week_number' - Whether to display the week number (default: true) * 'first_day_of_week' - The first day of the week (default: 1) * 'echo' - Whether to echo the calendar week or return it (default: true) If the 'echo' option is set to false, the calendar week will be returned as a string.

calendar_week_mod( int $num ) #

Get number of days since the start of the week.


Parameters

$num

(int)(Required)Number of day.


Top ↑

Return

(float) Days since the start of the week.


Top ↑

Source

File: wp-includes/general-template.php

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


Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More