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: 118 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Days360:: (4 methods):
  between()
  dateDiff360()
  getStartDay()
  getEndDay()


Class: Days360  - X-Ref

between($startDate = 0, $endDate = 0, $method = false)   X-Ref
DAYS360.

Returns the number of days between two dates based on a 360-day year (twelve 30-day months),
which is used in some accounting calculations. Use this function to help compute payments if
your accounting system is based on twelve 30-day months.

Excel Function:
DAYS360(startDate,endDate[,method])

param: array|mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
param: array|mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
param: array|mixed $method US or European Method as a bool
return: array|int|string Number of days between start date and end date

dateDiff360(int $startDay, int $startMonth, int $startYear, int $endDay, int $endMonth, int $endYear, bool $methodUS)   X-Ref
Return the number of days between two dates based on a 360 day calendar.


getStartDay(int $startDay, int $startMonth, int $startYear, bool $methodUS)   X-Ref
No description

getEndDay(int $endDay, int &$endMonth, int &$endYear, int $startDay, bool $methodUS)   X-Ref
No description