diff --git a/modules/calendar.md b/modules/calendar.md index d1c8da26..57ad169a 100755 --- a/modules/calendar.md +++ b/modules/calendar.md @@ -51,6 +51,7 @@ The following properties can be configured: | `dateFormat` | Format to use for the date of events when using absolute dates. (version <= 2.16.0) From version 2.16.0, this option will be used to format absolute and relative dates. (e.g. DD/MM/YY to change from the default MM/DD/YYYY)

To show the event time along with the date, use a format like `MMM Do HH:mm`. Depending on configuration, may also require the options `timeFormat:"absolute", urgency:0, getRelative:0,`

**Possible values:** See [Moment.js formats](https://momentjs.com/docs/#/parsing/string-format/)
**Default value:** `MMM Do` (e.g. Jan 18th) | | `dateEndFormat` | Format to use for the end time of events

**Possible values:** See [Moment.js formats](https://momentjs.com/docs/#/parsing/string-format/)
**Default value:** `HH:mm` (e.g. 16:30) | | `showEnd` | Whether to show the end time of events

**Possible values:** `true` or `false`
**Default value:** `true` | +| `showEndsOnlyWithDuration` | Whether to **PREVENT** showing the end date of full day events if showEnd is true

**Possible values:** `true` or `false`
**Default value:** `false` | | `fullDayEventDateFormat` | Format to use for the date of full day events (when using absolute dates)

**Possible values:** See [Moment.js formats](https://momentjs.com/docs/#/parsing/string-format/)
**Default value:** `MMM Do` (e.g. Jan 18th) | | `timeFormat` | Display event times as absolute dates, or relative time, or using absolute date headers with times for each event next to it

**Possible values:** `absolute` or `relative` or `dateheaders`
**Default value:** `relative` | | `getRelative` | How much time (in hours) should be left until calendar events start getting relative?

**Possible values:** `0` (events stay absolute) - `48` (48 hours before the event starts)
**Default value:** `6` | @@ -61,7 +62,7 @@ The following properties can be configured: | `excludedEvents` | An array of words / phrases from event titles that will be excluded from being shown.

Additionally advanced filter objects can be passed in. Below is the configuration for the advance filtering object.
**Required**
`filterBy` - string used to determine if filter is applied.
**Optional**
`until` - Time before an event to display it Ex: [`'3 days'`, `'2 months'`, `'1 week'`]
`caseSensitive` - By default, excludedEvents are case insensitive, set this to true to enforce case sensitivity
`regex` - set to `true` if filterBy is a regex. For those not familiar with regex it is used for pattern matching, please see [here](https://regexr.com/) for more info.

**Example:** `['Birthday', 'Hide This Event', {filterBy: 'Payment', until: '6 days', caseSensitive: true}, {filterBy: '^[0-9]{1,}.*', regex: true}]`
**Default value:** `[]` | | `broadcastPastEvents` | If this is set to true, events from the past `maximumNumberOfDays` will be included in event broadcasts
**Default value:** `false` | | `sliceMultiDayEvents` | If this is set to true, events exceeding at least one midnight will be sliced into separate events including a counter like (1/2). This is especially helpful in "dateheaders" mode. Events will be sliced at midnight, end time for all events but the last will be 23:59
**Default value:** `false` | -| `nextDaysRelative` | If this is set to true, the appointments of today and tomorrow are displayed relatively, even if the timeformat is set to absolute.
**Default value:** `false` | +| `nextDaysRelative` | If this is set to true, the **FULL DAY** appointments of today and tomorrow are displayed relatively, even if the timeformat is set to absolute.
**Default value:** `false` | | `customEvents` | An array of `keyword`/`symbol`/`color`/`transform` that will customize events based on keyword in title.

`keyword` is a case-insensitive string that if present in event title will trigger the use of custom symbol and/or color for that event,
`symbol` is the Font Awesome icon to use as symbol and
`color` is the CSS color to use for the event.
`transform` is an object for regular expression text replacement of the calendar title consisting of the following elements:
- `search` regular expression to search for
- `replace` replace string, may contain group match references
- `yearmatchgroup` (optional) the regex match group of a year that you want to replace to the current age

`keyword` and at least one of `symbol`, `color`, `transform` is required.

**Examples:**
`customEvents: [{keyword: 'Birthday', symbol: 'birthday-cake', color: 'Gold'}]`

`customEvents: [{keyword: 'Geburtstag', symbol: 'birthday-cake', color: 'Gold', transform: { search: '^([^\']*) \'(\\d{4})$' , replace: '$1 ($2.)', yearmatchgroup: 2}},{keyword: 'in Hamburg', transform: { search: ' in Hamburg$' , replace: ''}} ]`
Will transform
![before](./screenshots/customEvents_transform_before.png)
to
![after](./screenshots/customEvents_transform_after.png) | | `limitDays` | If this property is set to a value greater than zero, the number of unique days displayed will be limited to `limitDays` days.

**Default value:** `0` (no limit) | | `limitDaysNeverSkip` | If this property is set to true, every event for every day will be shown regardless of if the day on has a single full day event or not.

**Default value:** `false` |