BirthDateAttribute protocol
The protocol defines methods for updating the age or date of birth of a user profile.
Instance methods
Updates the attribute value. |
|
Updates the attribute value. |
|
Updates the attribute value. |
|
Updates the attribute value. |
|
Updates the attribute value. |
|
Resets the attribute value. |
Method descriptions
withAge(_:)
func withAge(_ value: UInt) -> UserProfileUpdate
Updates the attribute value.
Parameters:
|
Age. |
Returns:
The UserProfileUpdate
class instance.
withDate(year:)
func withDate(year: UInt) -> UserProfileUpdate
Updates the attribute value.
Parameters:
|
Year of birth. |
Returns:
The UserProfileUpdate
class instance.
withDate(year:month:)
func withDate(year: UInt, month: UInt) -> UserProfileUpdate
Updates the attribute value.
Parameters:
|
Year of birth. |
|
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 of birth. |
|
Month of birth. |
|
Day of birth. |
Returns:
The UserProfileUpdate
class instance.
withDate(dateComponents:)
func withDate(dateComponents: DateComponents) -> UserProfileUpdate
Updates the attribute value.
Parameters:
|
The DateComponents class instance. |
Returns:
The UserProfileUpdate
class instance.
withValueReset()
func withValueReset() -> UserProfileUpdate
Resets the attribute value.
Returns:
The UserProfileUpdate
class instance.