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] [Versions 401 and 403]

(no description)

File Size: 101 lines (5 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)

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

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)

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