The Date Class
The Date class provides methods for date formatting and parsing.
Methods
Class methods are static methods that do not require an object. The method name is prefixed by the class name.
Name | Description |
---|---|
|
Formats a Date as a String according to a format specification. |
|
Constructs a Date from the date value, which is expected in ISO date format ("YYYY-MM-DD"). |
|
Creates a date variable by parsing value according to pattern. |
|
Constructs a Date from value. The parsing is based on the passed format pattern. |
|
Constructs a Date from the current date value. Returns a Date instance representing the current date. |
|
Creates a string by formatting the value of the date according to pattern. |
Usage
With RTL classes, it is not possible to create and subclass objects. The
new
keyword is not supported.
These static methods do not require a Date object instance. When you invoke the method, it is
prefixed with the Date
class name and the '.'