Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 119 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

NetworkDays:: (5 methods):
  count()
  calcStartDow()
  calcEndDow()
  calcPartWeekDays()
  applySign()


Class: NetworkDays  - X-Ref

count($startDate, $endDate, ...$dateArgs)   X-Ref
NETWORKDAYS.

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[,...]]])

param: mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
param: mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
param: mixed $dateArgs An array of dates (such as holidays) to exclude from the calculation
return: array|int|string Interval between the dates

calcStartDow(float $startDate)   X-Ref
No description

calcEndDow(float $endDate)   X-Ref
No description

calcPartWeekDays(int $startDow, int $endDow)   X-Ref
No description

applySign(int $result, float $sDate, float $eDate)   X-Ref
No description