Skip to main content

Definition

Assembly: System.Runtime.dll Namespace: System

Syntax

System.DateTime

Summary

This type is defined in System.Runtime.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

DaysInMonth Extension

Extension method from System.EasyAF_DateTimeExtensions

Syntax

public static int DaysInMonth(System.DateTime value)

Parameters

NameTypeDescription
valueSystem.DateTime-

Returns

Type: int

Remarks

https://stackoverflow.com/questions/24245523/getting-the-first-and-last-day-of-a-month-using-a-given-datetime-object

FirstDayOfMonth Extension

Extension method from System.EasyAF_DateTimeExtensions

Syntax

public static System.DateTime FirstDayOfMonth(System.DateTime value)

Parameters

NameTypeDescription
valueSystem.DateTime-

Returns

Type: System.DateTime

Remarks

https://stackoverflow.com/questions/24245523/getting-the-first-and-last-day-of-a-month-using-a-given-datetime-object

GetQuarter Extension

Extension method from System.EasyAF_DateTimeExtensions
Calculates the quarter for the given DateTime, assuming a calendar-based fiscal year.

Syntax

public static int GetQuarter(System.DateTime date)

Parameters

NameTypeDescription
dateSystem.DateTimeThe DateTime to use in the calculation.

Returns

Type: int

Remarks

From https://stackoverflow.com/questions/8698303/how-do-i-discover-the-quarter-of-a-given-date

GetQuarter Extension

Extension method from System.EasyAF_DateTimeExtensions
Calculates the quarter for the given DateTime, assuming a the provided fiscal year begin date.

Syntax

public static int GetQuarter(System.DateTime date, System.DateTime fiscalYearStart)

Parameters

NameTypeDescription
dateSystem.DateTimeThe DateTime to use in the calculation.
fiscalYearStartSystem.DateTimeThe DateTime representing the start day of the fiscal year to use in calculation.

Returns

Type: int

Remarks

From https://stackoverflow.com/questions/8698303/how-do-i-discover-the-quarter-of-a-given-date

LastDayOfMonth Extension

Extension method from System.EasyAF_DateTimeExtensions

Syntax

public static System.DateTime LastDayOfMonth(System.DateTime value)

Parameters

NameTypeDescription
valueSystem.DateTime-

Returns

Type: System.DateTime

Remarks

https://stackoverflow.com/questions/24245523/getting-the-first-and-last-day-of-a-month-using-a-given-datetime-object