---
title: "input(after:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/date/componentsformatstyle/input(after:)"
---

# input(after:)

The next input value after the given input.

## Declaration

```swift
func input(after input: Range<Date>) -> Range<Date>?
```

## Return Value

Return Value If isPositive is true, the range input.lowerBound..<x, where x is the next larger date that this style can differentiate. If isPositive is false, the range x..<input.upperBound, where x is the next higher date this style can differentiate, or nil if there is no such x.

## Discussion

Discussion If isPositive is true, the next input value maintains the same lowerBound as input, but has a differentupperBound. If isPositive is false, the next input value maintains the same upperBound as input, but as a different lowerBound. Use this function to determine if the return value provided by discreteInput(before:) is precise enough for your use case for any input y: guard let x = style.discreteInput(before: y) else {     return }

let z = style.input(after: x) ?? y If the distance between the upperBounds of x and z is too large for the precision you require, you may want to manually probe format(_:) at a higher rate in that interval, as there is no guarantee for what the output will be in that interval.
