Skip to content
Reference > Classes

Date

Definition

Date var = .... ;

Extends

Extended By

None

Description

A representation of year month and day as a Date.

Method Summary

Owner Name Return Type Description
Date constructor(value) Object Initialize a Date object.
Date constructor(value) Object Initialize a Date object.
Object getClassName() String Returns the string name of this object's class type.
Date getDay() Integer Returns the day of month value
Date getDayOfWeek() Integer Returns the day of week value
Date getDays() Integer Returns the number of days since epoch day of this date object.
Date getFirstDayOfMonth() Date Returns the first day of the date object's month as a date object
Date getLastDayOfMonth() Date Returns the last day of the date object's month as a date object
Date getMonth() Integer Returns the month of year value
Date getYear() Integer Returns the year value
Date isWeekday() Boolean Returns true if the current date is a weekday
Date isWeekend() Boolean Returns true if the current date is a weekend
Object toJson() String Returns a string of a json representation of this object.
Date toLegibleDayOfWeek() String Returns the day of week formatted string of the date object
Date toLegibleMonth() String Returns the month formatted string of the date object
Date toLegibleString() String Returns the yyyyMMdd formatted string of the date object

Method Definitions


constructor(value)

Date date = new Date(String value)

Description

Initialize a Date object.

Parameter Definition

Name Type Description
value String  a yyyyMMdd string value

Example 1

1
2
3
Date d = "20251225";

// d = 20447

constructor(value)

Date date = new Date(Integer value)

Description

Initialize a Date object.

Parameter Definition

Name Type Description
value Integer  number of days since epoch day

Example 1

1
2
3
Date d = 20447;

// d = 20447

getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.


getDay()

Integer Date::getDay()

Description

Returns the day of month value


getDayOfWeek()

Integer Date::getDayOfWeek()

Description

Returns the day of week value


getDays()

Integer Date::getDays()

Description

Returns the number of days since epoch day of this date object.

Example 1

1
2
3
Date d = 20447;

// d.getDays() = 20447

getFirstDayOfMonth()

Date Date::getFirstDayOfMonth()

Description

Returns the first day of the date object's month as a date object


getLastDayOfMonth()

Date Date::getLastDayOfMonth()

Description

Returns the last day of the date object's month as a date object


getMonth()

Integer Date::getMonth()

Description

Returns the month of year value


getYear()

Integer Date::getYear()

Description

Returns the year value


isWeekday()

Boolean Date::isWeekday()

Description

Returns true if the current date is a weekday


isWeekend()

Boolean Date::isWeekend()

Description

Returns true if the current date is a weekend


toJson()

String Object::toJson()

Description

Returns a string of a json representation of this object.


toLegibleDayOfWeek()

String Date::toLegibleDayOfWeek()

Description

Returns the day of week formatted string of the date object

Example 1

1
2
3
Date d = 20447;

// d.toLegibleDayOfWeek() = Thursday

toLegibleMonth()

String Date::toLegibleMonth()

Description

Returns the month formatted string of the date object

Example 1

1
2
3
Date d = 20447;

// d.toLegibleMonth() = December

toLegibleString()

String Date::toLegibleString()

Description

Returns the yyyyMMdd formatted string of the date object

Example 1

1
2
3
Date d = 20447;

// d.toLegibleString() = 20251225