BirthDateAttribute protocol

The protocol defines methods for updating the age or date of birth of a user profile.

Instance methods

-withAge(_:)

Updates the attribute value.

-withDate(year:)

Updates the attribute value.

-withDate(year:month:)

Updates the attribute value.

-withDate(year:month:day:)

Updates the attribute value.

-withDate(dateComponents:)

Updates the attribute value.

-withValueReset()

Resets the attribute value.

Method descriptions

withAge(_:)

func withAge(_ value: UInt) -> UserProfileUpdate

Updates the attribute value.

Parameters:

value

Age.

Returns:

The UserProfileUpdate class instance.

withDate(year:)

func withDate(year: UInt) -> UserProfileUpdate

Updates the attribute value.

Parameters:

year

Year of birth.

Returns:

The UserProfileUpdate class instance.

withDate(year:month:)

func withDate(year: UInt, month: UInt) -> UserProfileUpdate

Updates the attribute value.

Parameters:

year

Year of birth.

month

Month of birth.

Returns:

The UserProfileUpdate class instance.

withDate(year:month:day:)

func withDate(year: UInt, month: UInt, day: UInt) -> UserProfileUpdate

Updates the attribute value.

Parameters:

year

Year of birth.

month

Month of birth.

day

Day of birth.

Returns:

The UserProfileUpdate class instance.

withDate(dateComponents:)

func withDate(dateComponents: DateComponents) -> UserProfileUpdate

Updates the attribute value.

Parameters:

dateComponents

The DateComponents class instance.

Returns:

The UserProfileUpdate class instance.

withValueReset()

func withValueReset() -> UserProfileUpdate

Resets the attribute value.

Returns:

The UserProfileUpdate class instance.