Skip to content

Commit

Permalink
added readme. added dockblock to function
Browse files Browse the repository at this point in the history
  • Loading branch information
zambezi-marketing committed Mar 6, 2023
1 parent fcbf408 commit 6555060
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
This is a pre-release please do not use in production.

# FieldtypeRecurringDates

To do.
Fieldtype for definining recurring dates according to [RFC-RFC 5545)](https://www.rfc-editor.org/rfc/rfc5545#section-3.3.10) and the awesome library
[php-rrule](https://github.com/rlanvin/php-rrule)

# Finding occurrences

You can use the module included in this same package to find the rules occurrences:

```
$output = $calendarRenderer->render(
$selector, [
'fields' => [
// Will find event occurrences in fields specified in this array
'recurring_meetings',
'recurring_events'
]
]
```

11 changes: 10 additions & 1 deletion RecurringDatesFinder/RecurringDatesFinder.module
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ class RecurringDatesFinder extends WireData implements Module

return $field_queries;
}


/**
* @param $start string|int
* @param $end string|int
* @param $selector string
* @param $options array
* - `fields` (string) : Selector.
* @return array|false
* @throws WireException
*/
public function find($start, $end, $selector = null, $options = array())
{
$field_queries = $this->getRecurringFieldQueries($start, $end, $selector, $options);
Expand Down

0 comments on commit 6555060

Please sign in to comment.