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

Defines 1 class

TimeParts:: (3 methods):
  hour()
  minute()
  second()


Class: TimeParts  - X-Ref

hour($timeValue)   X-Ref
HOUROFDAY.

Returns the hour of a time value.
The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).

Excel Function:
HOUR(timeValue)

param: mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
return: array|int|string Hour

minute($timeValue)   X-Ref
MINUTE.

Returns the minutes of a time value.
The minute is given as an integer, ranging from 0 to 59.

Excel Function:
MINUTE(timeValue)

param: mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
return: array|int|string Minute

second($timeValue)   X-Ref
SECOND.

Returns the seconds of a time value.
The minute is given as an integer, ranging from 0 to 59.

Excel Function:
SECOND(timeValue)

param: mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
return: array|int|string Second