Hour

public struct Hour : NumericType, CustomStringConvertible

The Hour is a number representing an Earth hour.

  • The Hour value

    Declaration

    Swift

    public let value: Double
  • Returns a Hour struct initialized to contain the given value.

    Declaration

    Swift

    public init(_ value: Double)

    Parameters

    value

    The value for the new Hour.

  • Returns a Hour struct initialized from a sexagesimal representation of the hour.

    Declaration

    Swift

    public init(_ sign: FloatingPointSign = .plus, _ hours: Int, _ minutes: Int, _ seconds: Double)

    Parameters

    sign

    The sign of the hour

    hours

    The hour component of the sexagesimal representation. Sign is ignored.

    minutes

    The minute component of the sexagesimal representation. Sign is ignored.

    seconds

    The second component of the sexagesimal representation. Sign is ignored.

  • Transform the current Hour value into Days.

    Declaration

    Swift

    public var inDays: Day { get }
  • Transform the current Hour value into Minutes.

    Declaration

    Swift

    public var inMinutes: Minute { get }
  • Transform the current Hour value into Seconds.

    Declaration

    Swift

    public var inSeconds: Second { get }
  • Transform the current Hour value into Degrees.

    Declaration

    Swift

    public var inDegrees: Degree { get }
  • Transform the current Hour value into Radians.

    Declaration

    Swift

    public var inRadians: Radian { get }
  • Transform the current Hour value into Julian Days (convenient for easily making operations with Julian Day fractions).

    Declaration

    Swift

    public var inJulianDays: JulianDay { get }
  • Returns a sexagesimal representation of the hour.

    Declaration

    Swift

    public var sexagesimal: SexagesimalNotation { get }
  • Returns a Hour whose value is reduced to the 0..<24 range.

    Declaration

    Swift

    public var reduced: Hour { get }
  • Returns a Hour whose value is reduced to the -12..<12 range (that is, around 0, hence the name).

    Declaration

    Swift

    public var reduced0: Hour { get }
  • A standard sexagesimal description of the Hour value.

    Declaration

    Swift

    public var description: String { get }