Date

lumin.ui. Date

Simple Date class with access to year/month/day

Constructor

new Date()

Default ctor

Methods

day() → {number}

Gets the day.

Returns:

day, in the range of 1-31.

Type
number

(static) GetCurrentDate() → {lumin.ui.Date}

Get today's date

Returns:

a Date object with today's date

Type
lumin.ui.Date

getDaysPerMonth() → {number}

Gets the amount of days in this Date object's month.

Returns:

amount of days in this Date's month.

Type
number

(static) GetDaysPerMonth(month,) → {number}

To get the amount of days in an arbitrary month

Parameters:
Name Type Description
month, number

1 - 12

Returns:

amount of days in specified month

Type
number

(static) IsLeapYear(year,) → {boolean}

To determine whether the passed in year is a leap year

Parameters:
Name Type Description
year, number

the year

Returns:

true if it is a leap year, false otherwise.

Type
boolean

isLeapYear() → {boolean}

Determines whether this Date object's year is a leap year.

Returns:

true if it is a leap year, false otherwise.

Type
boolean

month() → {number}

Gets the month.

Returns:

month, month in the range of 1-12.

Type
number

setDay(day,)

Sets the day. Clamping will be applied for out of range values.

Parameters:
Name Type Description
day, number

day to be set in the range 1-31.

setMonth(month,)

Sets the month. Clamping will be applied for out of range values.

Parameters:
Name Type Description
month, number

month to be set in the range of 1-12.

setYear(year,)

Sets the year. Clamping will be applied for out of range values.

Parameters:
Name Type Description
year, number

year in the range of -9999, 9999.

year() → {number}

Gets the year.

Returns:

year, year in the range of -9999, 9999.

Type
number

lumin.ui. Date

new Date(year,, month,, day,)

Creates Date object with year, month, day.

Parameters:
Name Type Description
year, number

year in the range -9999, 9999.

month, number

month in the range 1-12.

day, number

day in the range 1-31.

Methods

day() → {number}

Gets the day.

Returns:

day, in the range of 1-31.

Type
number

(static) GetCurrentDate() → {lumin.ui.Date}

Get today's date

Returns:

a Date object with today's date

Type
lumin.ui.Date

getDaysPerMonth() → {number}

Gets the amount of days in this Date object's month.

Returns:

amount of days in this Date's month.

Type
number

(static) GetDaysPerMonth(month,) → {number}

To get the amount of days in an arbitrary month

Parameters:
Name Type Description
month, number

1 - 12

Returns:

amount of days in specified month

Type
number

(static) IsLeapYear(year,) → {boolean}

To determine whether the passed in year is a leap year

Parameters:
Name Type Description
year, number

the year

Returns:

true if it is a leap year, false otherwise.

Type
boolean

isLeapYear() → {boolean}

Determines whether this Date object's year is a leap year.

Returns:

true if it is a leap year, false otherwise.

Type
boolean

month() → {number}

Gets the month.

Returns:

month, month in the range of 1-12.

Type
number

setDay(day,)

Sets the day. Clamping will be applied for out of range values.

Parameters:
Name Type Description
day, number

day to be set in the range 1-31.

setMonth(month,)

Sets the month. Clamping will be applied for out of range values.

Parameters:
Name Type Description
month, number

month to be set in the range of 1-12.

setYear(year,)

Sets the year. Clamping will be applied for out of range values.

Parameters:
Name Type Description
year, number

year in the range of -9999, 9999.

year() → {number}

Gets the year.

Returns:

year, year in the range of -9999, 9999.

Type
number