Skip to content

Latest commit

 

History

History
126 lines (62 loc) · 2.83 KB

REFERENCE.md

File metadata and controls

126 lines (62 loc) · 2.83 KB

Reference

Table of Contents

Defined types

Functions

Defined types

change_window::apply

The change_window::apply class.

Parameters

The following parameters are available in the change_window::apply defined type:

change_window_set

Data type: Any

An array of change_window names to be merged.

class_list

Data type: Any

An array of classes to be applied when within the change_window.

Functions

change_window::change_window

Type: Ruby 4.x API

Provides change_window function that allows you to check current time against change window

change_window::change_window(String $timezone, String $window_type, Hash $window_wday, Hash $window_time, Optional[Array] $window_week_val, Optional[Array] $window_month_val, Optional[Array] $time)

The change_window::change_window function.

Returns: String Returns true or false as string if the time is within the change window

timezone

Data type: String

the timezone offset to use when timestamp is generated for comparing to change window

window_type

Data type: String

type of window, either 'per_day' or 'window'

window_wday

Data type: Hash

containing start and end days of week for the change window

window_time

Data type: Hash

containing start and end times of day for the change window

window_week

Data type: Array

[Optional] list of weeks in month for the change window

window_month

Data type: Array

[Optional] list of months in year for the change window

time

Data type: Optional[Array]

[Optional] array representing a fixed time to test against

window_week_val

Data type: Optional[Array]

window_month_val

Data type: Optional[Array]

change_window::merge_change_windows

Type: Ruby 4.x API

Creates complex change windows by merging a series of windows together

change_window::merge_change_windows(Array *$change_windows)

The change_window::merge_change_windows function.

Returns: String Returns true or false as string if the time is within the merged change window

*change_windows

Data type: Array

a list of change windows to merge