TimeUtils.GetLastWeekdayOfMonth method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll

GetLastWeekdayOfMonth(DateTime, DayOfWeek)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTime GetLastWeekdayOfMonth(DateTime date, DayOfWeek dayOfWeek)

Parameters

date DateTime

A date in the month.

dayOfWeek DayOfWeek

The weekday to match.

Returns

An instance of DateTime representing the day.

GetLastWeekdayOfMonth(DateTimeOffset, DayOfWeek)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTimeOffset GetLastWeekdayOfMonth(DateTimeOffset date, DayOfWeek dayOfWeek)

Parameters

A date in the month.

dayOfWeek DayOfWeek

The weekday to match.

Returns

An instance of DateTimeOffset representing the day.

GetLastWeekdayOfMonth(int, EssentialsDateMonthName, DayOfWeek)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTimeOffset GetLastWeekdayOfMonth(int year, EssentialsDateMonthName month, DayOfWeek dayOfWeek)

Parameters

year int

The year.

The month.

dayOfWeek DayOfWeek

The weekday to match.

Returns

An instance of DateTimeOffset representing the day.

GetLastWeekdayOfMonth(int, EssentialsDateMonthName, DayOfWeek, TimeSpan)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTimeOffset GetLastWeekdayOfMonth(int year, EssentialsDateMonthName month, DayOfWeek dayOfWeek, TimeSpan offset)

Parameters

year int

The year.

The month.

dayOfWeek DayOfWeek

The weekday to match.

offset TimeSpan

The time's offset from Coordinated Universal Time (UTC).

Returns

An instance of DateTimeOffset representing the day.

GetLastWeekdayOfMonth(int, int, DayOfWeek)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTime GetLastWeekdayOfMonth(int year, int month, DayOfWeek dayOfWeek)

Parameters

year int

The year.

month int

The month.

dayOfWeek DayOfWeek

The weekday to match.

Returns

An instance of DateTime representing the day.

GetLastWeekdayOfMonth(int, int, DayOfWeek, TimeSpan)

Static

Gets the last day of the month that matches dayOfWeek..

public static DateTimeOffset GetLastWeekdayOfMonth(int year, int month, DayOfWeek dayOfWeek, TimeSpan offset)

Parameters

year int

The year.

month int

The month.

dayOfWeek DayOfWeek

The weekday to match.

offset TimeSpan

The time's offset from Coordinated Universal Time (UTC).

Returns

An instance of DateTimeOffset representing the day.