Function __global->normalise_time_array
Definitions
sources/calendar.php
- For a time array that may have out-of-range components (in cms_mktime order except without seconds), adjust them so they are in range by rolling other components over as appropriate.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $arr | array | No | No | required parameter | N/A | N/A | Array of components |
| $zone | ID_TEXT | No | No | required parameter | N/A | N/A | The timezone the components are in (this is important as DST-rollovers will vary, so we need to know this to interpret things correctly) |
Returns
- Adjusted components
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* For a time array that may have out-of-range components (in cms_mktime order except without seconds), adjust them so they are in range by rolling other components over as appropriate.
*
* @param array $arr Array of components
* @param ID_TEXT $zone The timezone the components are in (this is important as DST-rollovers will vary, so we need to know this to interpret things correctly)
* @return array Adjusted components
*/
function normalise_time_array(array $arr, string $zone) : array
* For a time array that may have out-of-range components (in cms_mktime order except without seconds), adjust them so they are in range by rolling other components over as appropriate.
*
* @param array $arr Array of components
* @param ID_TEXT $zone The timezone the components are in (this is important as DST-rollovers will vary, so we need to know this to interpret things correctly)
* @return array Adjusted components
*/
function normalise_time_array(array $arr, string $zone) : array

