Date Class Methods

Class methods are static methods that do not require an object. The method name is prefixed by the class name.

Table 1. Class Methods (Static Member Methods)
Name Description
fromIsoValue(String value)

Constructs a Date from the date value; returns a Date instance representing the value. The value is expected in iso format ("YYYY-MM-DD").

Using the function guarantees that the Date value is constructed correctly without the danger of runtime parse errors due to changing 4GL date formatting or locale settings.

parseString(String value, String format)
Constructs a Date from value. The parsing is based on the passed format pattern. See Formatting Symbols for Dates.
format(java.lang.String.format)
Formats a Date as a String according to a format specification. The format specification is 4GL-compatible. Returns a string representation of the date. See Formatting Symbols for Dates.
today()
Constructs a Date from the current date value. Returns a Date instance representing the current date.