New to Telerik UI for WPFStart a free 30-day trial

Holds helper methods for date and time operations.

Definition

Namespace:Telerik.Windows.Controls.ScheduleView

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

C#
public static class CalendarHelper

Inheritance: objectCalendarHelper

Methods

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

C#
public static IEnumerable<DayOfWeek> GetDaysOfWeekStartWithFirstDayOfWeek(DayOfWeek firstDayOfWeek)
Parameters:firstDayOfWeekDayOfWeek

The first day of week.

Returns:

IEnumerable<DayOfWeek>

Ordered IEnumerable<T>.

Gets the last date of month for the specified date.

C#
public static DateTime GetEndOfMonth(DateTime date)
Parameters:dateDateTime

The date.

Returns:

DateTime

The last date of the specified month.

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

C#
public static DateTime GetEndOfMonth(int year, int month)
Parameters:yearint

The year.

monthint

The month.

Returns:

DateTime

The last date of the specified month.

Gets the first day of week.

C#
public static DateTime GetFirstDayOfWeek(DateTime dateTime, DayOfWeek weekStart)
Parameters:dateTimeDateTime

The date time.

weekStartDayOfWeek

The week start.

Returns:

DateTime

Gets the last day of week.

C#
public static DateTime GetLastDayOfWeek(DateTime dateTime, DayOfWeek weekStart)
Parameters:dateTimeDateTime

The date time.

weekStartDayOfWeek

The week start.

Returns:

DateTime

Gets the names of days.

C#
public static IDictionary<DayOfWeek, string> GetNamesOfDays(CultureInfo culture)
Parameters:cultureCultureInfo

The culture.

Returns:

IDictionary<DayOfWeek, string>

Dictionary of DayOfWeek, NameOfDay pair.

Gets the names of months.

C#
public static IDictionary<int, string> GetNamesOfMonths(CultureInfo culture)
Parameters:cultureCultureInfo

The culture.

Returns:

IDictionary<int, string>

Dictionary of NumberOfMonth, NameOfMonth pair.

Gets the first date of the specified month and year.

C#
public static DateTime GetStartOfMonth(int year, int month)
Parameters:yearint

The year.

monthint

The month.

Returns:

DateTime

The first date of the specified month and year.