Noda Time
FromHoursAndMinutes Method (hours, minutes)
NamespacesNodaTimeOffsetFromHoursAndMinutes(Int32, Int32)

[This is preliminary documentation and is subject to change.]

Creates an offset with the specified number of hours and minutes.
Declaration Syntax
C#Visual BasicVisual C++
public static Offset FromHoursAndMinutes(
	int hours,
	int minutes
)
Public Shared Function FromHoursAndMinutes ( _
	hours As Integer, _
	minutes As Integer _
) As Offset
public:
static Offset FromHoursAndMinutes(
	int hours, 
	int minutes
)
Parameters
hours (Int32)
The number of hours to represent in the new offset.
minutes (Int32)
The number of minutes to represent in the new offset.
Return Value
A new Offset representing the given value.
Remarks
The result simply takes the hours and minutes and converts each component into milliseconds separately. As a result, a negative offset should usually be obtained by making both arguments negative. For example, to obtain "three hours and ten minutes behind UTC" you might call Offset.FromHoursAndMinutes(-3, -10).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThe result of the operation is outside the range of Offset.

Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)