Table of Contents

Class DateTimeExtensions

Namespace
MudBlazor.Extensions
Assembly
MudBlazor.dll

Represents methods added to DateTime types.

public static class DateTimeExtensions
Inheritance
DateTimeExtensions
Inherited Members

Methods

EndOfMonth(DateTime, CultureInfo)

Gets the last day of the month for this date.

public static DateTime EndOfMonth(this DateTime self, CultureInfo culture)

Parameters

self DateTime

The date to use for calculation.

culture CultureInfo

The culture to use for formatting the date.

Returns

DateTime

StartOfMonth(DateTime, CultureInfo)

Gets the first day of the month for this date.

public static DateTime StartOfMonth(this DateTime self, CultureInfo culture)

Parameters

self DateTime

The date to use for calculation.

culture CultureInfo

The culture to use for formatting the date.

Returns

DateTime

StartOfWeek(DateTime, DayOfWeek)

Gets the day at the start of the week for this date.

public static DateTime StartOfWeek(this DateTime self, DayOfWeek firstDayOfWeek)

Parameters

self DateTime

The date to use for calculation.

firstDayOfWeek DayOfWeek

The day representing the first day of the week.

Returns

DateTime

ToIsoDateString(DateTime)

Formats this date using the ISO 8601 standard.

public static string ToIsoDateString(this DateTime self)

Parameters

self DateTime

Returns

string

The date formatted as YYYY-MM-DD.

ToIsoDateString(DateTime?)

Formats this date using the ISO 8601 standard.

public static string? ToIsoDateString(this DateTime? self)

Parameters

self DateTime?

The date to format.

Returns

string

The date formatted as YYYY-MM-DD.