Contents

date(era:year:month:day:hour:minute:second:nanosecond:)

Returns a date created with the given components.

Declaration

func date(era eraValue: Int, year yearValue: Int, month monthValue: Int, day dayValue: Int, hour hourValue: Int, minute minuteValue: Int, second secondValue: Int, nanosecond nanosecondValue: Int) -> Date?

Parameters

  • eraValue:

    The value to set for the era.

  • yearValue:

    The value to set for the year.

  • monthValue:

    The value to set for the month.

  • dayValue:

    The value to set for the day.

  • hourValue:

    The value to set for the hour.

  • minuteValue:

    The value to set for the minute.

  • secondValue:

    The value to set for the second.

  • nanosecondValue:

    The value to set for the nanosecond.

Return Value

A new NSDate instance created with the given components, or nil if the components do not correspond to a valid date.

See Also

Calculating Dates