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