Skip to main content

Definition

Assembly: System.Runtime.dll Namespace: System

Syntax

System.DateTimeOffset

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.DateTimeOffset value)

Parameters

NameTypeDescription
valueSystem.DateTimeOffset-

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.DateTimeOffset FirstDayOfMonth(System.DateTimeOffset value)

Parameters

NameTypeDescription
valueSystem.DateTimeOffset-

Returns

Type: System.DateTimeOffset

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 DateTimeOffset, assuming a calendar-based fiscal year.

Syntax

public static int GetQuarter(System.DateTimeOffset date)

Parameters

NameTypeDescription
dateSystem.DateTimeOffsetThe DateTimeOffset 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 DateTimeOffset, assuming a the provided fiscal year begin date.

Syntax

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

Parameters

NameTypeDescription
dateSystem.DateTimeOffsetThe DateTimeOffset to use in the calculation.
fiscalYearStartSystem.DateTimeOffsetThe 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.DateTimeOffset LastDayOfMonth(System.DateTimeOffset value)

Parameters

NameTypeDescription
valueSystem.DateTimeOffset-

Returns

Type: System.DateTimeOffset

Remarks

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