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.
Return
(float) Days since the start of the week.
Source
File: wp-includes/general-template.php
function calendar_week_mod( $num ) { $base = 7; return ( $num - $base * floor( $num / $base ) ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |