HeaderPane
Main
Hide
Share Link
Print

GetOptionalCalendars Method, SftCalendar Object

Returns the calendar systems a locale offers, as an array of SftDateCalendarTypeConstants values.

Syntax

C#object Calendars = object.GetOptionalCalendars(string LocaleName);
VB.NETCalendars = object.GetOptionalCalendars(ByVal LocaleName As String) As Object
C++_variant_t Calendars = object->GetOptionalCalendars(_bstr_t LocaleName);
CHRESULT object->raw_GetOptionalCalendars(BSTR LocaleName, VARIANT* Calendars);

object

A SftCalendar object.

LocaleName

The locale name, for example "ja-JP". An empty string returns the calendar systems of the user's locale.

Calendars

Returns an array of SftDateCalendarTypeConstants values (an array of integers), with the default calendar of the locale first.

Comments

The GetOptionalCalendars method returns the calendar systems a locale offers, in the order Windows lists them, with the default calendar of the locale first. Calendar systems that SftDate/OCX doesn't support are not included. p Each value returned can be used with the CalendarType property, together with the locale name in the Culture property. For example, "ja-JP" offers the Gregorian and the Japanese calendars. p GetOptionalCalendars doesn't depend on the control's settings.

See Also SftCalendar Object | Object Hierarchy | Cultures and Calendars


Last Updated 11/29/2026 - (email)
© 2026 Softel vdm, Inc.