C# Class BudgetAnalyser.Engine.DateTimeExtension

An extension for DateTime.
Afficher le fichier Open project: Benrnz/BudgetAnalyser

Méthodes publiques

Méthode Description
DurationInMonths ( this minDate, System.DateTime maxDate ) : int

Works out the duration in whole months between the two dates. The end date must be at least one whole calendar month ahead of the instance date to deemed one month.

FindNextWeekday ( this instance ) : System.DateTime

Increments the day until it is not a weekend. If the given date is already a weekday, the same date is returned.

FirstDateInMonth ( this instance ) : System.DateTime

Returns the first day of the current calendar month.

LastDateInMonth ( this instance ) : System.DateTime

Returns the last day of the given month.

Method Details

DurationInMonths() public static méthode

Works out the duration in whole months between the two dates. The end date must be at least one whole calendar month ahead of the instance date to deemed one month.
public static DurationInMonths ( this minDate, System.DateTime maxDate ) : int
minDate this
maxDate System.DateTime
Résultat int

FindNextWeekday() public static méthode

Increments the day until it is not a weekend. If the given date is already a weekday, the same date is returned.
public static FindNextWeekday ( this instance ) : System.DateTime
instance this
Résultat System.DateTime

FirstDateInMonth() public static méthode

Returns the first day of the current calendar month.
public static FirstDateInMonth ( this instance ) : System.DateTime
instance this
Résultat System.DateTime

LastDateInMonth() public static méthode

Returns the last day of the given month.
public static LastDateInMonth ( this instance ) : System.DateTime
instance this
Résultat System.DateTime