Class
CalendarHelper

Holds helper methods for date and time operations.

Definition

Namespace:Telerik.Windows.Controls.ScheduleView

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

cs-api-definition
public static class CalendarHelper

Inheritance: objectCalendarHelper

Methods

GetDaysOfWeekStartWithFirstDayOfWeek(DayOfWeek)

Gets the days of week start with first day of week.

Declaration

cs-api-definition
public static IEnumerable<DayOfWeek> GetDaysOfWeekStartWithFirstDayOfWeek(DayOfWeek firstDayOfWeek)

Parameters

firstDayOfWeek

DayOfWeek

The first day of week.

Returns

IEnumerable<DayOfWeek>

Ordered IEnumerable<T>.

GetEndOfMonth(DateTime)

Gets the last date of month for the specified date.

Declaration

cs-api-definition
public static DateTime GetEndOfMonth(DateTime date)

Parameters

date

DateTime

The date.

Returns

DateTime

The last date of the specified month.

GetEndOfMonth(int, int)

Gets the last date end of the specified month and year.

Declaration

cs-api-definition
public static DateTime GetEndOfMonth(int year, int month)

Parameters

year

int

The year.

month

int

The month.

Returns

DateTime

The last date of the specified month.

GetFirstDayOfWeek(DateTime, DayOfWeek)

Gets the first day of week.

Declaration

cs-api-definition
public static DateTime GetFirstDayOfWeek(DateTime dateTime, DayOfWeek weekStart)

Parameters

dateTime

DateTime

The date time.

weekStart

DayOfWeek

The week start.

Returns

DateTime

GetLastDayOfWeek(DateTime, DayOfWeek)

Gets the last day of week.

Declaration

cs-api-definition
public static DateTime GetLastDayOfWeek(DateTime dateTime, DayOfWeek weekStart)

Parameters

dateTime

DateTime

The date time.

weekStart

DayOfWeek

The week start.

Returns

DateTime

GetNamesOfDays(CultureInfo)

Gets the names of days.

Declaration

cs-api-definition
public static IDictionary<DayOfWeek, string> GetNamesOfDays(CultureInfo culture)

Parameters

culture

CultureInfo

The culture.

Returns

IDictionary<DayOfWeek, string>

Dictionary of DayOfWeek, NameOfDay pair.

GetNamesOfMonths(CultureInfo)

Gets the names of months.

Declaration

cs-api-definition
public static IDictionary<int, string> GetNamesOfMonths(CultureInfo culture)

Parameters

culture

CultureInfo

The culture.

Returns

IDictionary<int, string>

Dictionary of NumberOfMonth, NameOfMonth pair.

GetStartOfMonth(int, int)

Gets the first date of the specified month and year.

Declaration

cs-api-definition
public static DateTime GetStartOfMonth(int year, int month)

Parameters

year

int

The year.

month

int

The month.

Returns

DateTime

The first date of the specified month and year.