PeriodicityHelper
PeriodicityHelper ⇐ Class
Kind: global class
Extends: Class
- PeriodicityHelper ⇐
Class
- new PeriodicityHelper()
- .encodePeriodicity(type) ⇒
*
- .decodePeriodicity(periodicity) ⇒
String
|null
PeriodicityHelper()
Helper methods to manipulate Periodicity
encodePeriodicity(type) ⇒ *
Return the integer that reflects the periodicity of the recording. Remark: some implementation may not support all the combinations (specifically when combining some days of the week)
Kind: static method of PeriodicityHelper
Returns: *
- An integer that indicates the periodicity
Param | Type | Description |
---|---|---|
type | String | PERIODICITY_TYPE_NONE, PERIODICITY_TYPE_DAILY, PERIODICITY_TYPE_WEEKLY or a list of PERIODICITY_TYPE_DAYS separated by a comma |
Example
$PeriodicityHelper.encodePeriodicity("monday, tuesday"); // === $Periodicity.MONDAY | $Periodicity.TUESDAY
$PeriodicityHelper.encodePeriodicity($PeriodicityType.NONE); // === $Periodicity.NONE
$PeriodicityHelper.encodePeriodicity($PeriodicityType.WEEKLY); // === $Periodicity.WEEKLY
$PeriodicityHelper.encodePeriodicity($PeriodicityType.DAILY); // === $Periodicity.DAILY
decodePeriodicity(periodicity) ⇒ String
| null
Return the periodicity type, ie a string description that has the value of:
- PERIODICITY_TYPE_NONE or PERIODICITY_TYPE_DAILY or PERIODICITY_TYPE_WEEKLY
- A combination of PERIODICITY_TYPE_DAYS values separated by a comma
Kind: static method of PeriodicityHelper
Returns: String
| null
- A string description of the periodicity
Param | Type | Description |
---|---|---|
periodicity | number | An integer that indicates the periodicity of a record |