DateTime Class

class DateTime

Datetime class

setDate($year, $month, $day)

Set the date.

Parameters:
  • $year (int) – The year. :param int $month: The month. :param int $day: The day. :returns: Either false on failure, or the datetime object for method chaining.
setTime($hour, $minute[, $second])

Set the time.

Parameters:
  • $hour (int) – The hour :param int $minute: The minute :param int $second: The second :returns: Either false on failure, or the datetime object for method chaining.
constant ATOM

Y-m-dTH:i:sP