C# Class Rolcore.DateTimeUtils

Utility methods for DateTime.
Afficher le fichier Open project: Rollins/Rolcore

Méthodes publiques

Méthode Description
GetLastDayOfWeekInMonth ( int year, MonthOfYear month, DayOfWeek dayOfWeek ) : System.DateTime

Gets the last occurrence of the specified DayOfWeek within the given month and year.

GetNthDayOfWeekInMonth ( int year, MonthOfYear month, DayOfWeek dayOfWeek, short dayOccurences ) : System.DateTime

Gets the "Nth" day of the month (for example, the 3rd Monday in January) as a DateTime.

HolidaysByYear ( int year ) : System.DateTime[]

Gets a list of DateTimes that are holidays in the given year.

Method Details

GetLastDayOfWeekInMonth() public static méthode

Gets the last occurrence of the specified DayOfWeek within the given month and year.
public static GetLastDayOfWeekInMonth ( int year, MonthOfYear month, DayOfWeek dayOfWeek ) : System.DateTime
year int The year for which to calculate the desired date.
month MonthOfYear The month for which to calculate the desired date.
dayOfWeek DayOfWeek The to calculate.
Résultat System.DateTime

GetNthDayOfWeekInMonth() public static méthode

Gets the "Nth" day of the month (for example, the 3rd Monday in January) as a DateTime.
public static GetNthDayOfWeekInMonth ( int year, MonthOfYear month, DayOfWeek dayOfWeek, short dayOccurences ) : System.DateTime
year int The year in which the date should be calculated.
month MonthOfYear The month (1 through 12) in which the date should be calculated.
dayOfWeek DayOfWeek The day of week to calculate in the given month and year.
dayOccurences short Which occurrence to calculate (1 through 5).
Résultat System.DateTime

HolidaysByYear() public static méthode

Gets a list of DateTimes that are holidays in the given year.
public static HolidaysByYear ( int year ) : System.DateTime[]
year int The year in which to calculate holidays for.
Résultat System.DateTime[]