---
title: "getObjectValue(_:for:errorDescription:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/datecomponentsformatter/getobjectvalue(_:for:errordescription:)"
---

# getObjectValue(_:for:errorDescription:)

NSDateComponentsFormatter currently only implements formatting, not parsing. Until it implements parsing, this will always return NO.

## Declaration

```swift
func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer<AnyObject?>?, for string: String, errorDescription error: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool
```
