Methods
(inner) timeRule(inTimeSpan, inConstraint, inDay, inTZ, inBeginopt, inEndopt) → {Object}
Functional constructor. Creates an instance of a TimeRule.
Each TimeRule object is immutable.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
inTimeSpan |
Object | A TimeSpan object which represents the begin time and duration of a span of time during which the rule applies. An error is thrown if this argument is not specified or it is not a valid object. | ||
inConstraint |
number | Integer. Identifies which type of Constraint is applied by the time rule. Valid values are: CONSTRAINT_DAY_OF_WEEK, CONSTRAINT_DAY_OF_MONTH, CONSTRAINT_FIRST_OF_MONTH, CONSTRAINT_SECOND_OF_MONTH, CONSTRAINT_THIRD_OF_MONTH, CONSTRAINT_FOURTH_OF_MONTH, CONSTRAINT_FIFTH_OF_MONTH and CONSTRAINT_LAST_OF_MONTH. | ||
inDay |
number | Integer. Represents the day of the week or month when this rule applies. Values representing the days of the week are the same as those of the Date.getDay() method and values for the day of the month must be in the range 1-31. Whether the day of the week or month is specified depends on the value passed to inConstraint. An error is thrown if no value is specified or it is outside the valid range. | ||
inTZ |
string | Timezone identifier as defined by the tz database - sometimes called the TZ environment variable value. See https://www.iana.org/time-zones for more details. | ||
inBegin |
Date | null |
<optional> |
null | Date and time from which the rule is applied. If no begin time is specified then the rule begins at the earliest possible time. |
inEnd |
Date | null |
<optional> |
null | Date and time up until which the rule is applied. If no begin time is specified then the rule ends at the latest possible time. |
- Source:
Returns:
A new instance of a TimeRule object.
- Type
- Object