Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

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

Defines 1 class

Month:: (2 methods):
  adjust()
  lastDay()


Class: Month  - X-Ref

adjust($dateValue, $adjustmentMonths)   X-Ref
EDATE.

Returns the serial number that represents the date that is the indicated number of months
before or after a specified date (the start_date).
Use EDATE to calculate maturity dates or due dates that fall on the same day of the month
as the date of issue.

Excel Function:
EDATE(dateValue,adjustmentMonths)

return: mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
param: mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
param: int $adjustmentMonths The number of months before or after start_date.

lastDay($dateValue, $adjustmentMonths)   X-Ref
EOMONTH.

Returns the date value for the last day of the month that is the indicated number of months
before or after start_date.
Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.

Excel Function:
EOMONTH(dateValue,adjustmentMonths)

return: mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
param: mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
param: int $adjustmentMonths The number of months before or after start_date.