# GraffitiCalendarRestriction
Class
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Constructor | RestrictionID as String <br> StartTime as DateTime <br> EndTime as DateTime <br> ParamArray Days as Integer | (None) | Creates a new class instance for hiding specified days of the week within a timeframe. |
| Constructor | RestrictionID as String <br> ParamArray VisibleDays as Integer | (None) | Creates a new class instance for hiding specified days of the week within a timeframe. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Attributes | HideExcluded | Boolean | (None) |
| Friday | Boolean | (None) | Allow Friday in View |
| ID | String | (None) | The ID of this restriction |
| Monday | Boolean | (None) | Allow Monday in View |
| Saturday | Boolean | (None) | Allow Saturday in View |
| Sunday | Boolean | (None) | Allow Sunday in View |
| Thursday | Boolean | (None) | Allow Thursday in View |
| TimeEnd | DateTime | (None) | The end time for the restriction. |
| TimeStart | DateTime | (None) | The start time for the restriction. |
| Tuesday | Boolean | (None) | Allow Tuesday in View |
| Wednesday | Boolean | (None) | Allow Wednesday in View |
## Notes
### How it Works
TimeEnd and TimeStart (and their matching Constructor parameters) apply the time to the allowed days of the week. These are not to specify a timeframe of when the restriction is applied. It is possible to disable days within a timeframe using the DisableDays method.
## Examples
### Custom Restriction
This example will create a restriction which allows Monday, Wednesday and Friday.
```
var dStart as new DateTime( 2022, 1, 1, 8, 0, 0 )
var dEnd as new DateTime( 2022, 1, 1, 17, 0, 0 )
var r as new GraffitiCalendarRestriction( "noMonWedFri", dStart, dEnd, 1, 3, 5 )
myCalendar.AddRestriction( r )
myCalendar.RestrictView = True
```
### Hide Days of the Week
This example will create a restriction that hides Saturday and Sunday from the calendar.
```
var r as new GraffitiCalendarRestriction( "noWeekends", 1, 2, 3, 4, 5 )
me.AddRestriction( r )
```