Generated by DocFX

Class DateTimeExtensions

Class DateTimeExtensions.

Inheritance
System.Object
DateTimeExtensions
Namespace: ISynergy.Framework.Core.Extensions
Assembly: ISynergy.Framework.Core.dll
Syntax
public static class DateTimeExtensions : object

Methods

View Source

Age(DateTime)

Ages the specified self.

Declaration
public static int Age(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
System.Int32

System.Int32.

View Source

AgeInDays(DateTime)

Ages the in days.

Declaration
public static int AgeInDays(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
System.Int32

System.Int32.

View Source

ClearMinutesAndSeconds(DateTime)

Clears the minutes and seconds.

Declaration
public static DateTime ClearMinutesAndSeconds(this DateTime current)
Parameters
Type Name Description
DateTime current

The current.

Returns
Type Description
DateTime

DateTime.

View Source

First(DateTime)

Firsts the specified current.

Declaration
public static DateTime First(this DateTime current)
Parameters
Type Name Description
DateTime current

The current.

Returns
Type Description
DateTime

DateTime.

View Source

FirstOfYear(DateTime)

Firsts the of year.

Declaration
public static DateTime FirstOfYear(this DateTime current)
Parameters
Type Name Description
DateTime current

The current.

Returns
Type Description
DateTime

DateTime.

View Source

IsWeekday(DateTime)

Determines whether the specified current is weekday.

Declaration
public static bool IsWeekday(this DateTime current)
Parameters
Type Name Description
DateTime current

The current.

Returns
Type Description
System.Boolean

true if the specified current is weekday; otherwise, false.

View Source

Last(DateTime)

Lasts the specified current.

Declaration
public static DateTime Last(this DateTime current)
Parameters
Type Name Description
DateTime current

The current.

Returns
Type Description
DateTime

DateTime.

View Source

Last(DateTime, DayOfWeek)

Lasts the specified day of week.

Declaration
public static DateTime Last(this DateTime current, DayOfWeek dayOfWeek)
Parameters
Type Name Description
DateTime current

The current.

DayOfWeek dayOfWeek

The day of week.

Returns
Type Description
DateTime

DateTime.

View Source

Next(DateTime, DayOfWeek)

Nexts the specified day of week.

Declaration
public static DateTime Next(this DateTime current, DayOfWeek dayOfWeek)
Parameters
Type Name Description
DateTime current

The current.

DayOfWeek dayOfWeek

The day of week.

Returns
Type Description
DateTime

DateTime.

View Source

NextNWeekday(DateTime, Int32)

Nexts the n weekday.

Declaration
public static DateTime NextNWeekday(this DateTime current, int toAdvance)
Parameters
Type Name Description
DateTime current

The current.

System.Int32 toAdvance

To advance.

Returns
Type Description
DateTime

DateTime.

View Source

ThisOrNext(DateTime, DayOfWeek)

Thises the or next.

Declaration
public static DateTime ThisOrNext(this DateTime current, DayOfWeek dayOfWeek)
Parameters
Type Name Description
DateTime current

The current.

DayOfWeek dayOfWeek

The day of week.

Returns
Type Description
DateTime

DateTime.

View Source

ToEndOfDay(DateTime)

Converts to endofday.

Declaration
public static DateTime ToEndOfDay(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToEndOfMonth(DateTime)

Converts to endofmonth.

Declaration
public static DateTime ToEndOfMonth(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToEndOfQuarter(DateTime)

Converts to end of quartermonth.

Declaration
public static DateTime ToEndOfQuarter(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTimeOffset.

View Source

ToEndOfWeek(DateTime, DayOfWeek)

Converts to endofweek.

Declaration
public static DateTime ToEndOfWeek(this DateTime self, DayOfWeek startOfWeek = null)
Parameters
Type Name Description
DateTime self

The self.

DayOfWeek startOfWeek

The start of week.

Returns
Type Description
DateTime

DateTime.

View Source

ToEndOfWorkWeek(DateTime)

Converts to endofworkweek.

Declaration
public static DateTime ToEndOfWorkWeek(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToEndOfYear(Int32)

Converts to endofyear.

Declaration
public static DateTime ToEndOfYear(this int year)
Parameters
Type Name Description
System.Int32 year

The year.

Returns
Type Description
DateTime

DateTime.

View Source

ToJsonString(DateTime)

Converts to jsonstring.

Declaration
public static string ToJsonString(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
System.String

System.String.

View Source

ToStartOfDay(DateTime)

Converts to startofday.

Declaration
public static DateTime ToStartOfDay(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToStartOfMonth(DateTime)

Converts to startofmonth.

Declaration
public static DateTime ToStartOfMonth(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToStartOfQuarter(DateTime)

Converts to start of quarter.

Declaration
public static DateTime ToStartOfQuarter(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTimeOffset.

View Source

ToStartOfWeek(DateTime, DayOfWeek)

Converts to startofweek.

Declaration
public static DateTime ToStartOfWeek(this DateTime self, DayOfWeek startOfWeek = null)
Parameters
Type Name Description
DateTime self

The self.

DayOfWeek startOfWeek

The start of week.

Returns
Type Description
DateTime

DateTime.

View Source

ToStartOfWorkWeek(DateTime)

Converts to startofworkweek.

Declaration
public static DateTime ToStartOfWorkWeek(this DateTime self)
Parameters
Type Name Description
DateTime self

The self.

Returns
Type Description
DateTime

DateTime.

View Source

ToStartOfYear(Int32)

Converts to startofyear.

Declaration
public static DateTime ToStartOfYear(this int year)
Parameters
Type Name Description
System.Int32 year

The year.

Returns
Type Description
DateTime

DateTime.

View Source

ToWeek(DateTime, Week)

Converts to week.

Declaration
public static DateTime ToWeek(this DateTime current, Week week)
Parameters
Type Name Description
DateTime current

The current.

Week week

The week.

Returns
Type Description
DateTime

DateTime.