Function __global->find_periods_recurrence
Definitions
sources/calendar.php
- Find a list of pairs specifying the times the event occurs, for 20 years into the future, in user-time.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $timezone | ID_TEXT | No | No | required parameter | N/A | N/A | The timezone of the event |
| $do_timezone_conv | BINARY | No | No | required parameter | N/A | N/A | Whether the time should be converted to the viewer's own timezone |
| $start_year | integer | No | No | required parameter | N/A | N/A | The year the event starts at. This and the below are in server time |
| $start_month | integer | No | No | required parameter | N/A | N/A | The month the event starts at |
| $start_day | integer | No | No | required parameter | N/A | N/A | The day the event starts at |
| $start_monthly_spec_type | ID_TEXT | No | No | required parameter | day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards | N/A | In-month specification type for start date |
| $start_hour | ?integer | No | No | required parameter | N/A | N/A | The hour the event starts at (null: full day event) |
| $start_minute | ?integer | No | No | required parameter | N/A | N/A | The minute the event starts at (null: full day event) |
| $end_year | ?integer | No | No | required parameter | N/A | N/A | The year the event ends at (null: not a multi day event) |
| $end_month | ?integer | No | No | required parameter | N/A | N/A | The month the event ends at (null: not a multi day event) |
| $end_day | ?integer | No | No | required parameter | N/A | N/A | The day the event ends at (null: not a multi day event) |
| $end_monthly_spec_type | ID_TEXT | No | No | required parameter | day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards | N/A | In-month specification type for end date |
| $end_hour | ?integer | No | No | required parameter | N/A | N/A | The hour the event ends at (null: not a multi day event / all day event) |
| $end_minute | ?integer | No | No | required parameter | N/A | N/A | The minute the event ends at (null: not a multi day event / all day event) |
| $recurrence | string | No | No | required parameter | N/A | N/A | The event recurrence |
| $recurrences | ?integer | No | No | required parameter | N/A | N/A | The number of recurrences (null: none/infinite) |
| $period_start | ?TIME | No | No | Null | N/A | N/A | The timestamp that found times must exceed. In user-time (null: now) |
| $period_end | ?TIME | No | No | Null | N/A | N/A | The timestamp that found times must not exceed. In user-time (null: 20 years time) |
| $max | ?integer | No | No | Null | N/A | N/A | Maximum to return (null: no limit) |
Returns
- A list of pairs for period times (timestamps, in user-time). Actually a series of pairs, 'window-bound timestamps' is first pair, then 'true coverage timestamps', then 'true coverage timestamps without timezone conversions'
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find a list of pairs specifying the times the event occurs, for 20 years into the future, in user-time.
*
* @param ID_TEXT $timezone The timezone of the event
* @param BINARY $do_timezone_conv Whether the time should be converted to the viewer's own timezone
* @param integer $start_year The year the event starts at. This and the below are in server time
* @param integer $start_month The month the event starts at
* @param integer $start_day The day the event starts at
* @param ID_TEXT $start_monthly_spec_type In-month specification type for start date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $start_hour The hour the event starts at (null: full day event)
* @param ?integer $start_minute The minute the event starts at (null: full day event)
* @param ?integer $end_year The year the event ends at (null: not a multi day event)
* @param ?integer $end_month The month the event ends at (null: not a multi day event)
* @param ?integer $end_day The day the event ends at (null: not a multi day event)
* @param ID_TEXT $end_monthly_spec_type In-month specification type for end date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $end_hour The hour the event ends at (null: not a multi day event / all day event)
* @param ?integer $end_minute The minute the event ends at (null: not a multi day event / all day event)
* @param string $recurrence The event recurrence
* @param ?integer $recurrences The number of recurrences (null: none/infinite)
* @param ?TIME $period_start The timestamp that found times must exceed. In user-time (null: now)
* @param ?TIME $period_end The timestamp that found times must not exceed. In user-time (null: 20 years time)
* @param ?integer $max Maximum to return (null: no limit)
* @return array A list of pairs for period times (timestamps, in user-time). Actually a series of pairs, 'window-bound timestamps' is first pair, then 'true coverage timestamps', then 'true coverage timestamps without timezone conversions'
*/
function find_periods_recurrence(string $timezone, int $do_timezone_conv, int $start_year, int $start_month, int $start_day, string $start_monthly_spec_type, ?int $start_hour, ?int $start_minute, ?int $end_year, ?int $end_month, ?int $end_day, string $end_monthly_spec_type, ?int $end_hour, ?int $end_minute, string $recurrence, ?int $recurrences, ?int $period_start = null, ?int $period_end = null, ?int $max = null) : array
* Find a list of pairs specifying the times the event occurs, for 20 years into the future, in user-time.
*
* @param ID_TEXT $timezone The timezone of the event
* @param BINARY $do_timezone_conv Whether the time should be converted to the viewer's own timezone
* @param integer $start_year The year the event starts at. This and the below are in server time
* @param integer $start_month The month the event starts at
* @param integer $start_day The day the event starts at
* @param ID_TEXT $start_monthly_spec_type In-month specification type for start date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $start_hour The hour the event starts at (null: full day event)
* @param ?integer $start_minute The minute the event starts at (null: full day event)
* @param ?integer $end_year The year the event ends at (null: not a multi day event)
* @param ?integer $end_month The month the event ends at (null: not a multi day event)
* @param ?integer $end_day The day the event ends at (null: not a multi day event)
* @param ID_TEXT $end_monthly_spec_type In-month specification type for end date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $end_hour The hour the event ends at (null: not a multi day event / all day event)
* @param ?integer $end_minute The minute the event ends at (null: not a multi day event / all day event)
* @param string $recurrence The event recurrence
* @param ?integer $recurrences The number of recurrences (null: none/infinite)
* @param ?TIME $period_start The timestamp that found times must exceed. In user-time (null: now)
* @param ?TIME $period_end The timestamp that found times must not exceed. In user-time (null: 20 years time)
* @param ?integer $max Maximum to return (null: no limit)
* @return array A list of pairs for period times (timestamps, in user-time). Actually a series of pairs, 'window-bound timestamps' is first pair, then 'true coverage timestamps', then 'true coverage timestamps without timezone conversions'
*/
function find_periods_recurrence(string $timezone, int $do_timezone_conv, int $start_year, int $start_month, int $start_day, string $start_monthly_spec_type, ?int $start_hour, ?int $start_minute, ?int $end_year, ?int $end_month, ?int $end_day, string $end_monthly_spec_type, ?int $end_hour, ?int $end_minute, string $recurrence, ?int $recurrences, ?int $period_start = null, ?int $period_end = null, ?int $max = null) : array

