new ElvishDate(…argsopt)
constructor()
constructor(Date)
constructor(ElvishDate)
constructor(attributes)
constructor(yen, loa, period[, day])
constructor(Date)
constructor(ElvishDate)
constructor(attributes)
constructor(yen, loa, period[, day])
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
Date | ElvishDate | Object | number |
<optional> <repeatable> |
- Source:
Members
(static) daysOfWeek :Object
Constants for days of week
{ELENYA: 0, ANARYA: 1, ISILYA: 2, ALDUYA: 3, MENELYA: 4, VALANYA: 5}
{ELENYA: 0, ANARYA: 1, ISILYA: 2, ALDUYA: 3, MENELYA: 4, VALANYA: 5}
Type:
- Object
- Source:
(static) length :number
Number of arguments handled by constructor (4)
Type:
- number
- Source:
(static) periods :Object
Constants for periods
{YESTARE: 0, TUILE: 1, LAIRE: 2, YAVIE: 3, ENDERI: 4, QUELLE: 5, HRIVE: 6, COIRE: 7, METTARE: 8}
{YESTARE: 0, TUILE: 1, LAIRE: 2, YAVIE: 3, ENDERI: 4, QUELLE: 5, HRIVE: 6, COIRE: 7, METTARE: 8}
Type:
- Object
- Source:
Methods
(static) fromDate(…argsopt) → {ElvishDate}
Accepts same arguments as the standard Date constructor, or accepts a Date instance
fromDate()
fromDate(int)
fromDate(dateString)
fromDate(year, month[, day[, hours[, minutes[, seconds[, milliseconds]]]]])
fromDate(Date)
fromDate()
fromDate(int)
fromDate(dateString)
fromDate(year, month[, day[, hours[, minutes[, seconds[, milliseconds]]]]])
fromDate(Date)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
number | string | Object |
<optional> <repeatable> |
- Source:
Returns:
- Type
- ElvishDate
(static) now() → {number}
Return the number of milliseconds since time 00:00:00 of Yestarë, I 1 (March 29, 1)
- Source:
Returns:
- Type
- number
(static) yen(romanNumeral) → {number}
Helper for getting number for Roman Numeral of Yen
Parameters:
Name | Type | Description |
---|---|---|
romanNumeral |
string |
- Source:
Returns:
- Type
- number
getDayOfLoa() → {number}
Return the number of Day of the Loa (1-based index) for the specified date
- Source:
Returns:
- Type
- number
getDayOfPeriod() → {number}
Return the number of Day of the Period (1-based index, upper limit depends on Period)
for the specified date
- Source:
Returns:
- Type
- number
getDayOfWeek() → {number}
Return the number (0-5) of Day of the Week for the specified date
- Source:
Returns:
- Type
- number
getDayOfWeekName() → {string}
Return the name of the Day of the Week for the specified date
- Source:
Returns:
- Type
- string
getLoa() → {number}
Return the number of the Loa (1-144) for the specified date
- Source:
Returns:
- Type
- number
getPeriod() → {number}
Return the number (0-8) of the Period for the specified date
- Source:
Returns:
- Type
- number
getPeriodName() → {string}
Return the name of the Period for the specified date
- Source:
Returns:
- Type
- string
getTime() → {number}
Returns the numeric value of the specified date as the number of milliseconds
since Yestarë, I 1, 00:00:00 (not supported for prior times).
- Source:
Returns:
- Type
- number
getYen() → {number}
Return number of the Yen (> 0) for the specified date
- Source:
Returns:
- Type
- number
getYenNumeral() → {string}
Returns the roman numerals representation of the Yen for the specified date
- Source:
Returns:
- Type
- string
setDayOfPeriod(dayOfPeriod)
Sets the Day of Period value (1-based index, upper limit depends on Period)
for a specified date
Parameters:
Name | Type | Description |
---|---|---|
dayOfPeriod |
number |
- Source:
setLoa(loa)
Sets the Loa value (1-144) for a specified date
Parameters:
Name | Type | Description |
---|---|---|
loa |
number |
- Source:
setPeriod(period)
Sets the Period value (0-8) for a specified date
Parameters:
Name | Type | Description |
---|---|---|
period |
number |
- Source:
setTime() → {number}
Sets the time in number of milliseconds since Yestarë, I 1, 00:00:00 (>= 0)
for a specified date.
- Source:
Returns:
- Type
- number
setYen(yen)
Sets the Yen value (> 0) for a specified date
Parameters:
Name | Type | Description |
---|---|---|
yen |
number |
- Source:
toDate() → {Date}
Get current ElvishDate as Date
- Source:
Returns:
- Type
- Date
toString() → {string}
String representation of the specified date.
- Source:
Returns:
- Type
- string