Members
TZ
Time zone selector, blank means "system time zone", "UTC" means UTC. These are the only recognised values.
TZOffset
Computed (real) time zone offset in ms, result may differ from Date.prototype.TZOffset() (in min).
addedTime
The quantum of milliseconds to add or subtract by clicking + or - button.
askedOptions
asked display options for Intl.DateTimeFormat.
calendars
Array of available custom calendars.
(constant) calendrical
Prefix for all calendrical-javascript imported objects.
The calendar classes also imported from calendars.js are not described here, as they may change.
Properties:
| Name | Type | Description |
|---|---|---|
pldrDOM |
Object | Private Locale Data Repository as a domain. |
TimeUnits |
Object | The time units in milliseconds. |
ExtDate |
Object | Extends legacy Date object. |
ExtDateTimeFormat |
Object | Extends Intl.DateTimeFormat. |
cusAskedOptions
resolved display options for ExtDateTimeFormat, with the calendar specified by the user.
customCalIndex
Index of custom calendar currently used.
dayOffset
The quantum of decimal days to add or subtract by clicking + or - button.
extAskedOptions
asked display options for ExtDateTimeFormat.
extUsedOptions
resolved display options for ExtDateTimeFormat.
(constant) loadCalendrical
This promise aggregates all calendrical-javascript imports and initialisations.
switchingDate
The first date where the Gregorian calendar was enforced, as set by the user.
targetDate
The date (instant) to be displayed, initially now.
usedOptions
resolved display options for Intl.DateTimeFormat.
Methods
addTime(sign)
Add or subtract a quantum of time to targetDate.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
sign |
Number | 1 | add if +1, subtract if -1, erroneous if other value. |
calcCustom()
Compute date from field values of current custom calendar.
calcCustomDate()
Set date following custom calendar.
- Source:
calcJulianDay()
Julian Day is specified as a decimal number. Insert with the suitable Date setter.
- Source:
calcTime()
Set local or UTC time, after global TZ, in same day.
calcTime()
Recompute date after time elements.
- Source:
calcWeek()
Compute date from week field values of current custom calendar.
calcWeek()
Set date after week indication.
- Source:
changeAddTime()
Change value of addedTime.
changeDayOffset()
Change value of dayOffset.
compLocalePresentationCalendar()
Recompute all Intl.DateTimeFormat and ExtDateTimeFormat objects after a change in display parameters.
getMode()
Initiate TZ variable (time zone mode) after value in HTML document.
setCalend()
Set current custom calendar to new value and compute fields.
setDateToNow()
Set date to present instant, with the selected user calendar.
setDateToNow()
set current target date new to current custom calendar and to Now
- Source:
setDateToToday(TZ)
Compute date of now, local or UTC; result is UTC date at 00:00. For date converter and yearly figures.
Parameters:
| Name | Type | Description |
|---|---|---|
TZ |
string | if unspecified, date is in local time zone. If "UTC", date is in Greenwich time zone. |
- Source:
setDayOffset(sign)
Add or subtract a quantum of days to targetDate.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
sign |
Number | 1 | add if +1, subtract if -1, erroneous if other value. |
setDisplay()
Recompute and display all date elements and parameters after a change of targetDate or of display parameters.
setUTCHoursFixed()
Set a simple UTC hour at same date. The date is computed after TZ value.
setUTCHoursFixed(UTChours)
Set UTC time to the hours specified. Date is deemed in time zone specified in TZ global variable.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
UTChours |
number | 0 | The time (number of hours) in UTC time zone. |
- Source:
undef(param) → {any}
A utility for the undefined fields
Parameters:
| Name | Type | Description |
|---|---|---|
param |
String | any parameter that can be equated to a String. |
- Source:
Returns:
undefined if param is blank string, param otherwise.
- Type
- any