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) GetDaysPerMonth(month,) → {number}

Gets 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

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) IsLeapYear(year,) → {boolean}

Determines 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