Represents and manipulates dates and times.
Date formatting uses the system timezone by default. Use set_timezone() with an IANA timezone string or a Date::TIMEZONE_* constant to select the timezone explicitly.
The `compare_date` operation for the Date object.
The Date constructor accepts an optional date string. Without an argument it creates a Date for the current date and time.
Outputs the date in a specified format to a string.
Compares this date against another. The format value is optional but if specified it can have one of four values: hours, minutes, seconds or days. This lets the function know what to return the number of. By default the format is days.
Returns the day value of the date.
Returns the hour value of the date.
Returns the minute value of the date.
Returns the month value of the date.
Returns the second value of the date.
Sets the date stored within the object. The format helps the system to decide what format the date value is in. If the format parameter is omitted, the format becomes yyyy-MM-dd.
Sets the IANA timezone used by this Date.
Sets the date stored within the object to now. It then returns the date as a string.
Returns a long integer representing the current epoch time. Added in 1.8.7
Returns the year value of the date.