Using Swift, I tried:
let DODcomponents = endDate.calendar.components([.Day, .Month, .Year], fromDate: endDate.date)
Where endDate is the outlet for the UIDatepicker for the date of death. I get the error message "Ambiguous use of 'components'" but Xcode doesn't offer any solutions like it normally does when you have syntactically incorrect code.
Everything I've found online is either out of date, in Objective-C, or also doesn't work. This seems like a really simple thing to try and do, so I'm hoping for a simple solution