Date

util/date.ql

An entity that may store a date (not time).

Constructor Overview

Constructor Description
Date(_date)

Creates a new date with the given date .

Function Overview

Function Description
native static fun parse(str) Creates a new date from a DD/MM/YYYY formatted string.
native static fun now() Gets a new date from the current time.
native fun getDay() Gives the day of the month, as a number starting at 1.
native fun getDayName() Gets the name of the day.
native fun getMonth() Gives the month of the year, as a number between 1-12.
native fun getMonthName() Gets the name of the month.
native fun getYear() Gives the year.

Field Overview

Field Description
java _date

The internal LocalDate object to store the date info.

Constructors

Date(_date) link

Creates a new date with the given date .

Functions

native static fun parse(str) link

Creates a new date from a DD/MM/YYYY formatted string.

Params
str ( string )

The string to parse

Returns Date

The date

native static fun now() link

Gets a new date from the current time.

Returns Date

The date

native fun getDay() link

Gives the day of the month, as a number starting at 1.

Returns int

The day of the month

native fun getDayName() link

Gets the name of the day.

Returns string

The name of the day

native fun getMonth() link

Gives the month of the year, as a number between 1-12.

Returns int

The month of the year

native fun getMonthName() link

Gets the name of the month.

Returns string

The name of the month

native fun getYear() link

Gives the year.

Returns int

The year