EventDayIndex
This utility class is used by event stores to index events by their day (a "YYYY-MM-DD" value, also known as a
"date key"). This key is produced by a DayTime instance. If two DayTime instances have a common
startShift, they can share an index.
Properties
1
Properties
1The DayTime definition for this index. This is set to the initial DayTime instance but can be used for
any other registered DayTime instances since they all posses the same value for
startShift.
This defaults to MIDNIGHT.
Functions
5
Functions
5Clear this index.
Returns an object that has properties named by the dateKey method, or the
array of event records if a date is specified, or the event record array and the date key in a 2-element array
if returnKey is true.
| Parameter | Type | Description |
|---|---|---|
indexName | String | The name of the desired index (either 'date' or 'startDate'). |
date | Number | Date | The date as a |
returnKey | Boolean | Specify |
Returns true if the given dayTime matches this index.
| Parameter | Type | Description |
|---|---|---|
dayTime | DayTime |
This method registers a dayTime instance with this index in the users array.
| Parameter | Type | Description |
|---|---|---|
dayTime | DayTime | The instance to register. |
This method unregisters a dayTime instance, removing it from the users array. This method returns true if
this was the last registered instance and this index is no longer needed.
| Parameter | Type | Description |
|---|---|---|
dayTime | DayTime | The instance to register. |