calendar_week_mod

The timeline below displays how wordpress function calendar_week_mod has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Gets number of days since the start of the week.
 *
 * @since 1.5.0
 *
 * @param int $num Number of day.
 * @return float Days since the start of the week.
 */
function calendar_week_mod($num)
{
    $base = 7;
    return $num - $base * floor($num / $base);
}

WordPress Version: 4.8

/**
 * Get number of days since the start of the week.
 *
 * @since 1.5.0
 *
 * @param int $num Number of day.
 * @return float Days since the start of the week.
 */
function calendar_week_mod($num)
{
    $base = 7;
    return $num - $base * floor($num / $base);
}

WordPress Version: 3.7

/**
 * Get number of days since the start of the week.
 *
 * @since 1.5.0
 *
 * @param int $num Number of day.
 * @return int Days since the start of the week.
 */
function calendar_week_mod($num)
{
    $base = 7;
    return $num - $base * floor($num / $base);
}