Documentation

NetworkDays

Table of Contents

count() NETWORKDAYS. int|string
calcStartDow() int
calcEndDow() int
calcPartWeekDays() int
applySign() int

Methods

count()

NETWORKDAYS.

public static count( $startDate : mixed , $endDate : mixed , ...$dateArgs : mixed ) : int|string

Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.

Excel Function: NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]])

Parameters
$startDate : mixed

Excel date serial value (float), PHP date timestamp (integer), PHP DateTime object, or a standard date string

$endDate : mixed

Excel date serial value (float), PHP date timestamp (integer), PHP DateTime object, or a standard date string

$dateArgs : mixed
Return values
int|string

Interval between the dates

calcStartDow()

private static calcStartDow( $startDate : float ) : int
Parameters
$startDate : float
Return values
int

calcEndDow()

private static calcEndDow( $endDate : float ) : int
Parameters
$endDate : float
Return values
int

calcPartWeekDays()

private static calcPartWeekDays( $startDow : int , $endDow : int ) : int
Parameters
$startDow : int
$endDow : int
Return values
int

applySign()

private static applySign( $result : int , $sDate : float , $eDate : float ) : int
Parameters
$result : int
$sDate : float
$eDate : float
Return values
int

Search results