ig.scheduler.DateRecurrence
Remarks
The DateRecurrence class is used to generate dates based on a formulaic pattern.
An instance of this class can be created from an iCalendar conformant string which represents an recurrence rule (see the iCalendar RRULE expression) using the DateRecurrence.fromICalendarString method.
To provide bi-directional serialization support, an iCalendar conformant string can be generated from an instance of this class using the DateRecurrence.toICalendarString method.
To make an activity such as an Appointment recurring, assign an iCalendar conformant string to the ActivityBase.recurrence property.
Dependencies
-
ig.scheduler.DateRecurrence
Constructor- new $.ig.scheduler.DateRecurrence( );
Creates a new instance with default values.
-
ig.scheduler.DateRecurrence
Constructor- new $.ig.scheduler.DateRecurrence( frequency:ig.scheduler.DateRecurrenceFrequency );
Creates a new instance with the specified DateRecurrence.frequency.
- frequency
- Type:ig.scheduler.DateRecurrenceFrequency
- The value of the DateRecurrence.frequency property; specifies the frequency at which occurrences are generated, i.e., daily, weekly, monthly, etc.
See Also
-
count
- .count( );
Specifies the maximum number of occurrences this instance generates.
Remarks
A DateRecurrence can be limited by either a specific number of occurrences, or by a specific date after which no occurrences will be generated.
Use the DateRecurrence.until property to limit the occurrences generated by a specific date.
Note that the Count property and the DateRecurrence.until property are mutually exclusive; setting both properties causes undefined behavior.
See Also
-
count
- .count( value:number );
Specifies the maximum number of occurrences this instance generates.
- value
- Type:number
Remarks
A DateRecurrence can be limited by either a specific number of occurrences, or by a specific date after which no occurrences will be generated.
Use the DateRecurrence.until property to limit the occurrences generated by a specific date.
Note that the Count property and the DateRecurrence.until property are mutually exclusive; setting both properties causes undefined behavior.
See Also
-
equals
- .equals( obj:object );
- Return Type:
- boolean
- Return Type Description:
- True if the specified object equals this object. False otherwise.
Overridden. Returns true if the specified object equals this object.
- obj
- Type:object
- Object to compare to.
-
frequency
- .frequency( );
- Return Type:
- ig.scheduler.DateRecurrenceFrequency
- Return Type Description:
- Returns a DateRecurrenceFrequency.
Specifies the frequency at which occurrences are generated, i.e., daily, weekly, monthly, etc.
-
frequency
- .frequency( value:ig.scheduler.DateRecurrenceFrequency );
- Return Type:
- ig.scheduler.DateRecurrenceFrequency
- Return Type Description:
- Returns a DateRecurrenceFrequency.
Specifies the frequency at which occurrences are generated, i.e., daily, weekly, monthly, etc.
- value
- Type:ig.scheduler.DateRecurrenceFrequency
-
fromICalendarString
- .fromICalendarString( recurrence:string );
- Return Type:
- ig.scheduler.DateRecurrence
- Return Type Description:
- A DateRecurrence instance.
Parses the specified string, assumed to conform to the iCalendar recurrence specification, into a DateRecurrence instance.
- recurrence
- Type:string
- A string presumed to be in the iCalendar recurrence format.
Remarks
If the specified string is invalid, an exception is thrown, containing information about what part of the string was malformed or otherwise invalid.
-
getHashCode
- .getHashCode( );
- Return Type:
- number
- Return Type Description:
- Hash code of the object.
Overridden. Returns the hash code of this object.
-
interval
- .interval( );
Specifies the interval at which occurrences appear. A value of one (default) indicates that the DateRecurrence.frequency property alone drives occurrence generation.
Remarks
The Interval property provides a way to allow occurrences that would ordinarily appear to be "skipped". For example, assigning a value of two to this property means "every other" occurrence that would normally be generated is skipped. A value of three causes two slots to be skipped.
-
interval
- .interval( value:number );
Specifies the interval at which occurrences appear. A value of one (default) indicates that the DateRecurrence.frequency property alone drives occurrence generation.
- value
- Type:number
Remarks
The Interval property provides a way to allow occurrences that would ordinarily appear to be "skipped". For example, assigning a value of two to this property means "every other" occurrence that would normally be generated is skipped. A value of three causes two slots to be skipped.
-
raisePropertyChangedEvent
- .raisePropertyChangedEvent( propertyName:string );
Raises the DateRecurrence.propertyChanged event.
- propertyName
- Type:string
- The name of the property whose value has changed.
-
rules
- .rules( );
- Return Type:
- ig.scheduler.RulesCollection
- Return Type Description:
- Returns a RulesCollection.
Specifies additional rules which affect the generation of occurrences.
Remarks
Recurrence rules can be used to specify additional criteria for occurrence generation. For example, you can specify one or more rules to indicate that occurrence generation should be restricted to a specific month, week, day of the week, etc.
-
rules
- .rules( index:number );
- Return Type:
- ig.scheduler.DateRecurrenceRuleBase
- Return Type Description:
- Returns a DateRecurrenceRuleBase.
- index
- Type:number
See Also
-
rules
- .rules( index:number, value:ig.scheduler.DateRecurrenceRuleBase );
- Return Type:
- ig.scheduler.DateRecurrenceRuleBase
- Return Type Description:
- Returns a DateRecurrenceRuleBase.
- index
- Type:number
- value
- Type:ig.scheduler.DateRecurrenceRuleBase
See Also
-
toICalendarString
- .toICalendarString( );
- Return Type:
- string
- Return Type Description:
- String that describes this DateRecurrence.
Converts this DateRecurrence to its iCalendar string representation.
-
toICalendarString
- .toICalendarString( recurrence:ig.scheduler.DateRecurrence );
- Return Type:
- string
- Return Type Description:
- String that describes the specified DateRecurrence.
Converts the specified DateRecurrence to its iCalendar string representation.
- recurrence
- Type:ig.scheduler.DateRecurrence
- DateRecurrence instance to convert to string representation.
-
toString
- .toString( );
- Return Type:
- string
- Return Type Description:
- Text that describes the recurrence.
Returns a human-readable description of this recurrence.
-
toStringWithStartDate
- .toStringWithStartDate( startDate:ig.Date, [cultureName:string] );
- Return Type:
- string
- Return Type Description:
- A human-readable description of the recurrence pattern.
Returns a string representation of the recurrence based on the specified start date.
- startDate
- Type:ig.Date
- The start date of the recurrence
- cultureName
- Type:string
- Optional
- Optional; the ISO-639 compliant language code which identifies the language culture. For example, English language with United States dialect is 'en-US'; Japanese is 'ja-JP'; French is 'fr-FR', etc. Specify null to use the local machine's current language culture.
-
toStringWithStartDateAndTimes
- .toStringWithStartDateAndTimes( startDate:ig.Date, startTime:ig.Date, endTime:ig.Date, [cultureName:string] );
- Return Type:
- string
- Return Type Description:
- A human-readable description of the recurrence pattern.
Returns a string representation of the recurrence based on the specified start date.
- startDate
- Type:ig.Date
- The start date of the recurrence or null.
- startTime
- Type:ig.Date
- The start time of each recurrence instance or null.
- endTime
- Type:ig.Date
- The end time of each recurrence instance or null.
- cultureName
- Type:string
- Optional
- Optional; the ISO-639 compliant language code which identifies the language culture. For example, English language with United States dialect is 'en-US'; Japanese is 'ja-JP'; French is 'fr-FR', etc. Specify null to use the local machine's current language culture.
-
until
- .until( );
Specifies the maximum date after which no occurrences will be generated.
Remarks
A DateRecurrence can be limited by either a specific number of occurrences, or by a specific date, after which no occurrences will be generated.
Use the DateRecurrence.count property to limit the maximum number of occurrences that will be generated.
Note that the Count property and the DateRecurrence.until property are mutually exclusive; setting both properties causes undefined behavior.
-
until
- .until( value:ig.Date );
Specifies the maximum date after which no occurrences will be generated.
- value
- Type:ig.Date
Remarks
A DateRecurrence can be limited by either a specific number of occurrences, or by a specific date, after which no occurrences will be generated.
Use the DateRecurrence.count property to limit the maximum number of occurrences that will be generated.
Note that the Count property and the DateRecurrence.until property are mutually exclusive; setting both properties causes undefined behavior.
-
weekStart
- .weekStart( );
Specifies the first day of the week for this recurrence pattern.
Remarks
This property has implications when applying certain rules, such as a WeekOfYearRecurrenceRule, regarding when the first week of the year starts. The first week of the year is considered to be the first week that has at least 4 days in that year. Note that the default value of this property is Monday. -
weekStart
- .weekStart( value:ig.DayOfWeek );
Specifies the first day of the week for this recurrence pattern.
- value
- Type:ig.DayOfWeek
Remarks
This property has implications when applying certain rules, such as a WeekOfYearRecurrenceRule, regarding when the first week of the year starts. The first week of the year is considered to be the first week that has at least 4 days in that year. Note that the default value of this property is Monday.