WordPress at Your Fingertips

calendar_week_mod() WP 1.0

Get number of days since the start of the week.

No Hooks.

Return

float. Days since the start of the week.

Usage

calendar_week_mod( $num );
$num(int) (required)
Number of day.

Changelog

Since 1.5.0 Introduced.

Code of calendar_week_mod() WP 5.8.1

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

Supporting (helper utility auxiliary)

Date/Time

Main Functions

No comments
    Log In