DateTimeExtensions Class

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time.Extensions
Assembly Skybrud.Essentials.dll
Visibility Public
Keywords Static
Inheritance Object

Static class with various extension methods for DateTime .

public static class DateTimeExtensions { }

Methods

Gets the abbreviated English name of the day.

Gets the abbreviated name of the day according to the current culture.

Gets the name of the day according to culture.

Gets the abbreviated name of the month according to the current culture.

Gets the abbreviated name of the month according to culture.

Gets the abbreviated English name of the month.

GetAge(DateTime) (static)

Gets the current age, from the specified date of birth.

Gets the current age, from the specified date of birth. The age is calculated based on dt.

Gets the English name of the day.

Gets the day of the month along with the English ordinal suffix based on the specified date.

Gets the English ordinal suffix of the day based on the specified date.

Gets the amount elapsed seconds since the specified date.

Gets the first day of the month of the specified date.

Gets the first day of the week of the specified date. Monday is considered the first day of the week.

Gets the first day of the week of the specified date and based on startOfWeek.

Gets the week number of the specified date according to the ISO 8601 specification.

Gets the last day of the month of the specified date.

Gets the last day of the week of the specified date. Monday is considered the first day of the week.

Gets the last day of the week of the specified date and based on startOfWeek.

Gets the name of the day according to the current culture.

Gets the name of the day according to culture.

Gets the name of the month according to the current culture.

Gets the name of the month according to culture.

Gets the English name of the month.

Gets whether date is within the last number of specified days.

Gets whether the specified date is a leap year.

IsLeapYear(int) (static)

Gets whether the specified year is a leap year.

Gets whether the specified date is a weekday.

Gets whether the specified date is in the weekend.