calendar_week_mod

Get number of days since the start of the week.

Description

(int) calendar_week_mod( (int) $num ); 

Returns (int)

Days since the start of the week.

Parameters (1)

0. $num (int)
Number of day.

Usage

  1. if ( !function_exists( 'calendar_week_mod' ) ) { 
  2. require_once ABSPATH . WPINC . '/general-template.php'; 
  3.  
  4. // Number of day. 
  5. $num = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = calendar_week_mod($num); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/general-template.php  
  1. function calendar_week_mod($num) { 
  2. $base = 7; 
  3. return ($num - $base*floor($num/$base));