Table of Contents

Class DateTimeExtensions

Namespace
WhatIsHeDoing.Core.Extensions
Assembly
WhatIsHeDoing.Core.dll

Provides extension methods for DateTime.

public static class DateTimeExtensions
Inheritance
DateTimeExtensions
Inherited Members

Methods

GetNextWeekday(DateTime, DayOfWeek)

Gets the date at the next weekday supplied.

public static DateTime GetNextWeekday(this DateTime dateTime, DayOfWeek day)

Parameters

dateTime DateTime

This date time

day DayOfWeek

At which date we want to find

Returns

DateTime

Date time

Remarks

PeriodsBetween(DateTime, DateTime, uint)

Generates the periods between two date times.

public static IEnumerable<DateTime> PeriodsBetween(this DateTime start, DateTime end, uint period = 30)

Parameters

start DateTime

Start date

end DateTime

End date

period uint

Duration of a period in minutes

Returns

IEnumerable<DateTime>

Date times