Class CalendarHelper
Holds helper methods for date and time operations.
Inheritance
Namespace: Telerik.Windows.Controls.ScheduleView
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public static class CalendarHelper : Object
Methods
GetDaysOfWeekStartWithFirstDayOfWeek(DayOfWeek)
Gets the days of week start with first day of week.
Declaration
public static IEnumerable<DayOfWeek> GetDaysOfWeekStartWithFirstDayOfWeek(DayOfWeek firstDayOfWeek)
Parameters
System. The first day of week. |
Returns
System. Ordered System.Collections.Generic.IEnumerable<>. |
GetEndOfMonth(DateTime)
Gets the last date of month for the specified date.
Declaration
public static DateTime GetEndOfMonth(DateTime date)
Parameters
System. The date. |
Returns
System. The last date of the specified month. |
GetEndOfMonth(Int32, Int32)
Gets the last date end of the specified month and year.
Declaration
public static DateTime GetEndOfMonth(int year, int month)
Parameters
System. The year. |
System. The month. |
Returns
System. The last date of the specified month. |
GetFirstDayOfWeek(DateTime, DayOfWeek)
Gets the first day of week.
Declaration
public static DateTime GetFirstDayOfWeek(DateTime dateTime, DayOfWeek weekStart)
Parameters
System. The date time. |
System. The week start. |
Returns
System.
|
GetLastDayOfWeek(DateTime, DayOfWeek)
Gets the last day of week.
Declaration
public static DateTime GetLastDayOfWeek(DateTime dateTime, DayOfWeek weekStart)
Parameters
System. The date time. |
System. The week start. |
Returns
System.
|
GetNamesOfDays(CultureInfo)
Gets the names of days.
Declaration
public static IDictionary<DayOfWeek, string> GetNamesOfDays(CultureInfo culture)
Parameters
System. The culture. |
Returns
System. Dictionary of System. |
GetNamesOfMonths(CultureInfo)
Gets the names of months.
Declaration
public static IDictionary<int, string> GetNamesOfMonths(CultureInfo culture)
Parameters
System. The culture. |
Returns
System. Dictionary of NumberOfMonth, NameOfMonth pair. |
GetStartOfMonth(Int32, Int32)
Gets the first date of the specified month and year.
Declaration
public static DateTime GetStartOfMonth(int year, int month)
Parameters
System. The year. |
System. The month. |
Returns
System. The first date of the specified month and year. |