DateTime()
Utility class to perform datetime calculations
Utility class to perform datetime calculations
Adds a specified amount of time to the DateTime object.
Returns the day of the month of the DateTime object.
Sets the day of the month of the DateTime object.
Returns the day of the week of the DateTime object. (Sunday is 0, Monday is 1, etc.).
Calculates the difference between the current DateTime object and another DateTime object.
Sets the DateTime object to the end of a specified unit of time (e.g., end of the day, end of the month).
Returns the formatted date as a string.
Returns the hour of the day of the DateTime object. (24-hour format, 0-23).
Sets the hour of the day of the DateTime object. (24-hour format, 0-23).
Checks if the current DateTime object is after another DateTime object.
Checks if the current DateTime object is before another DateTime object.
Checks if the current DateTime object is between two other DateTime objects (inclusive).
Checks if the current DateTime object is the same as another DateTime object.
Checks if the current DateTime object is the same as or after another DateTime object.
Checks if the current DateTime object is the same as or before another DateTime object.
Converts the DateTime object's timezone to the system's default local timezone.
Returns the millisecond of the second of the DateTime object.
Sets the millisecond of the second of the DateTime object.
Returns the minute of the hour of the DateTime object.
Sets the minute of the hour of the DateTime object.
Returns the month of the DateTime object. (1-based, January is 1).
Sets the month of the DateTime object. (1-based, January is 1).
Returns the second of the minute of the DateTime object.
Sets the second of the minute of the DateTime object.
Sets the DateTime object to the start of a specified unit of time (e.g., start of the day, start of the month).
Subtracts a specified amount of time from the DateTime object.
Returns the ISO 8601 formatted date string (e.g., "1970-01-01T0000.000Z").
Sets the DateTime object's timezone to a specified timezone ID.
Returns the Unix timestamp (seconds since Unix epoch) of the DateTime object.
Converts the DateTime object's timezone to UTC.
Returns the primitive value of the DateTime object, which is the number of milliseconds since the Unix epoch.
Sets the year of the DateTime object.
Returns the year of the DateTime object.