Calendar
Returns or sets a value specifying the type of calendar used by the project.
Syntax: Calendar [ = calendartype ]
- calendartype
- A VbCalendar constant specifying the calendar type.
| Constant | Value | Description |
|---|---|---|
| vbCalGreg | 0 | Gregorian calendar (default). |
| vbCalHijri | 1 | Hijri calendar. |
The Calendar property can only be set programmatically. The setting of Calendar affects the string returned by the Date$ property when the calendar is set to Hijri.
Note BETA 1034
twinBASIC has not implemented Calendar yet. The compiler warns TB0009 at each use, Calendar always reads as vbCalGreg, and setting it raises an error, vbCalGreg included.
Common Errors
| Error | When |
|---|---|
-2147467259 (&H80004005), Unspecified error | Calendar is set to any value other than Null, vbCalGreg included |
94 (&H5E), Invalid use of Null | calendartype is Null |
Example
This example sets the calendar type to Hijri.
Calendar = vbCalHijri
See Also
- Date property