Contents

getEra(_:year:month:day:from:)

Returns by reference the era, year, week of year, and weekday component values for a given date.

Declaration

func getEra(_ eraValuePointer: UnsafeMutablePointer<Int>?, year yearValuePointer: UnsafeMutablePointer<Int>?, month monthValuePointer: UnsafeMutablePointer<Int>?, day dayValuePointer: UnsafeMutablePointer<Int>?, from date: Date)

Parameters

  • eraValuePointer:

    Upon return, contains the era of the given date.

  • yearValuePointer:

    Upon return, contains the year of the given date.

  • monthValuePointer:

    Upon return, contains the month of the given date.

  • dayValuePointer:

    Upon return, contains the day of the given date.

  • date:

    The date for which to perform the calculation.

Discussion

Pass NULL to ignore any individual component parameter.

This is a convenience method for getting the time components of a given date using components(_:from:)

See Also

Extracting Components