Class DateTimeExtensions

Namespace
SIMDispatcher.Core.Extensions
Assembly
SIMDispatcher.Core.dll
public static class DateTimeExtensions
Inheritance
DateTimeExtensions
Inherited Members

Methods

GetIso8601WeekOfYear(DateTime)

Gets the ISO 8601 week number of the year for the specified DateTime object.

public static int GetIso8601WeekOfYear(this DateTime date)

Parameters

date DateTime

The DateTime object to calculate the week number for.

Returns

int

The ISO 8601 week number of the year.

GetIso8601WeekOfYear(DateTimeOffset)

Gets the ISO 8601 week number of the year for the specified DateTimeOffset object.

public static int GetIso8601WeekOfYear(this DateTimeOffset date)

Parameters

date DateTimeOffset

The DateTimeOffset object to calculate the week number for.

Returns

int

The ISO 8601 week number of the year.

RoundUpQuarterly(DateTime)

Rounds the given DateTime value up to the nearest quarter-hour.

public static DateTime RoundUpQuarterly(this DateTime source)

Parameters

source DateTime

The DateTime value to round up.

Returns

DateTime

The rounded-up DateTime value.

ToHumanReadableString(DateTime)

Converts a DateTime object into a human-readable string representing the time difference from the current time.

public static string ToHumanReadableString(this DateTime source)

Parameters

source DateTime

The DateTime object to convert.

Returns

string

A string representing the time difference from the current time in a human-readable format.