YMMBirthDateAttribute 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.
-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) -> YMMUserProfileUpdate

Updates the attribute value.

Parameters:
value Age.
value Age.

Returns:

The YMMUserProfileUpdate class instance.

withDate(year:)

func withDate(year year: UInt) -> YMMUserProfileUpdate

Updates the attribute value.

Parameters:
year

Year of birth.

year

Year of birth.

Returns:

The YMMUserProfileUpdate class instance.

withDate(year:month:)

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

Updates the attribute value.

Parameters:
year

Year of birth.

month

Month of birth.

year

Year of birth.

month

Month of birth.

Returns:

The YMMUserProfileUpdate class instance.

withDate(year:month:day:)

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

Updates the attribute value.

Parameters:
year

Year of birth.

month

Month of birth.

day

Day of birth.

year

Year of birth.

month

Month of birth.

day

Day of birth.

Returns:

The YMMUserProfileUpdate class instance.

withDate(dateComponents:)

func withDate(dateComponents dateComponents: DateComponents) -> YMMUserProfileUpdate

Updates the attribute value.

Parameters:
dateComponents

The instance of the DateComponents class.

dateComponents

The instance of the DateComponents class.

Returns:

The YMMUserProfileUpdate class instance.

withValueReset()

func withValueReset() -> YMMUserProfileUpdate

Resets the attribute value.

Returns:

The YMMUserProfileUpdate class instance.